I've been recently playing with integrating VMX Phase 2 into EVE-NG / Unetlab and even did some changes to the pre-existing templates (after comparing with the parameters that Juniper used in their startup script for launching the 2 x VMs they use for VMX Phase 2: VCP - control plane, VFP - forwarding plane).
VMX Version - 16.2R1.6.
I am only running one LAB (this one with my test VMX Phase 2, only one instance), 64 GB allocated from 512 to this machine.
CPU = 2 x 12 core Intel E5-2695 v2.
This is not a resource issue
VCP - 2 interfaces (one is e1000, one virtio = interconnect VFP)
VFP - 6 interfaces (one mgmt=em0, one interconnect with VCP=em1, the other 4 are the visible interfaces with the OS = em2,3,4,5)
Long story short:
em2 is visible upon initial boot of VFP but when the Juniper init scripts make it invisible on the VFP and visible on the VCP (basically the two VMs communicate and establish their link), then it is completely gone (it fails to appear on the VCP).
I believed this to be a Juniper problem at the beginning until I began to reverse engineer what was happening.
When EVE-NG starts VFP by itself, then this strange behavior happens.
If I take the last command the EVE-NG uses (the final qemu-system-x86_x64 line) from "ps -ef | grep -i vfp) and run it by hand, then I have no problem anymore and this interface does not disappear anymore.
Does the qemu_wrapper do anything special which might trigger this?
Why do I see 4 things started when I do "ps -ef |grep -i vfp"? (one qemu-wrapper I have a hunch at what it might be, one qemu-system-x86_64 also as it is started by the wrapper but why do i see another line with wrapper and another one with qemu-system-x86_64?)
I'm not sure what happens and why when I start it by hand it works and when it goes via the qemu-wrapper, then an interface goes away (always em2).
Software versions used:
Code: Select all
ii eve-ng 2.0.2-26 amd64 A new generation software for networking labs.
ii eve-ng-dynamips 2.0.2-2 amd64 Dynamips files for Eve-NG.
ii eve-ng-guacamole 2.0.1-60 amd64 Guacamole for UNetLab/EVE-NG
ii eve-ng-qemu 2.0.2-16 amd64 QEMU files for Eve-NG.
ii eve-ng-schema 2.0.1-60 amd64 Database schema for UNetLab/EVE-NG
ii eve-ng-vpcs 1.0-eve-ng amd64 vpcs Eve-NG compatible
Code: Select all
$p['qemu_nic'] = 'virtio-net-pci';
#$p['qemu_options'] = '-machine type=pc-1.0,accel=kvm -serial mon:stdio -nographic -cpu host -smbios type=0,vendor=Juniper -smbios type=1,manufacturer=VMX,product=VM-vcp_vmx1-161-re-0,version=0.1.0 -hdb vmxhdd.qcow2 -hdc metadata.qcow2';
$p['qemu_options'] = '-machine type=pc-0.13,accel=kvm -serial mon:stdio -nographic -cpu host -smbios type=0,vendor=Juniper -smbios type=1,manufacturer=VMX,product=VM-vcp_vmx1-161-re-0,version=0.1.0 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -hdb vmxhdd.qcow2 -no-user-config -nodefaults -drive file=metadata.qcow2,format=qcow2,if=none,id=drive-usb-disk0,cache=directsync -device usb-storage,drive=drive-usb-disk0,id=usb-disk0,removable=off';
?>
Code: Select all
$p['qemu_nic'] = 'virtio-net-pci';
$p['qemu_options'] = '-machine type=pc-i440fx-trusty,accel=kvm -serial mon:stdio -nographic -nodefaults -cpu IvyBridge,+hypervisor,+osxsave,+pcid,+vmx,+ss,+ds -no-user-config -nodefaults';
?>
"ps -ef | grep -i vfp"
Code: Select all
root 11156 1 0 11:25 ? 00:00:00 /opt/unetlab/wrappers/qemu_wrapper -T 0 -D 2 -t vMX-VFP -F /opt/qemu/bin/qemu-system-x86_64 -d 0 -- -nographic -device virtio-net-pci,netdev=net0,mac=50:00:00:02:00:00 -netdev tap,id=net0,ifname=vunl0_2_0,script=no -device virtio-net-pci,netdev=net1,mac=50:00:00:02:00:01 -netdev tap,id=net1,ifname=vunl0_2_1,script=no -device virtio-net-pci,netdev=net2,mac=50:00:00:02:00:02 -netdev tap,id=net2,ifname=vunl0_2_2,script=no -device virtio-net-pci,netdev=net3,mac=50:00:00:02:00:03 -netdev tap,id=net3,ifname=vunl0_2_3,script=no -device virtio-net-pci,netdev=net4,mac=50:00:00:02:00:04 -netdev tap,id=net4,ifname=vunl0_2_4,script=no -device virtio-net-pci,netdev=net5,mac=50:00:00:02:00:05 -netdev tap,id=net5,ifname=vunl0_2_5,script=no -smp 4 -m 6144 -name vMX-VFP -uuid 744e7715-3f6f-421e-a42a-c85080dfe1c5 -hda hda.qcow2 -machine type=pc-i440fx-trusty,accel=kvm -serial mon:stdio -nographic -nodefaults -cpu IvyBridge,+hypervisor,+osxsave,+pcid,+vmx,+ss,+ds -no-user-config -nodefaults
root 11207 11156 0 11:25 ? 00:00:00 /opt/unetlab/wrappers/qemu_wrapper -T 0 -D 2 -t vMX-VFP -F /opt/qemu/bin/qemu-system-x86_64 -d 0 -- -nographic -device virtio-net-pci,netdev=net0,mac=50:00:00:02:00:00 -netdev tap,id=net0,ifname=vunl0_2_0,script=no -device virtio-net-pci,netdev=net1,mac=50:00:00:02:00:01 -netdev tap,id=net1,ifname=vunl0_2_1,script=no -device virtio-net-pci,netdev=net2,mac=50:00:00:02:00:02 -netdev tap,id=net2,ifname=vunl0_2_2,script=no -device virtio-net-pci,netdev=net3,mac=50:00:00:02:00:03 -netdev tap,id=net3,ifname=vunl0_2_3,script=no -device virtio-net-pci,netdev=net4,mac=50:00:00:02:00:04 -netdev tap,id=net4,ifname=vunl0_2_4,script=no -device virtio-net-pci,netdev=net5,mac=50:00:00:02:00:05 -netdev tap,id=net5,ifname=vunl0_2_5,script=no -smp 4 -m 6144 -name vMX-VFP -uuid 744e7715-3f6f-421e-a42a-c85080dfe1c5 -hda hda.qcow2 -machine type=pc-i440fx-trusty,accel=kvm -serial mon:stdio -nographic -nodefaults -cpu IvyBridge,+hypervisor,+osxsave,+pcid,+vmx,+ss,+ds -no-user-config -nodefaults
root 11208 11207 0 11:25 ? 00:00:00 sh -c /opt/qemu/bin/qemu-system-x86_64 -nographic -device virtio-net-pci,netdev=net0,mac=50:00:00:02:00:00 -netdev tap,id=net0,ifname=vunl0_2_0,script=no -device virtio-net-pci,netdev=net1,mac=50:00:00:02:00:01 -netdev tap,id=net1,ifname=vunl0_2_1,script=no -device virtio-net-pci,netdev=net2,mac=50:00:00:02:00:02 -netdev tap,id=net2,ifname=vunl0_2_2,script=no -device virtio-net-pci,netdev=net3,mac=50:00:00:02:00:03 -netdev tap,id=net3,ifname=vunl0_2_3,script=no -device virtio-net-pci,netdev=net4,mac=50:00:00:02:00:04 -netdev tap,id=net4,ifname=vunl0_2_4,script=no -device virtio-net-pci,netdev=net5,mac=50:00:00:02:00:05 -netdev tap,id=net5,ifname=vunl0_2_5,script=no -smp 4 -m 6144 -name vMX-VFP -uuid 744e7715-3f6f-421e-a42a-c85080dfe1c5 -hda hda.qcow2 -machine type=pc-i440fx-trusty,accel=kvm -serial mon:stdio -nographic -nodefaults -cpu IvyBridge,+hypervisor,+osxsave,+pcid,+vmx,+ss,+ds -no-user-config -nodefaults
root 11214 11208 99 11:25 ? 00:08:37 /opt/qemu/bin/qemu-system-x86_64 -nographic -device virtio-net-pci,netdev=net0,mac=50:00:00:02:00:00 -netdev tap,id=net0,ifname=vunl0_2_0,script=no -device virtio-net-pci,netdev=net1,mac=50:00:00:02:00:01 -netdev tap,id=net1,ifname=vunl0_2_1,script=no -device virtio-net-pci,netdev=net2,mac=50:00:00:02:00:02 -netdev tap,id=net2,ifname=vunl0_2_2,script=no -device virtio-net-pci,netdev=net3,mac=50:00:00:02:00:03 -netdev tap,id=net3,ifname=vunl0_2_3,script=no -device virtio-net-pci,netdev=net4,mac=50:00:00:02:00:04 -netdev tap,id=net4,ifname=vunl0_2_4,script=no -device virtio-net-pci,netdev=net5,mac=50:00:00:02:00:05 -netdev tap,id=net5,ifname=vunl0_2_5,script=no -smp 4 -m 6144 -name vMX-VFP -uuid 744e7715-3f6f-421e-a42a-c85080dfe1c5 -hda hda.qcow2 -machine type=pc-i440fx-trusty,accel=kvm -serial mon:stdio -nographic -nodefaults -cpu IvyBridge,+hypervisor,+osxsave,+pcid,+vmx,+ss,+ds -no-user-config -nodefaults
When running the last command from above manually in the console, all works ok:
Code: Select all
/opt/qemu/bin/qemu-system-x86_64 -nographic -device virtio-net-pci,netdev=net0,mac=50:00:00:02:00:00 -netdev tap,id=net0,ifname=vunl0_2_0,script=no -device virtio-net-pci,netdev=net1,mac=50:00:00:02:00:01 -netdev tap,id=net1,ifname=vunl0_2_1,script=no -device virtio-net-pci,netdev=net2,mac=50:00:00:02:00:02 -netdev tap,id=net2,ifname=vunl0_2_2,script=no -device virtio-net-pci,netdev=net3,mac=50:00:00:02:00:03 -netdev tap,id=net3,ifname=vunl0_2_3,script=no -device virtio-net-pci,netdev=net4,mac=50:00:00:02:00:04 -netdev tap,id=net4,ifname=vunl0_2_4,script=no -device virtio-net-pci,netdev=net5,mac=50:00:00:02:00:05 -netdev tap,id=net5,ifname=vunl0_2_5,script=no -smp 4 -m 6144 -name vMX-VFP -uuid 744e7715-3f6f-421e-a42a-c85080dfe1c5 -hda hda.qcow2 -machine type=pc-i440fx-trusty,accel=kvm -serial mon:stdio -nographic -nodefaults -cpu IvyBridge,+hypervisor,+osxsave,+pcid,+vmx,+ss,+ds -no-user-config -nodefaults
Thanks,
Mihai