[libvirt] Create a copy of a Domain
Daniel P. Berrange
berrange at redhat.com
Fri Jun 11 09:32:42 UTC 2010
On Fri, Jun 11, 2010 at 10:22:18AM +0900, IKI-サガル バルウェ wrote:
> Thanks Daniel,
>
> >>I think you must at least change the UUID (/domain/uuid) and name
> >>(/domain/name) in the XML description. Very like you also need to
> >>duplicate
> >>the used disk images and update their paths
> >>(/domain/devices/disk/source/@file) accordingly, unless you really want
> >>your
> >>domians to share them.
>
> I will definately try this out. As for changing the UUID, I think the new
> value has to be unique in terms of all other Domains present. I am right??
>
> >Better yet use the 'virt-clone' command line tool, or virt-manager's clone
> >capability
>
> As for using 'virt-clone', is there a way to implement this using python
> bindings for libvirt??
> I want to provide the functionality in a python script.
> I thought of doing this by directly executing the command line 'virt-clone'
> command from my python script and check wheather it executes successfully
> or not. We can do this by the 'os.system' function in python.
virt-clone is written in python itself and most of its code is in a
set of library modules, so you can call them directly if neccessary.
Or just write the equivalent code yourself using libvirt python, since
there isn't much too it
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list