<blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">(a) Is cloning guests useful for you or not?  Often or infrequently?<br></blockquote><br>I clone VMs once os twice a month. It's usefull for creating test environments for the applications this company runs, and to safely backup a VM before doing some change of update.<br>

<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">(b) Do you currently use virt-clone to clone guests?<br></blockquote><br>I use virt-manager. Don't know what command virt-manager uses. I just right click the VM and clone it.<br>

<br><blockquote>(c) Do you have a homebrew method to clone guests?  What does it do?<br></blockquote><br>I don't. If I need to clone a VM without virt-manager, I would make copies of VM hard disk and vm XML, you know, manually copy the stuff.<br>

<br><blockquote>(d) Do you use another tool to clone guests?  (And how is it?)<br></blockquote><br>No, I don't.<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">

(e) When you clone a guest, do you "sysprep" it or would you like to?<br>
(Using the term "sysprep" generically here, I mean any sort of<br>
reinitialization for Linux or Windows guests).<br></blockquote><br>I don't. Just change the MAC address (specially in windows guests).<br><br><blockquote>(f) How do you feel about a multi-step process?<br></blockquote>

<br>I really would enjoy having more options when cloning machine, could save lots of time in here. I don't resize cloned machines, for example. When I need to change the size of the cloned machine, I just create a new one from scratch.<br>

<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">(g) Have you had other problems with cloning guests?<br></blockquote><br>If I change the Mac address of the NICs of a linux guest, O.S. can't find the NIC anymore. It's a problem to me, since I started working with linux servers about a year ago and I'm still (! lol) not familiar with "manually adding hardware"...<br>

<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">(h) What have I missed out in this analysis?  What other features have<br>
you missed in virt-clone?<br></blockquote><br>Can't remember any right now... =D<br><br><div class="gmail_quote">On Tue, May 10, 2011 at 8:56 AM, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I've volunteered for the task of fixing virt-clone[0].  There are a<br>
number of bugs which need to be addressed.  Unfortunately the current<br>
virt-clone is broken-by-design since it cannot make changes inside the<br>
guest.<br>
<br>
  [0] <a href="http://linux.die.net/man/1/virt-clone" target="_blank">http://linux.die.net/man/1/virt-clone</a><br>
<br>
The bugs boil down to what Microsoft calls "sysprepping" the clone,<br>
which is to say, removing its existing identity, hostname, ssh host<br>
keys, persistent network rules, host SID and workgroup name (for<br>
Windows).  It's helpful for Linux guests to remove some of this<br>
stuff[1] -- it will make the cloning process smoother.  For Windows<br>
it's absolutely required[2].<br>
<br>
  [1] <a href="https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-vm/" target="_blank">https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-vm/</a><br>
  [2] <a href="http://technet.microsoft.com/en-us/library/cc721940%28WS.10%29.aspx" target="_blank">http://technet.microsoft.com/en-us/library/cc721940%28WS.10%29.aspx</a><br>
<br>
All that virt-clone can do now is to copy the guest and make some<br>
simple changes to the libvirt XML (eg. giving it a new MAC address).<br>
It doesn't even address the sysprepping problem.<br>
<br>
The problem with sysprepping is that it's hard to do, and it's<br>
different for every operating system.  I've summarized some of the<br>
techniques below.  Worse than that, for some OSes there are different<br>
levels of sysprepping that an administrator might want; also see<br>
below.<br>
<br>
So I'd like feedback from "virt-clone next generation" users:<br>
<br>
(a) Is cloning guests useful for you or not?  Often or infrequently?<br>
<br>
(b) Do you currently use virt-clone to clone guests?<br>
<br>
(c) Do you have a homebrew method to clone guests?  What does it do?<br>
<br>
(d) Do you use another tool to clone guests?  (And how is it?)<br>
<br>
(e) When you clone a guest, do you "sysprep" it or would you like to?<br>
(Using the term "sysprep" generically here, I mean any sort of<br>
reinitialization for Linux or Windows guests).<br>
<br>
(f) How do you feel about a multi-step process?<br>
<br>
  virt-clone -> virt-sysprep -> virt-resize (for example)<br>
<br>
(g) Have you had other problems with cloning guests?<br>
<br>
(h) What have I missed out in this analysis?  What other features have<br>
you missed in virt-clone?<br>
<br>
Sysprepping Windows<br>
-------------------<br>
<br>
This is a complex, manual process.  We do some steps to automate it in<br>
RHEV.  It's best to read Microsoft's online documentation at<br>
[2][3][4].<br>
<br>
  [3] <a href="http://support.microsoft.com/kb/302577" target="_blank">http://support.microsoft.com/kb/302577</a><br>
  [4] <a href="http://blogs.technet.com/b/megand/archive/2005/01/20/357570.aspx" target="_blank">http://blogs.technet.com/b/megand/archive/2005/01/20/357570.aspx</a><br>
<br>
Fedora<br>
------<br>
<br>
In theory you can just write a file /.unconfigured in the root, and<br>
Fedora will go through the firstboot process at next boot (it will<br>
reset timezone, root password, netconfig, keyboard, authentication).<br>
<br>
Some admins will *not* want all of these things to be reset, and will<br>
want either a lesser degree of unconfiguration, or will want to<br>
control each thing manually.<br>
<br>
I'm not totally convinced that this hasn't been broken by systemd<br>
introduction in Fedora 15.<br>
<br>
general Linux<br>
-------------<br>
<br>
See [1].<br>
<br>
Rich.<br>
<br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/%7Erjones%0Avirt-df" target="_blank">http://people.redhat.com/~rjones<br>
virt-df</a> lists disk usage of guests without needing to install any<br>
software inside the virtual machine.  Supports Linux and Windows.<br>
<a href="http://et.redhat.com/%7Erjones/virt-df/" target="_blank">http://et.redhat.com/~rjones/virt-df/</a><br>
<br>
_______________________________________________<br>
virt-tools-list mailing list<br>
<a href="mailto:virt-tools-list@redhat.com">virt-tools-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/virt-tools-list" target="_blank">https://www.redhat.com/mailman/listinfo/virt-tools-list</a><br>
</blockquote></div><br>