Custom interface names with <interface type='ethernet'> does not start qemu
Bug #1574957 reported by
Matt Mullins
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Starting up a VM with the following <interface> definition fails in libvirt 1.3.1-1ubuntu10 with "error: Unable to get index for interface vm28_0: No such device":
<interface type='ethernet'>
<mac address=
<script path='no'/>
<target dev='vm28_0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
If I remove the <target> definition, the VM starts, but with the interface named tap0.
The above interface definition does work on trusty, and it also works on a locally-built package with libvirt 1.3.3.
tags: | added: server-next |
To post a comment you must log in.
I have verified that 4bbe1029f2fb6cd 1c102794951a944 c62fdbd0e6 "qemu: fix ifindex array reported to systemd" introduced this bug since it added a call to virNetDevGetIndex for all VIR_DOMAIN_ NET_TYPE_ ETHERNET devices with a known name, even if the device hasn't been created yet. I believe 9c17d665fdc5f0a b74500a14c30627 014c11b2c0 "autocreate tap device for ethernet network type" fixes it by creating the tap device in the libvirt process. This commit is included in 1.3.3.
It can be worked-around by calling tunctl outside of libvirt, but it would be cleaner to have libvirt manage the lifetime of the device (by way of holding the /dev/net/tun fd). What needs to happen to get this change included?