[libvirt] Is there an API for clone?

黄亮 lancerhuang at 163.com
Fri Nov 12 02:07:07 UTC 2010


Hi Alex

Thank you for your reply.
I just wanna make sure I'm not misunderstanding, virStorageVolGetXMLDesc & virStorageVolCreateXMLFrom together can do the clone process, am I right?

Regards


2010-11-12 



Lancer 



发件人: Alex Jia 
发送时间: 2010-11-10  13:28:21 
收件人: 黄亮 
抄送: libvir-list 
主题: Re: [libvirt] Is there an API for clone? 
 
Hi lancer,
As Osier said, libvirt hasn't a independent API for cloning an
existing guest, instead of using virStorageVolGetXMLDesc API to 
get a guest volume xml description and then calling  
virStorageVolCreateXMLFrom API to clone a new volume.
For python-virtinst component, you may use virt-clone to implement
this, for libvirt component, you may directly use python binding
API or virsh tool 'vol-clone' to implement it.
I hope it's helpful for you.
- Alex
----- Original Message -----
From: "黄亮" <lancerhuang at 163.com>
To: "libvir-list" <libvir-list at redhat.com>
Sent: Wednesday, November 10, 2010 9:30:28 AM GMT +08:00 Beijing / Chongqing / Hong Kong / Urumqi
Subject: [libvirt] Is there an API for clone?
Hi, guys 
I know there is a command "virt-clone", but I couldn't find the equivalent API here : http://libvirt.org/html/libvirt-libvirt.html 
So, is there an API to clone an existing VM or not? 
Thank you! 
Regards 
2010-11-10 
Lancer 
--
libvir-list mailing list
libvir-list at redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
__________ Information from ESET Smart Security, version of virus signature database 5605 (20101109) __________
The message was checked by ESET Smart Security.
http://www.eset.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101112/0b3a8ffb/attachment-0001.htm>


More information about the libvir-list mailing list