Re: Updating domains definitions via API

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


On 5/14/22 21:23, Darragh Bailey wrote:
> On Fri, 13 May 2022 at 00:17, Darragh Bailey <daragh.bailey@xxxxxxxxx
> <mailto:daragh.bailey@xxxxxxxxx>> wrote:
>     Hi,
>     On Thu 12 May 2022, 21:34 Laine Stump, <laine@xxxxxxxxxx
>     <mailto:laine@xxxxxxxxxx>> wrote:
>         The virDomainDefineXMLFlags API (and also the older/deprecated
>         virDomainDefineXML API) doesn't require that the domain first be
>         undefined (with one notable exception - see below[*]). If you
>         define a
>         domain that already exists with the same name and uuid, then the
>         effect
>         is to "redefine" (or "update" if you prefer) the existing domain
>         of that
>         name. If the domain is currently active, then the changes will take
>         effect the next time the domain is shut down ("Destroy"ed in
>         libvirt API
>         parlance) and re-started.
> Unfortunately trying to call this via ruby-libvirt doesn't appear to
> behave as expected. It appears that if I add an nvram element without a
> loader element to the os block, the following code block will execute
> without issue but also without changing the domain XML:

I think that's kind of expected. If you take a look how libvirt parses
that part of XML:

if no <loader/> is found then the function exits early without looking
at <nvram/> at all. It kind of makes sense - what good does nvram do
without loader?


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

  Powered by Linux