GNS3 中的 QEMU 参数“vlan”无效

Pha*_*han 2 qemu virtual-machine

我是 GNS3 和 qemu 的新手,需要使用这个工具。
我需要使用现有的项目 GNS3,但 QEMU 有问题。

当我尝试启动 GNS3 项目时,收到此错误:

QEMU process has stopped, return code: 1
Start QEMU with /usr/bin/qemu-system-x86_64 -name Bob -m 256M -smp cpus=1 -enable-kvm -machine smm=off -boot order=c -drive file=/home/name/GNS3/projects/LabCybersecurity/project-files/qemu/c38ee3b0-8557-4d69-b9ce-318fdd23810a/hda_disk.qcow2,if=ide,index=0,media=disk -uuid c38ee3b0-8557-4d69-b9ce-318fdd23810a -serial telnet:127.0.0.1:5006,server,nowait -monitor tcp:127.0.0.1:44319,server,nowait -net none -net nic,vlan=0,macaddr=00:4c:72:81:0a:00,model=e1000 -net socket,vlan=0,name=gns3-0,udp=127.0.0.1:10065,localaddr=127.0.0.1:10064 -vga none -vnc none

Execution log:
qemu-system-x86_64: Invalid parameter 'vlan'
Run Code Online (Sandbox Code Playgroud)

如何解决这个问题?

Pet*_*ell 7

-net 的“vlan”参数在 QEMU 2.9.0 中已弃用,并在后续版本中删除。您需要更新命令行才能使用它。以下是有关此弃用的手册文本:

“-net vlan=NN”参数主要用于将单独的网络后端附加到不同的虚拟网卡。这是“-netdev”和“-nic”的默认行为。您可以使用“hubport”网络后端将多个“-netdev”和“-nic”设备连接到同一网络,该后端由“-netdev hubport,hubid=NN,...”和“-nic hubport,hubid=NN 创建” ”。

因此,根据您想要执行的操作,您可能需要删除 vlan 参数,或者将其替换为涉及集线器端口的参数。