1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| qemu-system-x86_64 -enable-kvm -m 2048 -smp 4 \ -chardev socket,id=char0,path=/usr/local/var/run/openvswitch/vhost-user1 \ -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ -device virtio-net-pci,netdev=mynet1,mac=52:54:00:02:d9:01 \ -object memory-backend-file,id=mem,size=2048M,mem-path=/dev/hugepages,share=on \ -numa node,memdev=mem -mem-prealloc \ -net user,hostfwd=tcp::10021-:22 -net nic \ ./qemu-vm1.img
qemu-system-x86_64 -enable-kvm -m 2048 -smp 4 \ -chardev socket,id=char0,path=/usr/local/var/run/openvswitch/vhost-user2 \ -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ -device virtio-net-pci,netdev=mynet1,mac=52:54:00:02:d9:02 \ -object memory-backend-file,id=mem,size=2048M,mem-path=/dev/hugepages,share=on \ -numa node,memdev=mem -mem-prealloc \ -net user,hostfwd=tcp::10022-:22 -net nic \ ./qemu-vm2.img &
|