[libvirt] how to duplicate an vm?

Richard W.M. Jones rjones at redhat.com
Wed Oct 21 14:59:47 UTC 2009


On Wed, Oct 21, 2009 at 04:58:00PM +0200, Dan Bar Dov wrote:
> I am trying to duplicate an existing vm.
> While the VM was down, I copied the image file, copied the xml file and
> manually fixed the xml file to have a different VM name, and point to the
> copy.
> 
> The copy now works, but the original disappraeed from virt-manager. When I
> try to "restore" it I get:
> Error restoring domain '/var/lib/libvirt/images/fc11-copy.img': operation
> failed: image magic is incorrect
> 
> What am I doing wrong/how should I replicate a VM?

Did you change the UUID and network mac address?

We also have a tool that does this called virt-clone.  It might
be safer/easier to use the tool instead of doing it by hand.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw




More information about the libvir-list mailing list