Re: Why host device disappear in libvirt doman xml?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 9/26/22 15:06, 陈新隆 wrote:
> <>
> I'm using Kubevirt to manage my virtual machine instances. When I using
> Kubevirt to create a vm(with two GPUs), kubevirt will generate a libvirt
> guest domain xml for this vm which includes two GPUs, the domain xml as
> follow :
> |<hostdev mode='subsystem' type='pci' managed='no'> <driver
> name='vfio'/> <source> <address domain='0x0000' bus='0x83' slot='0x00'
> function='0x0'/> </source> <alias name='ua-gpu-gpu0'/> <address
> type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
> </hostdev> <hostdev mode='subsystem' type='pci' managed='no'> <driver
> name='vfio'/> <source> <address domain='0x0000' bus='0x84' slot='0x00'
> function='0x0'/> </source> <alias name='ua-gpu-gpu1'/> <address
> type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
> </hostdev> |
> No one ever edit this domain xml, but these two |hostdev| element
> disappeared in the domain xml. During this time, I've run
> the |gpu_burn| command to do a stress test for these two GPUs.
> My question is :
>   * when will libvirtd change the guest domain xml ?
>   * why libvirtd delete these two |hostdev| from domain xml ?

Libvirt does not remove anything from domain XML (except for the
elements it does not understand, but this is not the case). My suspicion
is that you're looking at live XML instead of inactive XML or vice
versa. Libvirt allows guests to be defined (i.e. libvirt manages their
inactive definition). However, a guest can be started with wildly
different configuration (e.g. without those two <hostdev/>-s). OR, they
might have been hot-unplugged.

This article can explain more details:


[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux