]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Fix: net: user: adds id param for the newer qemu
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 14 May 2020 22:32:33 +0000 (19:32 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 14 May 2020 22:32:33 +0000 (19:32 -0300)
kvmx

diff --git a/kvmx b/kvmx
index 2d6d7a74ce7c2e6e7c2d0cd8c6398e32be4a77b7..eb1ee5b8326f676b5dd423730f46360797caf0a5 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -464,8 +464,12 @@ function kvmx_up {
   fi
 
   if [ -z "$net" ] || [ "$net" == "user" ]; then
-    #net_opts="user,hostfwd=tcp:127.0.0.1:$SSH-:22,hostfwd=udp:127.0.0.1:$XDMCP_PORT-:177$hostfwd -net nic,model=$nic_model"
-    net_opts="user,hostfwd=tcp:127.0.0.1:$SSH-:22$hostfwd -net nic,model=$nic_model"
+    if [ "$new_qemu" == "0" ]; then
+      #net_opts="user,hostfwd=tcp:127.0.0.1:$SSH-:22,hostfwd=udp:127.0.0.1:$XDMCP_PORT-:177$hostfwd -net nic,model=$nic_model"
+      net_opts="user,hostfwd=tcp:127.0.0.1:$SSH-:22$hostfwd -net nic,model=$nic_model"
+    else
+      net_opts="user,id=net0,hostfwd=tcp:127.0.0.1:$SSH-:22$hostfwd -net nic,model=$nic_model"
+    fi
   elif [ "$net" == "tap" ]; then
     # Thanks to kvm-manager
     tap="${VM}0"