• M
    Store the interface vlan number in the domain state · 30605477
    Mark McLoughlin 提交于
    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
    30605477
qemu_conf.c 99.7 KB