[libvirt] [PATCH 08/10] libxl: support domain config modification in virDomainRestoreFlags
Marek Marczykowski-Górecki
marmarek at invisiblethingslab.com
Thu Feb 19 19:59:19 UTC 2015
On Thu, Feb 19, 2015 at 11:59:38AM -0700, Jim Fehlig wrote:
> Marek Marczykowski-Górecki wrote:
> > Signed-off-by: Marek Marczykowski-Górecki <marmarek at invisiblethingslab.com>
> > ---
> >
> > There was a discussion about calling virDomainDefCheckABIStability. The use
> > case I have for this is to start multiple domains from the same savefile.
>
> Interesting use case...
If you're curious about details, it is used for DisposableVMs in Qubes
OS:
http://theinvisiblethings.blogspot.com/2010/06/disposable-vms.html
Basically to speedup domain startup (with some preloaded applications
etc). Domain state is discarded after its termination (disk image is
read-only).
> > This require changing:
> > - UUID
> > - name
> > - IP address
> >
>
> Did you mean mac address? I don't see where the
> virtDomain*CheckABIStability() functions check for changes to IP addresses.
Of course, I mean MAC address (in addition to IP address).
> > Those are exactly type of changes blocked by virDomainDefCheckABIStability.
> > Perhaps some "permissive" mode should be introduced to the
> > virDomainDefCheckABIStability function?
> >
>
> I'd like to hear what others think about this proposal. Are UUID and
> name really part of a domain's ABI?
At least by the implementation of virDomainDefCheckABIStability...
Comment says this is to not confuse domain during migration.
> Regards,
> Jim
>
> > src/libxl/libxl_driver.c | 17 ++++++++++++-----
> > 1 file changed, 12 insertions(+), 5 deletions(-)
> >
> > diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
> > index 005cc96..7539d33 100644
> > --- a/src/libxl/libxl_driver.c
> > +++ b/src/libxl/libxl_driver.c
> > @@ -1456,11 +1456,6 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
> > #endif
> >
> > virCheckFlags(VIR_DOMAIN_SAVE_PAUSED, -1);
> > - if (dxml) {
> > - virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
> > - _("xml modification unsupported"));
> > - return -1;
> > - }
> >
> > fd = libxlDomainSaveImageOpen(driver, cfg, from, &def, &hdr);
> > if (fd < 0)
> > @@ -1469,6 +1464,18 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
> > if (virDomainRestoreFlagsEnsureACL(conn, def) < 0)
> > goto cleanup_unlock;
> >
> > + if (dxml) {
> > + virDomainDefPtr def2 = NULL;
> > +
> > + if (!(def2 = virDomainDefParseString(dxml, cfg->caps, driver->xmlopt,
> > + 1 << VIR_DOMAIN_VIRT_XEN,
> > + VIR_DOMAIN_XML_INACTIVE))) {
> > + goto cleanup;
> > + }
> > + virDomainDefFree(def);
> > + def = def2;
> > + }
> > +
> > if (!(vm = virDomainObjListAdd(driver->domains, def,
> > driver->xmlopt,
> > VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
> >
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150219/056a8c46/attachment-0001.sig>
More information about the libvir-list
mailing list