On 08/06/2014 12:10 PM, Yuanzhen Gu wrote:
Just one more question to make me clear in this point, so if I
install
an application in the guest, and make a dmup XML, then create a new
guest using that configured dump XML file, the new guest should also have
that application installed? and the username and password of the new guest
should be the same as the previous guest? thanks a lot!
dumpxml is only half a guest. A guest consists of the hardware it is
running on (dumpxml) and the contents of the disks (storage volumes).
To create a clone, you need to copy and modify both the dumpxml domain
description, AND do a clone (or share a common base file, using qcow2
overlays) of the disk elements (where part of your xml edits is pointing
to the just-cloned storage). Furthermore, if you expect both the
original and the new guest to ever run in parallel, it is a very wise
idea to do other changes to the disk contents (which is why I pointed
you to libguestfs' virt-sysprep). For example, if you forget to nuke
the guest's random number seed, then both the original and the guest
will be using the same random number stream when they first boot, which
is a security hole waiting to happen because random streams are not
supposed to be predictable.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org