Hi,
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=192.168.1.20
--netmask=255.255.255.0 --gateway=192.168.1.1 --dir=/data/vm/images
--arch=amd64 --passwd --size=160Gb --swap=1Gb --memory=2048Mb --boot
--mirror=file:/data/iso/ubuntu-11.10-desktop-amd64.iso
sudo xen-create-image --hostname=guest32bit --ip=192.168.1.21
--netmask=255.255.255.0 --gateway=192.168.1.1 --dir=/data/vm/images
--arch=i386 --passwd --size=160Gb --swap=1Gb --memory=2048Mb
--mirror=file:/data/iso/ubuntu-11.10-desktop-i386.iso
Obviously, these commands don''t work. Running the first gives me the
output:
<bash>
WARNING
-------
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 : 192.168.1.20 [MAC: 00:16:3E:86:7C:34]
Netmask : 255.255.255.0
Gateway : 192.168.1.1
WARNING
-------
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
Done
Creating swap on /data/vm/images/domains/guest64bit/swap.img
Done
Creating partition image: /data/vm/images/domains/guest64bit/disk.img
Done
Creating ext3 filesystem on /data/vm/images/domains/guest64bit/disk.img
Done
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.
Aborting
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.
Aborting
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
</bash>
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.
Regards,
Chris
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
On Mon, Feb 20, 2012 at 6:25 AM, Chris Spencer <chrisspen@gmail.com> wrote:> Hi, > > 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.Judging from the state of https://help.ubuntu.com/community/Xen , there''s not much interest (at least not from those who''s willing to edit the documentation) for Xen on Ubuntu. I haven''t used the combination you use, so my replies will be generic ones from someone who used Xen on other distro/version.> > 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?There''s no such thing as "xen create". There''s "xm create" (or "xl create", but that''s another story). Read the wiki link above, some of it should still be valid, and it explains what xen-create-image and "xm create" is for.> > 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?Last time I tried (which, admittedly was quite a while ago), the only OS that was able to be installed as PV domU from ISO was opensolaris/openindiana. For linux, you need to either: - use ISO to install HVM guests, and then convert it to PV (pretty complicated for newbies), OR - use a special kernel and initrd to do network install, e.g. http://archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-i386/current/images/netboot/xen/ . Highly recommended if your internet connection is fast-enough, as this is a well-supported method. OR - create an image using other method (e.g. xen-create-image) which does not involve the normal distro installer.> You appear to have a missing vif-script, or network-script, in the > Xen configuration file /etc/xen/xend-config.sxp.That''s another different issue. Did you do what it tells you to do? I''ve said this a lot lately: if you simply want something that just works, Xenserver/XCP might be a better choice for servers, while virtualbox might be a better choice if you use it on PC/notebook. If you DO manage to get it to work correctly with Xen, you''ll have a very flexible and powerful virtualization setup. Please spend some time to edit the wiki. -- Fajar