[xen-tools-discuss] Question about cloning a VM using the --tar and --copy options
Axel Beckert
abe at deuxchevaux.org
Sat Jun 30 17:13:56 CEST 2012
Hi Yuvraj,
On Thu, Jun 28, 2012 at 11:28:16AM -0700, Yuvraj Agarwal wrote:
> > The 4.3 .deb for the PPA is still missing. I may release have to
> > release a 4.3.1 which fixes some testsuite issues, [...]
I uploaded a 4.3.1 RC1 to the Ubuntu PPA to test the build on Ubuntu
before the real release of 4.3.1 which will happen in the next few
hours (i.e. before the Debian Freeze for Wheezy :-).
> I am using Precise Pangolin - Ubuntu 12.04 (64bit) as the dom0. Will the
> PPA eventually have precise (12.04) packages too?
Sure.
4.3.1~rc1-1 is now available in the PPA for Natty (the oldest
supported Ubuntu release where it builds -- no more builds on Lucid).
Packages for Oneiric, Precise and Quantal should show up within the
next hour or so. As soon as there are newer releases than natty shown
on http://ppa.launchpad.net/xtaran/xen-tools/ubuntu/dists/, apt-get
should be able to find precise packages, too.
I'll upload 4.3.1-1 for Natty, Oneiric, and Precise, too, after it's
released. Quantal will hopefully get it via Debian into universe.
> I tried to follow the instructions on your Launchpad/ppa website,
> https://launchpad.net/~xtaran/+archive/xen-tools and add the repo "*
> ppa:xtaran/xen-tools"*. However when I do an "apt-get update" to get
> the updates it throws an error. That is probably because there are
> no 12.04 packages yet?
Yep.
> Also, it seems like the xen-tools package builds failed?
4.3-1 failed to build on 32bit architectures due to testsuite failures
as explained in my previous mail. 4.3.1-1 fixes this.
> Could I just get the source or the .deb from the xen-tools website and
> install it?
Sure.
> It will clobber the current Ubuntu installed version of xen-tools
> (4.2.1) and not sure if that has any issues later...
The installed 4.2.1 package will be replaced by the new package. I
don't expect any issues to install the 4.3 oder 4.3.1 package on
Precise since the package is the very same as the one uploaded to
Debian and that one works well without modifications on Debian Stable
(Squeeze), too.
> This is not a problem. I can also dd testvm2/disk.img (although dd will
> expand the sparse disk image which is not ideal) to create a new VM testvm3
> for example. But as you mention, I would still need to modify all the files
> that make the two distinct. These include, /etc/hosts, /etc/hostname,
> /etc/network/interfaces, and I am sure what other files also need to be
> installed/edited. The OpenSSH generated keys for example also need to be
> changed? I was hoping that the "copy" or the "tar" methods of install could
> take of these things...
Yeah, should be doable.
> > > 1. I tarred up the disk.img file and named it:
> > > /home/xen/testvm2-disk.img.tar
> >
> > That doesn't work. The tar file xen-tools expects should contain the
> > contents of an installed system (i.e. files like /bin/ls, /bin/cp,
> > etc.), not an block device image as file.
>
> So, is the following the right way to do it then? I should probably remove
> the /proc/ and /sys/ directories from the tar in Step (b) below?
Yeah. And /dev/ and likely /tmp/, /var/tmp/ and /run/ (if existent),
too.
/tmp/ and /var/tmp/ shouldn't hurd, but to include it will just waste
resources.
> (a) mount /home/xen/domains/testvm2/disk.img /mnt/baseimage -i loop
> (b) tar cvf /mnt/baseimage.tar /mnt/baseimage
> (c) 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=/mnt/baseimage.tar
On a first glance that's how it should work.
Kind regards, Axel
--
/~\ Plain Text Ribbon Campaign | Axel Beckert
\ / Say No to HTML in E-Mail and News | abe at deuxchevaux.org (Mail)
X See http://www.asciiribbon.org/ | abe at noone.org (Mail+Jabber)
/ \ I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)
More information about the xen-tools-discuss
mailing list