How to save/export a VM? -

Tom Horsley horsley1953 at gmail.com
Fri Jul 25 15:52:08 UTC 2014


On Fri, 25 Jul 2014 10:15:32 -0400
Bob Goodwin - Zuni, Virginia, USA wrote:

> Now that I have a working Centos7 VM how do I save it and transfer it ti 
> a second computer?

   virsh dumpxml centos7 > centos7.xml

Replace centos7 with whatever your virtual machine name actually is.

That gives you an xml file which will contain one or more lines of the
form:

   <source file='/zooty/images/centos7.img'/>

Copy the xml file to the new machine, copy the disk image file it
mentions to the new machine as well, then on the new machine run

   virsh define centos7.xml

If you want to change the name of the image file, you can do
that, but be sure to change the xml to reflect the new name
before running the virsh define.

P.S. The virtual machine should not be running when you do this.


More information about the users mailing list