[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libvir] [PATCH][RFC] Adding Cloning Feature

Hi all,

I've been planing to adding cloning feature.
Then, I tried to make the patch in the following way.
1)Get the XML used virDomainGetXMLDesc
2)Delete <uuid>, <mac> node element
  This intened to automatically generated.
3)Changing <name>, <source dev> string node element
4)Fork "dd" process
5)Define XML used virDomainDefineXML

This feature is just a first revision, because I make this patch within current libvirt API limitation.
Also Remote Cloining is Limited.
But if we can libvirtd for feature, it will be enhance remote cloning
based on this pach
(as http://libvirt.org/remote.html#Remote_libvirtd_configuration)

Finally, to have to communicate with the demon remotely as libvirt library, actually I want to put down to new libvirt API (e.g. virDomainClone).

Could you hear your comments about this ?

Attached patch shows below.
# ./virsh --help clone
   clone - clone a domain

   virsh clone <domain> <devices,...>

   Clone a domain.

   <domain>         shut off state domain name
   <devices>        destination devices (comma separated)

# ./virsh clone PV_RH5 /dev/sdb2
Cloning from /dev/sda5 to /dev/sdb2 .....

# ./virsh list --all
Id Name                 State
 0 Domain-0             running
 - PV_RH5               shut off
 - PV_RH5_CLONE         shut off

#./virsh start PV_RH5_CLONE
Domain PV_RH5_CLONE started

Kazuki Mizushima

Attachment: cloning.patch
Description: Binary data

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]