[libvirt-users] Guest interface names not same as configured name

Laine Stump laine at redhat.com
Thu Apr 4 21:35:41 UTC 2019


On 4/4/19 2:02 PM, PR PR wrote:
> Hi,
> 
> I am creating a guest with following description for interfaces in the 
> xml using virsh create xml command. For some reason, the guest interface 
> names in the VM dont match the names specified in the xml. Is there a 
> way to make guest interface names predictable?

For qemu (which you've indicating you're using) there isn't any way to 
set the name of the network device in the guest from the libvirt config. 
There is no visibility of the <guest dev='xxx'> element into the guest 
OS; all that the guest can know is that there is an e1000 ethernet 
device plugged into PCI bus 0 slot 3, and it has MAC address 
52:54:00:17:0b:e7. Any determination of name must be done within the 
guest OS.

The <guest dev='blah'> element is only used by the LXC and openvz 
drivers. It really should be flagged as an error during validation for 
other drivers (patches welcome :-).


> 
> Following is the qemu version on host
> 
> dpkg --list | grep -i qemu
> ii  qemu-kvm                              1:2.11+dfsg-1ubuntu7.10        
>          amd64        QEMU Full virtualization on x86 hardware
> 
>      <interface type='user'>
>        <mac address='52:54:00:17:0b:e7'/>
>        <guest dev='eth0'/>
>        <model type='e1000'/>
>        <alias name='net0'/>
>        <address type='pci' domain='0x0000' bus='0x00' slot='0x03' 
> function='0x0'/>
>      </interface>
>      <interface type='ethernet'>
>        <mac address='52:54:00:ee:70:34'/>
>        <target dev='net0'/>
>        <guest dev='Ethernet0'/>
>        <model type='rtl8139'/>
>        <alias name='net1'/>
>        <address type='pci' domain='0x0000' bus='0x00' slot='0x05' 
> function='0x0'/>
>      </interface>
> 
> Thanks
> 
> _______________________________________________
> libvirt-users mailing list
> libvirt-users at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users
> 




More information about the libvirt-users mailing list