
On Mon, 2009-07-20 at 17:26 +0100, Daniel P. Berrange wrote:
On Mon, Jul 20, 2009 at 12:51:18PM +0100, Mark McLoughlin wrote:
Currently, an interface's vlan number corresponds to its index in the table of network interfaces. That is no longer true when we allow devices to be removed.
To fix this, we store the vlan number in the domain's state XML so that it survives libvirtd restarts.
* src/domain_conf.h: add vlan number to virDomainNetDef
* src/domain_conf.c: store it in XML as <state vlan='N'/>, defaulting to -1 if this is state saved by a previous version of libvirt
* src/qemu_conf.c: assign vlan numbers before starting qemu
Am I right in thinking we only need to preserve this info so that we can figure out the next free VLAN number for hot-plug ?
Nope, it's very lamely needed for the the "host_net_remove" monitor command even thought the net client names are global Cheers, Mark.