[libvirt] Create a copy of a Domain

IKI-サガル バルウェ sagar.barve at ikic.co.jp
Thu Jun 10 08:28:15 UTC 2010


Hello All,

I am trying to create a Domain/VM copy program.
In this program, a completely new domain should be created from a source 
domain.

What I tried so far is this:

1. Get the XML Desc of the source Domain using "virDomainGetXMLDesc".
2. Get the Hypervisor Object for the source Domain using 
"virDomainGetConnect".
3. Create a new Domain using the "virDomainCreateXML" method.

After doing this, I get the following error:

libvirt.libvirtError: POST operation failed: xend_post: error from xen 
daemon: (xend.err "Error creating domain: VM name already in use by domain 
4")

First of all, Is this the correct way to create a new Domain as a copy of 
the original??

If not, please tell me how should I go about this??

Thanks and Regards
Sagar Barve 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100610/b00980f2/attachment-0001.htm>


More information about the libvir-list mailing list