Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Technical

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 5th April 2012, 11:01
Hans Hans is offline
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,263
Thanks: 216
Thanked 649 Times in 295 Posts
Default Can't xen-create-image --install-method=copy or --install-method=tar)

Hi all

One of the great things about Xen is that the backup allows you to reconstitute a fully working XEN guest from the backup area, simply with a command like:

On XEN 3 on Debian Lenny it could be done with:
sudo xen-create-image --copy=/var/backup/mymachine.rdiff-backup.mirror --ip= --hostname=mymachine.tld

On XEN4 on Debian Squeeze, the --copy method seems to be ambiguous, so i tried:
xen-create-image --install-method=copy --install-source=/var/backup/mymachine.tld.rdiff-backup.mirror --ip= --hostname=mymachine.tld

This seems to work on Debian Squeeze with Xen4, because i see:

General Information
Hostname : mymachine.tld
Distribution : squeeze
Mirror : http://ftp.nluug.nl/pub/os/Linux/distr/debian/
Partitions : swap 128Mb (swap)
/ 4Gb (ext3)
Image type : full
Memory size : 128Mb
Kernel path : /boot/vmlinuz-2.6.32-5-xen-amd64
Initrd path : /boot/initrd.img-2.6.32-5-xen-amd64

Networking Information
IP Address 1 : [MAC: 00:16:3E:1B:6D:15]
Netmask :
Broadcast :
Gateway :

Creating swap on /dev/lvg0/mymachine.tld-swap

Creating ext3 filesystem on /dev/lvg0/mymachine.tld-disk
Installation method: copy
(Source: /var/backup/mymachine.tld.rdiff-backup.mirror)

Running hooks

It looks good so far, but the problem is that "Running hooks" takes forever (this happens with --install-method=copy or --install-method=tar).

After executing the command lvdisplay, i can see that the logical volumes are created.
Without a reboot, it is not possible to delete those logical volumes.

lvremove /dev/lvg0/test.korpershoek.info-swap
lvremove /dev/lvg0/test.korpershoek.info-disk

results in:

Can't remove open logical volume "mymachine.tld-swap"
Can't remove open logical volume "mymachine.tld-disk"

Can anyone tell me what might be wrong?
I also wonder if the syntax xen-create-image --install-method=copy --install-source=/var/backup/mymachine.tld.rdiff-backup.mirror --ip= --hostname=mymachine.tld is correct.

MrHostman | Managed Hosting
Reply With Quote
Sponsored Links
Old 5th April 2012, 22:49
Hans Hans is offline
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,263
Thanks: 216
Thanked 649 Times in 295 Posts
Unhappy Bug in xen-tools 4.2.1 - Debian Squeeze

Within the xen-tools log file of the vm i read the following lines:

hook 50-setup-hostname: done.
Running hook 55-create-dev
hook 55-create-dev: done.
Running hook 60-copy-host-files
hook 60-copy-host-files: done.
Running hook 65-copy-user-files
hook 65-copy-user-files: done.
Running hook 70-install-ssh
Generating public/private rsa key pair.
/tmp/j0vB2bPgP1/etc/ssh/ssh_host_rsa_key already exists.

This is exactly as reported here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607236

the hook /usr/lib/xen-tools/debian.d/70-install-ssh needlessly generates ssh
keys which stalls xen-create-image.

MrHostman | Managed Hosting
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chroot SSH + ISPConfig Norman Installation/Configuration 27 26th March 2007 04:40
Verify email setup meekish Installation/Configuration 28 27th October 2006 16:36
Xen Ubuntu VM Install Question witless1 HOWTO-Related Questions 5 3rd May 2006 16:42
Install HELP:: ERROR: Could not create aps.tar.gz palkat Installation/Configuration 3 29th August 2005 10:35
Install stopped at: create clamav.tar.gz domino Installation/Configuration 2 16th August 2005 07:36

All times are GMT +2. The time now is 03:05.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.