Hi All,<div><br></div><div>I am new to this list, so please let me know if there is a better place to post this question. I have been using xen-tools often and have just updated our Xen installation to Xen 4.1.2 and the xen-tools that comes with the Ubuntu 12.04 (64bit) distro - which i think are v 4.2.1. </div>
<div><br></div><div>I was trying to find out examples of cloning an existing VM to create a new VM, but was unable to find it. </div><div><br></div><div>For example, I have a VM image created (testvm2) that has a disk image (file backed: disk.img) and a swap file (file backed: swap.img) using xen-create-image. This image uses pygrub and also runs Ubuntu 12.04 (32 bit) in the domU. I have customized it in various ways and next I want to create a clone of this VM image quickly, lets say "testvm3" and make whatever changes I need to it so that the two images are distinct and can both run *simultaneously*. It seems like I should be able to do the following: </div>
<div><br></div><div>1. I tarred up the disk.img file and named it: /home/xen/testvm2-disk.img.tar</div><div><br></div><div>2. xen-create-image --hostname=testvm3 --size=2G --swap=128M --ip=10.16.17.67 --netmask=255.255.255.0 --gateway=10.16.17.1 --force --bridge=eth0-br --dir=/home/xen --memory=64M --install-method=tar --install-source=/home/xen/testvm2-disk.img.tar</div>
<div><br></div><div>That does not seem to work and fails with the following error. Any thoughts on how to fix this will be appreciated. </div><div><br></div><div>thanks!</div><div>Yuvraj</div><div><br></div><div><div>.</div>
<div>.</div><div>General Information</div><div>--------------------</div><div>Hostname : <a href="http://testvm3.ucsd.edu">testvm3.ucsd.edu</a></div><div>Distribution : precise</div><div>Mirror : <a href="http://us.archive.ubuntu.com/ubuntu/">http://us.archive.ubuntu.com/ubuntu/</a></div>
<div>Partitions : swap 128M (swap)</div><div> / 2G (ext3)</div><div>Image type : sparse</div><div>Memory size : 64M</div><div><br></div><div>Networking Information</div>
<div>----------------------</div><div>IP Address 1 : 172.16.17.67 [MAC: 00:16:3E:9F:F0:FD]</div><div>Netmask : 255.255.255.0</div><div>Gateway : 172.16.17.1</div><div><br></div><div>Creating partition image: /home/xen/domains/<a href="http://testvm3.ucsd.edu/swap.img">testvm3.ucsd.edu/swap.img</a></div>
<div>Done</div><div><br></div><div>Creating swap on /home/xen/domains/<a href="http://testvm3.ucsd.edu/swap.img">testvm3.ucsd.edu/swap.img</a></div><div>Done</div><div><br></div><div>Creating partition image: /home/xen/domains/<a href="http://testvm3.ucsd.edu/disk.img">testvm3.ucsd.edu/disk.img</a></div>
<div>Done</div><div><br></div><div>Creating ext3 filesystem on /home/xen/domains/<a href="http://testvm3.ucsd.edu/disk.img">testvm3.ucsd.edu/disk.img</a></div><div>Done</div><div>Installation method: tar</div><div>(Source: /home/xen/testvm2-disk.img.tar)</div>
<div>Done</div><div>System installation failed. Aborting</div><div>/tmp/jHpF2ish6f/etc/ssh/ssh_host_rsa_key.pub: No such file or directory</div><div>Running command 'umount /tmp/jHpF2ish6f/proc 2>&1' failed with exit code 256.</div>
<div>Aborting</div><div>See /var/log/xen-tools/testvm3.ucsd.edu.log for details</div><div>cannot remove directory for /tmp/jHpF2ish6f: Device or resource busy at /usr/share/perl/5.14/File/Temp.pm line 902</div></div><div>
<br></div><div><br></div><div>Also, If I look at the /var/log/xen-tools/testvm3.ucsd.edu.log the last messages printed are: </div><div>.</div><div>.</div><div>.</div><div><div>(Source: /home/xen/testvm2-disk.img.tar)</div>
<div>Falling back to default tar command</div><div>domains/<a href="http://testvm2.ucsd.edu/disk.img">testvm2.ucsd.edu/disk.img</a></div><div>/bin/tar: domains/<a href="http://testvm2.ucsd.edu/disk.img">testvm2.ucsd.edu/disk.img</a>: Wrote only 2560 of 10240 bytes</div>
<div>/bin/tar: Exiting with failure status due to previous errors</div><div>WARNING (/usr/bin/xt-install-image): The installed system at /tmp/jHpF2ish6f doesn't seem to be a full system.</div><div>WARNING (/usr/bin/xt-install-image): The installed system is missing the common file: /bin/ls.</div>
<div>WARNING (/usr/bin/xt-install-image): The installed system at /tmp/jHpF2ish6f doesn't seem to be a full system.</div><div>WARNING (/usr/bin/xt-install-image): The installed system is missing the common file: /bin/cp.</div>
<div>Done</div><div>System installation failed. Aborting</div><div>umount: /tmp/jHpF2ish6f/proc: not found</div><div>Running command 'umount /tmp/jHpF2ish6f/proc 2>&1' failed with exit code 256.</div><div>
Aborting</div></div>