[Libvir] [PATCH] Allow virDomainDefine to overwrite existing inactive domains for xen 3.0.3 userspace installations
Daniel P. Berrange
berrange at redhat.com
Wed May 2 13:35:20 UTC 2007
On Tue, May 01, 2007 at 01:30:23PM -0400, Hugh Brock wrote:
> + if (!(olddomain = virGetDomain(conn, value->str, uuid)))
> + goto error;
> +
> + if (olddomain->id != -1) {
> + xenXMError(conn, VIR_ERR_INTERNAL_ERROR, "can't overwrite an active domain");
> + goto error;
> + }
> +
Actually, it is valid to call virDomainDefineXML() even for a domain which
is already running. This is critical to be able to implement provisioning
tools like virt-install - we first boot a domain with the config needed
to kick off the installer (eg explicit initrd/kernel, or ISO), and then
define a config file for subsequent boots (eg pygrub). So, just killing
these 2 lines & the rest of the patch is OK.
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
More information about the libvir-list
mailing list