[libvirt-users] username and passwd after create VM from XML dump

Eric Blake eblake at redhat.com
Wed Aug 6 19:07:51 UTC 2014


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20140806/6ae3ed77/attachment.sig>


More information about the libvirt-users mailing list