Problem with xen hvm DomU

Jim Fehlig jfehlig at suse.com
Fri Jan 8 00:28:38 UTC 2021


While doing some new year mail cleaning I noticed this unanswered mail. It is 
quite old so perhaps you've figured something out in the meantime.

On 9/10/20 7:31 AM, Christoph wrote:
> I think its again a translate error of domxml-from-native...
> 
> This is the line in xl config:
> 
> vif = [
> "mac=00:16:3e:05:30:04,bridge=xenbr5,script=vif-bridge,type=vif",
> "mac=00:16:3e:04:30:04,bridge=xenbr4,script=vif-bridge,type=vif",
> "mac=00:16:3e:15:30:04,bridge=xenbr15,script=vif-bridge,type=vif",
> "mac=00:16:3e:14:30:04,bridge=xenbr14,script=vif-bridge,type=vif" ]
> 
> in xen if I want to use more than 3 nic's I need to define the
> "type=vif". With default or e1000 as type it doesnt work for >3 nic's
> 
> The translated config is:
> 
> <interface type='bridge'>
>        <mac address='00:16:3e:05:30:04'/>
>        <source bridge='xenbr5'/>
>        <script path='vif-bridge'/>
>        <model type='netfront'/>
> </interface>
> ...

This translation is correct.

> there is the type "netfront" and nothing about type=vif. I've tried to
> set it to model type='vif' but it doesnt work to...

Long ago the Xen PV NIC model was known as "netfront", and for better or worse 
the name was exposed in the libvirt domXML schema. When the Xen community 
ditched xend in favor of libxl, the specification of emulated 
(LIBXL_NIC_TYPE_VIF_IOEMU) vs PV (LIBXL_NIC_TYPE_VIF) NIC was moved to the 
'nictype' field of the NIC definition. Compatibility guarantees of libvirt 
schema prevent changing the model from "netfront" to "vif". The latter could be 
added to the schema as another way of specifying a PV NIC model, but we already 
have "netfront" and another would only add more confusion IMO :-).

Regardless of the name used in the libvirt schema, the libxl driver should be 
doing the right thing and mapping <model type='netfront'/> to 
LIBXL_NIC_TYPE_VIF. I tested an HVM guest with 4 "netfront" interfaces and 
didn't notice any problems. What version of libvirt are you using?

Regards,
Jim

> Am 09.09.2020 05:12, schrieb Jim Fehlig:
>> On 9/8/20 7:55 AM, Christoph wrote:
>>> It seems there is a problem with more than 3 NIC's... If I delete one
>>> nick from the config then it starts without problems...
>>
>> Wow, that's not good :-). I took a quick peek at the code but didn't
>> spot anything obvious. Since I don't have time to investigate further
>> now, perhaps it would be best to track this in the gitlab issue
>> tracker
>>
>> https://gitlab.com/libvirt/libvirt/-/issues
>>
>> Can you create a new issue there? Thanks!
>>
>> Regards,
>> Jim
>>
>>>
>>> ---
>>> ------
>>> Greetz
>>>
>>> Am 03.09.2020 14:28, schrieb Christoph:
>>>> Hi
>>>>
>>>> can someone say me whats wrong in this config:
>>>>
>>>> <domain type='xen'>
>>>>   <name>fenrir.chao5.int</name>
>>>>   <uuid>7aedcd03-54e8-4055-8d1b-37dd34194859</uuid>
>>>>   <memory unit='KiB'>2097152</memory>
>>>>   <currentMemory unit='KiB'>2097152</currentMemory>
>>>>   <vcpu placement='static'>2</vcpu>
>>>>   <os>
>>>>     <type arch='x86_64' machine='xenfv'>hvm</type>
>>>>     <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
>>>>     <kernel>/usr/lib64/xen/boot/hvmloader</kernel>
>>>>     <boot dev='hd'/>
>>>>   </os>
>>>>   <features>
>>>>     <acpi/>
>>>>     <apic/>
>>>>     <pae/>
>>>>   </features>
>>>>   <clock offset='variable' adjustment='0' basis='localtime'/>
>>>>   <on_poweroff>destroy</on_poweroff>
>>>>   <on_reboot>restart</on_reboot>
>>>>   <on_crash>restart</on_crash>
>>>>   <devices>
>>>>     <disk type='file' device='disk'>
>>>>       <driver name='qemu' type='raw'/>
>>>>       <source file='/dev/vg_astarte/lv_fenrir_root'/>
>>>>       <target dev='hda' bus='ide'/>
>>>>       <address type='drive' controller='0' bus='0' target='0'
>>>> unit='0'/>
>>>>     </disk>
>>>>     <disk type='file' device='disk'>
>>>>       <driver name='qemu' type='raw'/>
>>>>       <source file='/dev/vg_astarte/lv_fenrir_swap'/>
>>>>       <target dev='hdb' bus='ide'/>
>>>>       <address type='drive' controller='0' bus='0' target='0'
>>>> unit='1'/>
>>>>     </disk>
>>>>     <controller type='xenbus' index='0'/>
>>>>     <controller type='ide' index='0'/>
>>>>     <interface type='bridge'>
>>>>       <mac address='00:16:3e:05:30:04'/>
>>>>       <source bridge='xenbr5'/>
>>>>       <script path='vif-bridge'/>
>>>>       <model type='netfront'/>
>>>>     </interface>
>>>>     <interface type='bridge'>
>>>>       <mac address='00:16:3e:04:30:04'/>
>>>>       <source bridge='xenbr4'/>
>>>>       <script path='vif-bridge'/>
>>>>       <model type='netfront'/>
>>>>     </interface>
>>>>     <interface type='bridge'>
>>>>       <mac address='00:16:3e:15:30:04'/>
>>>>       <source bridge='xenbr15'/>
>>>>       <script path='vif-bridge'/>
>>>>       <model type='netfront'/>
>>>>     </interface>
>>>>     <interface type='bridge'>
>>>>       <mac address='00:16:3e:14:30:04'/>
>>>>       <source bridge='xenbr14'/>
>>>>       <script path='vif-bridge'/>
>>>>       <model type='netfront'/>
>>>>     </interface>
>>>>     <input type='mouse' bus='ps2'/>
>>>>     <input type='keyboard' bus='ps2'/>
>>>>     <graphics type='vnc' port='6000' autoport='no' listen='0.0.0.0'>
>>>>       <listen type='address' address='0.0.0.0'/>
>>>>     </graphics>
>>>>     <video>
>>>>       <model type='cirrus' vram='8192' heads='1' primary='yes'/>
>>>>     </video>
>>>>     <memballoon model='xen'/>
>>>>   </devices>
>>>> </domain>
>>>>
>>>> If I try to start it with virsh create... then I see only:
>>>>
>>>> error: Failed to create domain from
>>>> /etc/libvirt/libxl/fenrir.chao5.int.xml
>>>> error: internal error: libxenlight failed to create new domain
>>>> 'fenrir.chao5.int'
>>>>
>>>> ------
>>>> Greetz
>>>
>>>
> 





More information about the libvirt-users mailing list