[xen-tools] Re: re-installation with xen-shell

Henning Sprang henning.sprang at gmail.com
Sat Nov 17 22:16:54 CET 2007


On Nov 17, 2007 1:14 PM, Steve Kemp <steve at steve.org.uk> wrote:
> On Sat Nov 17, 2007 at 03:48:01 +0100, Henning Sprang wrote:
>
> > hm, my script looks like:
> > xen-create-image --hostname=$1
>
> > I'm using xen-shell 1.7-1.
>
>   Agghh  I see why this is.  /usr/bin/xm-reimage has a bug
>  which is fixed in CVS - which is why I  was sure it would
>  work.
>
>   I'll make a new release.  But for the moment you can
>  change /usr/bin/xm-reimage from this:
>
>
>  #
>  #  Run the reimage script.
>  #
>  /home/${user}/image.sh
>
>
>   To this:
>
>
>     #
>     #  Run the reimage script.
>     #
>     /home/${user}/image.sh ${host}

Hmm, testing this, with a script like this

---
#!/bin/sh

hostname=$1
xen-create-image --config host_$hostname.conf
---

I get:

---
  Image recreation and wiping confirmed.

  Sleeping for 10 seconds to give you one last chance to abort with 'Ctrl-c'

 1 2 3 4 5 6 7 8 9 10
Committed.

  In order to use this script you must be running with root privileges.

  (This is necessary to mount the disk images which are created.)

You may now boot your installation
xen-shell[xen-tools-test]>
---


So, I try to run xen-create-image with sudo, that resulkts in:

---
 1 2 3 4 5 6 7 8 9 10
Committed.

General Information
--------------------
Hostname       :  xen-tools-test
Distribution   :  centos-5
Partitions     :  swap            128Mb (swap)
                  /               5GB   (ext3)
Image type     :  full
Memory size    :  128Mb
Kernel path    :  /boot/vmlinuz-2.6.18-4-xen-686
Initrd path    :  /boot/initrd.img-2.6.18-4-xen-686

Networking Information
----------------------
IP Address     : DHCP [MAC: 00:16:3E:3C:02:80]

The LVM disk image already exists.  Aborting.
Specify '--force' to delete and recreate


Logfile produced at:
         /var/log/xen-tools/xen-tools-test.log
You may now boot your installation
xen-shell[xen-tools-test]>
---

Only when adding --force, too, it startss to work out... at least,
while I'm writing this, It is still working while before it was
exiting very fast, so there's some hope it will turn out fine :)

Henning





More information about the xen-tools-discuss mailing list