mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Use new style -netdev
This commit is contained in:
parent
cbe9125730
commit
8e214447e8
1 changed files with 7 additions and 5 deletions
12
quickemu
12
quickemu
|
@ -192,13 +192,15 @@ function vm_boot() {
|
|||
fi
|
||||
echo " - Display: ${xres}x${yres}"
|
||||
|
||||
local NET=""
|
||||
# Set the hostname of the VM
|
||||
local NET="user,hostname=${VMNAME}"
|
||||
|
||||
# If smbd is available, export $HOME to the guest via samba
|
||||
if [ -e /snap/qemu-virgil/current/usr/sbin/smbd ]; then
|
||||
NET=",smb=${HOME}"
|
||||
NET="${NET},smb=${HOME}"
|
||||
fi
|
||||
|
||||
if [ -n "${NET}" ]; then
|
||||
if [[ ${NET} == *"smb"* ]]; then
|
||||
echo " - smbd: ${HOME} will be exported to the guest via smb://10.0.2.4/qemu"
|
||||
else
|
||||
echo " - smbd: ${HOME} will not be exported to the guest. 'smbd' not found."
|
||||
|
@ -223,8 +225,8 @@ function vm_boot() {
|
|||
-cpu host,kvm=on \
|
||||
-m ${ram} \
|
||||
-smp ${cores} \
|
||||
-net nic,model=virtio \
|
||||
-net user"${NET}" \
|
||||
-netdev ${NET},id=nic \
|
||||
-device virtio-net,netdev=nic \
|
||||
-rtc base=localtime,clock=host \
|
||||
-serial mon:stdio \
|
||||
-audiodev pa,id=pa,server=unix:$XDG_RUNTIME_DIR/pulse/native,out.stream-name=${LAUNCHER}-${VMNAME},in.stream-name=${LAUNCHER}-${VMNAME} \
|
||||
|
|
Loading…
Reference in a new issue