Can't add a second network interface to Guest VM

We have a server with two network interfaces, br0 and br1, connected to different LANs. By default, the guest come up with an IP from LAN0. We now configured LAN1 (eth1 via br1) and as we try to add an interface to a guest the result is:

Failed to save network interface : QEMU 0.12.1 monitor - type 'help' for more information (qemu) p[K[Dpc[K[D[Dpci[K[D[D[Dpci_[K[D[D[D[Dpci_a[K[D[D[D[D[Dpci_ad[K[D[D[D[D[D[Dpci_add[K[D[D[D[D[D[D[Dpci_add [K[D[D[D[D[D[D[D[Dpci_add a[K[D[D[D[D[D[D[D[D[Dpci_add au[K[D[D[D[D[D[D[D[D[D[Dpci_add aut[K[D[D[D[D[D[D[D[D[D[D[Dpci_add auto[K[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto [K[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto n[K[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto ni[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic [K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic m[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic mo[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic mod[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic mode[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=v[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=vi[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=vir[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=virt[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=virti[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=virtio[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=virtio,[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=virtio,v[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=virtio,vl[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=virtio,vla[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=virtio,vlan[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=virtio,vlan=[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dpci_add auto nic model=virtio,vlan=1[K unknown command: 'pci_add' (qemu)

I'm attaching a screenshot of the GUI interface creation parameters. This is Cloudmin Pro with KVM.

Status: 
Closed (fixed)

Comments

This problem is due to the machine being running! You should check for this condition and disabling interface editing under that circumstance.

It looks like the KVM monitor console on your system didn't accept the pci_add command.

If possible, you might want to try shutting down the VM, adding the network interface, then starting it up again. I would be interested to know if that works.

I confirm that shutting down makes it work, but you are missing a safety check!

IMHO, one needs to have the GUI locked down against this kind of misusage so that the whole admin experience improves.

Actually, adding an interface to a running VM should work - KVM has a command that can be run via it's monitor console that does this. And it works OK on my test systems.

Which KVM version are you running there? And is it the version that was supplied with your Linux distribution, or was it installed separately?

This is plain Centos6. Kvm is what comes with the distribution.

If the operation may or may not work you can check the return code and handle errors gracefully. It is ok to have to shutdown. It's just the err mess age that looks bad.

That's a good idea - I will change the behavior of Cloudmin to better handle that failure mode in future.

Cloudmin 7.0 handles this case better.

Automatically closed -- issue fixed for 2 weeks with no activity.