0

I am using centos 7.4 on the host machine & using qemu 2.6. Below is the command I am using to bring up the VM's . When I bring up the VM individually it just works fine, only when I bring up both the VM's the first VM hangs, but the secondly launched VM is just working fine.

I doubt if this is due to same IP getting assigned? I don't know how to assign different IP's while bring up. Initially the mac address were same for both the VMs and I though the issue is due to that and modified using device e1000,netdev=net11,mac=DE:AD:BE:EF:54:09, but it is still hangs.

1st VM initiation

taskset -c 50-52 /root/qemu/x86_64-softmmu/qemu-system-x86_64 -m 8192M \
 -smp cores=3,threads=0,sockets=1 -cpu host \
 -drive file=/home/QEMU/ubuntu-17.10-VM3-vm1.img,if=virtio \
 -boot c -enable-kvm -pidfile /tmp/ubuntu-17.10-VM3-kvm-vm1.pid \
 -monitor unix:/tmp/ubuntu-17.10-VM3-kvmmonitor-vm1,server,nowait \
 -name 'VM2' -vnc :2 --nographic -object memory-backend-file,id=mem,size=8192M,mem-path=/hugetlbfs,share=on \
 -device e1000,netdev=net10,mac=DE:AD:BE:EF:7D:F4 \
 -numa node,memdev=mem -chardev socket,id=char1,path=/tmp/vpp/sock1.sock \
 -netdev type=vhost-user,id=net1,chardev=char1,vhostforce \
 -device virtio-net-pci,netdev=net1,mac=00:00:00:00:00:01,csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off,mrg_rxbuf=off \
 -chardev socket,id=char2,path=/tmp/vpp/sock2.sock \
 -netdev type=vhost-user,id=net2,chardev=char2,vhostforce \
 -device virtio-net-pci,netdev=net2,mac=00:00:00:00:00:02,csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off,mrg_rxbuf=off \
 -netdev user,id=net10,hostfwd=tcp::10024-:22

2nd VM initiation

taskset -c 53-55 /root/qemu/x86_64-softmmu/qemu-system-x86_64 -m 8192M \
 -smp cores=3,threads=0,sockets=1 -cpu host \
 -drive file=/home/QEMU/ubuntu-17.10-VM3-vm2.img,if=virtio \
 -boot c -enable-kvm -pidfile /tmp/ubuntu-17.10-VM3-kvm-vm2.pid \
 -monitor unix:/tmp/ubuntu-17.10-VM3-kvmmonitor-vm2,server,nowait \
 -name 'VM3' -vnc :3 --nographic -object memory-backend-file,id=mem,size=8192M,mem-path=/hugetlbfs,share=on \
 -device e1000,netdev=net11,mac=DE:AD:BE:EF:54:09 \
 -numa node,memdev=mem -chardev socket,id=char3,path=/tmp/vpp/sock3.sock \
 -netdev type=vhost-user,id=net3,chardev=char3,vhostforce \
 -device virtio-net-pci,netdev=net3,mac=00:00:00:00:00:03,csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off,mrg_rxbuf=off \
 -chardev socket,id=char4,path=/tmp/vpp/sock4.sock \
 -netdev type=vhost-user,id=net4,chardev=char4,vhostforce \
 -device virtio-net-pci,netdev=net4,mac=00:00:00:00:00:04,csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off,mrg_rxbuf=off \
 -netdev user,id=net11,hostfwd=tcp::10025-:22
[root@test-new-vpp-server QEMU]#

I could bring up the VM individually, see below, I was able to login and ref the mac addresses.

1st VM

root@ubuntu-17:~# ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 fec0::dcad:beff:feef:7df4  prefixlen 64  scopeid 0x40<site>
        inet6 fe80::dcad:beff:feef:7df4  prefixlen 64  scopeid 0x20<link>
        ether de:ad:be:ef:7d:f4  txqueuelen 1000  (Ethernet)
        RX packets 56  bytes 7145 (7.1 KB)
        RX errors 22  dropped 0  overruns 0  frame 22
        TX packets 75  bytes 9140 (9.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 98  bytes 7186 (7.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 98  bytes 7186 (7.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

2nd VM

root@ubuntu-17:~# ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 fec0::dcad:beff:feef:5409  prefixlen 64  scopeid 0x40<site>
        inet6 fe80::dcad:beff:feef:5409  prefixlen 64  scopeid 0x20<link>
        ether de:ad:be:ef:54:09  txqueuelen 1000  (Ethernet)
        RX packets 51  bytes 6847 (6.8 KB)
        RX errors 19  dropped 0  overruns 0  frame 19
        TX packets 54  bytes 7614 (7.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 102  bytes 7898 (7.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 102  bytes 7898 (7.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@ubuntu-17:~#
  • I have tried using below command to give IP while bring up , but the vm still come up with the default 10.0.2.15 ip only .. -net nic,model=e1000,macaddr=DE:AD:BE:EF:54:09 -net user,net=192.168.1.0/24,dhcpstart=192.168.1.1,host=192.168.1.2 \ – Devis May 8 at 5:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.