[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] Creating a Guest from an ISO


I'm new to Xen, and I just installed Xen 4.1 on 64-bit Ubuntu Server
11.10. I've confirmed I'm booting into the Xen kernel.

Now I'm trying to create guests for 64-bit and 32-bit Ubuntu Desktop
11.10. I've downloaded the ISOs, and while I've been reading through
the docs, several things are unclear to me.

First, there seems to be two primary methods for creating guests. One,
using `xen create ...` and another using `xen-create-image`. Which
should I use?

Second, I don't see any simple way to create a guest from an ISO. I've
searched for hours, but all I could find was one brief mention at
http://wiki.debian.org/Xen, stating that Xen is unable to directly
read ISO images, and that a workaround was to create a loop device,
and use that device in a Xen cfg file to create the guest. Is this
correct? I found some suggestions that the --mirror parameter could be
used to specify the ISO filename, but I haven't been able to get this
to work. Is that possible?

So far, to create two guests, one 64-bit and one 32-bit, each with
100Gb storage, 1Gb swap, and 2Gb memory, and a static IP, I have:

sudo xen-create-image --hostname=guest64bit --ip=
--netmask= --gateway= --dir=/data/vm/images
--arch=amd64 --passwd --size=160Gb --swap=1Gb --memory=2048Mb --boot

sudo xen-create-image --hostname=guest32bit --ip=
--netmask= --gateway= --dir=/data/vm/images
--arch=i386 --passwd --size=160Gb --swap=1Gb --memory=2048Mb

Obviously, these commands don't work. Running the first gives me the output:


  You appear to have a missing vif-script, or network-script, in the
 Xen configuration file /etc/xen/xend-config.sxp.

  Please fix this and restart Xend, or your guests will not be able
 to use any networking!

General Information
Hostname       :  guest64bit
Distribution   :  oneiric
Mirror         :  file:/data/iso/ubuntu-11.10-desktop-amd64.iso
Partitions     :  swap            1Gb   (swap)
                  /               160Gb (ext3)
Image type     :  sparse
Memory size    :  2048Mb
Kernel path    :  /boot/vmlinuz-3.0.0-16-server
Initrd path    :  /boot/initrd.img-3.0.0-16-server

Networking Information
IP Address 1   : [MAC: 00:16:3E:86:7C:34]
Netmask        :
Gateway        :

Loopback module not loaded and you're using loopback images
Run the following to load the module:

modprobe loop max_loop=255

Creating partition image: /data/vm/images/domains/guest64bit/swap.img

Creating swap on /data/vm/images/domains/guest64bit/swap.img

Creating partition image: /data/vm/images/domains/guest64bit/disk.img

Creating ext3 filesystem on /data/vm/images/domains/guest64bit/disk.img
Installation method: debootstrap
Running command 'xt-install-image --hostname=guest64bit
--location=/tmp/4CVk3xAv_k --dist=oneiric --install-method=debootstrap
--mirror=file:/data/iso/ubuntu-11.10-desktop-amd64.iso --cache=yes
--cachedir=/var/cache/apt/archives/ --arch=amd64 2>&1' failed with
exit code 256.
See /var/log/xen-tools/guest64bit.log for details
/tmp/4CVk3xAv_k/etc/ssh/ssh_host_rsa_key.pub: No such file or directory
Running command 'umount /tmp/4CVk3xAv_k/proc 2>&1' failed with exit code 256.
See /var/log/xen-tools/guest64bit.log for details
cannot remove directory for /tmp/4CVk3xAv_k: Device or resource busy
at /usr/share/perl/5.12/File/Temp.pm line 902

Attached is the resulting log file. Based on the log, one problem
seems to be that Oneiric is an unsupported distro.

How far off am I with these commands? How do I fix them?

Sorry if these are newbie questions. Any help or advice is appreciated.


Attachment: guest64bit.log
Description: Text Data

Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.