Hi folks. Host - Debian Etch Xen I tried to create an Ubuntu Hardy guest with following steps but without success. # cp /etc/xen-tools/xen-tools.conf /etc/xen-tools/xen-tools-ubuntu.conf # xen-create-image --hostname=xen3.satimis.com --size=2Gb --swap=256Mb --ide \ > --ip=192.168.0.113 --netmask=255.255.255.0 --gateway=192.168.0.1--force \ > --dir=/vserver --memory=32Mb --arch=i386 --kernel=/boot/vmlinuz-2.6.18-xen \ > --debootstrap --dist=hardy --config-file=/etc/xen-tools/xen-tools-ubuntu.conf \ > --mirror=http://ftp.hostrino.com/pub/ubuntu/ --passwd Code: Unknown option: config-file We're trying to configure an installation of hardy in /vserver - but there is no hook directory for us to use. This means we don't know how to configure this installation. We'd expect the hook directory to be : /usr/lib/xen-tools/hardy.d Aborting. Logfile produced at: /var/log/xen-tools/xen3.satimis.com.log Please advise how to make use of "/usr/lib/xen-tools/hardy.d"? What will be the correct steps. TIA B.R. satimis
Yes. $ ls -al /vserver/ Code: total 12 drwxr-xr-x 3 root root 4096 2008-09-13 04:39 . drwxr-xr-x 23 root root 4096 2008-09-12 23:19 .. drwxr-xr-x 5 root root 4096 2008-09-14 07:52 domains B.R. satimis
Ok, I think that maybe hardy is not yet supported. What's the output of Code: ls -la /usr/lib/xen-tools ?
# ls -la /usr/lib/xen-tools/ Code: total 64 drwxr-xr-x 7 root root 4096 2008-09-16 09:25 . drwxr-xr-x 128 root root 36864 2008-09-14 06:32 .. drwxr-xr-x 2 root root 4096 2008-09-12 22:41 centos4.d -rw-r--r-- 1 root root 2658 2006-11-19 05:51 common.sh lrwxrwxrwx 1 root root 8 2008-09-12 22:41 dapper.d -> ubuntu.d drwxr-xr-x 2 root root 4096 2008-09-12 22:41 debian.d lrwxrwxrwx 1 root root 8 2008-09-12 22:41 edgy.d -> ubuntu.d lrwxrwxrwx 1 root root 8 2008-09-12 22:41 etch.d -> debian.d drwxr-xr-x 2 root root 4096 2008-09-12 22:41 fedora.d drwxr-xr-x 2 root root 4096 2008-09-12 22:41 gentoo.d lrwxrwxrwx 1 root root 8 2008-09-12 22:41 sarge.d -> debian.d lrwxrwxrwx 1 root root 8 2008-09-12 22:41 sid.d -> debian.d lrwxrwxrwx 1 root root 8 2008-09-12 22:41 stentz.d -> fedora.d drwxr-xr-x 2 root root 4096 2008-09-16 08:57 ubuntu.d hardy is NOT there. Tried both dapper and edgy. All fail # tail /var/log/xen-tools/xen5.satimis.com.log Code: Copying files from new installation to host. Copying files from /tmp/IxWnj3F2Gr/var/cache/apt/archives -> /var/cache/apt/archives Done Done The installation of the new system appears to have failed. There is no '/bin/ls' installed in the new installation directory Done System installation failed. Aborting I don't understand "There is no '/bin/ls' installed in the new installation directory". What does it mean? B.R. satimis
This means it's not supported. What are the outputs of Code: ls -la /usr/lib/xen-tools/ubuntu.d/ and Code: df -h ?
# ls -la /usr/lib/xen-tools/ubuntu.d/ Code: total 64 drwxr-xr-x 2 root root 4096 2008-09-16 08:57 . drwxr-xr-x 7 root root 4096 2008-09-16 09:25 .. -rwxr-xr-x 1 root root 480 2006-11-19 05:51 10-generate-locale -rwxr-xr-x 1 root root 482 2006-11-19 05:51 15-disable-hwclock -rwxr-xr-x 1 root root 1709 2006-11-19 05:51 20-setup-apt -rwxr-xr-x 1 root root 907 2006-11-19 05:51 25-disable-tls -rwxr-xr-x 1 root root 930 2006-11-19 05:51 30-fix-inittab -rwxr-xr-x 1 root root 2630 2006-11-19 05:51 35-setup-users -rwxr-xr-x 1 root root 2505 2006-11-19 05:51 40-setup-networking -rwxr-xr-x 1 root root 1783 2006-11-19 05:51 50-setup-hostname -rwxr-xr-x 1 root root 813 2006-11-19 05:51 60-copy-host-files -rwxr-xr-x 1 root root 729 2006-11-19 05:51 65-copy-user-files -rwxr-xr-x 1 root root 708 2006-11-19 05:51 70-install-ssh -rwxr-xr-x 1 root root 929 2006-11-19 05:51 80-install-modules -rwxr-xr-x 1 root root 1703 2006-11-19 05:51 90-make-fstab -rwxr-xr-x 1 root root 485 2006-11-19 05:51 99-clean-image lrwxrwxrwx 1 root root 5 2008-09-16 08:57 hardy -> hardy lrwxrwxrwx 1 root root 7 2008-09-16 08:48 hardy.d -> hardy.d # df -h Code: Filesystem Size Used Avail Use% Mounted on /dev/sda1 145G 11G 127G 8% / tmpfs 1.7G 0 1.7G 0% /lib/init/rw udev 10M 56K 10M 1% /dev tmpfs 1.7G 0 1.7G 0% /dev/shm satimis
Did you create these symlinks? They're pointing to themselves, so you've created a loop. Please delete them.
Deleted the loop. $ ls -l /usr/lib/xen-tools/ubuntu.d/ Code: total 56 -rwxr-xr-x 1 root root 480 2006-11-19 05:51 10-generate-locale -rwxr-xr-x 1 root root 482 2006-11-19 05:51 15-disable-hwclock -rwxr-xr-x 1 root root 1709 2006-11-19 05:51 20-setup-apt -rwxr-xr-x 1 root root 907 2006-11-19 05:51 25-disable-tls -rwxr-xr-x 1 root root 930 2006-11-19 05:51 30-fix-inittab -rwxr-xr-x 1 root root 2630 2006-11-19 05:51 35-setup-users -rwxr-xr-x 1 root root 2505 2006-11-19 05:51 40-setup-networking -rwxr-xr-x 1 root root 1783 2006-11-19 05:51 50-setup-hostname -rwxr-xr-x 1 root root 813 2006-11-19 05:51 60-copy-host-files -rwxr-xr-x 1 root root 729 2006-11-19 05:51 65-copy-user-files -rwxr-xr-x 1 root root 708 2006-11-19 05:51 70-install-ssh -rwxr-xr-x 1 root root 929 2006-11-19 05:51 80-install-modules -rwxr-xr-x 1 root root 1703 2006-11-19 05:51 90-make-fstab -rwxr-xr-x 1 root root 485 2006-11-19 05:51 99-clean-image $ ls -l /usr/lib/xen-tools/ Code: total 24 drwxr-xr-x 2 root root 4096 2008-09-12 22:41 centos4.d -rw-r--r-- 1 root root 2658 2006-11-19 05:51 common.sh lrwxrwxrwx 1 root root 8 2008-09-12 22:41 dapper.d -> ubuntu.d drwxr-xr-x 2 root root 4096 2008-09-12 22:41 debian.d lrwxrwxrwx 1 root root 8 2008-09-12 22:41 edgy.d -> ubuntu.d lrwxrwxrwx 1 root root 8 2008-09-12 22:41 etch.d -> debian.d drwxr-xr-x 2 root root 4096 2008-09-12 22:41 fedora.d drwxr-xr-x 2 root root 4096 2008-09-12 22:41 gentoo.d lrwxrwxrwx 1 root root 8 2008-09-12 22:41 sarge.d -> debian.d lrwxrwxrwx 1 root root 8 2008-09-12 22:41 sid.d -> debian.d lrwxrwxrwx 1 root root 8 2008-09-12 22:41 stentz.d -> fedora.d drwxr-xr-x 2 root root 4096 2008-09-18 23:04 ubuntu.d Performed following test but still failure. # xen-create-image --hostname=xen7.satimis.com --size=2Gb --swap=256Mb --ide --ip=192.168.0.117--netmask=255.255.255.0 --gateway=192.168.0.1 --force --dir=/vserver --memory=32Mb --arch=i386 --kernel=/boot/vmlinuz-2.6.18-xen --debootstrap --dist=dapper --mirror=http://archive.ubuntu.com/ubuntu/ --passwd Code: General Infomation -------------------- Hostname : xen7.satimis.com Distribution : dapper Fileystem Type : ext3 Size Information ---------------- Image size : 2Gb Swap size : 256Mb Image type : sparse Memory size : 32Mb Kernel path : /boot/vmlinuz-2.6.18-xen Networking Information ---------------------- IP Address 1 : 192.168.0.117--netmask=255.255.255.0 Netmask : 255.255.255.0 Gateway : 192.168.0.1 WARNING ------- Loopback module not loaded and you're using loopback images Run the following to load the module: modprobe loop loop_max=255 Creating swap image: /vserver/domains/xen7.satimis.com/swap.img Done Creating disk image: /vserver/domains/xen7.satimis.com/disk.img Done Creating ext3 filesystem on /vserver/domains/xen7.satimis.com/disk.img Done Installing your system with debootstrap mirror http://archive.ubuntu.com/ubuntu/ Done System installation failed. Aborting Logfile produced at: /var/log/xen-tools/xen7.satimis.com.log # tail /var/log/xen-tools/xen7.satimis.com.log Code: Copying files from new installation to host. Copying files from /tmp/GK1IqjXCQ1/var/cache/apt/archives -> /var/cache/apt/archives Done Done The installation of the new system appears to have failed. There is no '/bin/ls' installed in the new installation directory Done System installation failed. Aborting B.R. satimis
# modprobe loop loop_max=255 FATAL: Module loop not found. Edit: # grep -i loop /boot/config-`uname -r` Code: CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_XEN_NETDEV_LOOPBACK=y The loop driver is built in the kernel B.R. satimis
hi, as I got exactly the same problems as you I did some more research. I found this tutorial on a french site where the author uses a debootstrap backport. The article is in french, but you should get the details. I got some problems installing the package via apt on an amd64 box, so I downloaded the .deb manually and installed with dpkg. And guess what, with the new package debootstrapping hardy using xen-create-image works like a charm Code: xen-create-image --hostname=hardy --ip=xx.xx.xx.xx --size=10Gb --memory=256Mb --dist=hardy --mirror=http://archive.ubuntu.com/ubuntu/u.com/ubuntu/ ah, almost forgot - the golden link: http://howto.landure.fr/gnu-linux/debian-4-0-etch/installer-et-configurer-xen-sur-debian-4-0-etch/ UPDATE: i wrote a short summary on my blog - http://maff.ailoo.net/2008/10/debootstrap-ubuntu-hardy-domu-debian-etch-xen-dom0/ cheers, -- maff
Hi maff, Thanks for your advice. The abovementioned command doesn't work here. It always complains; Code: ... We'd expect the hook directory to be : /usr/lib/xen-tools/hardy.d Aborting. .. ls -l /usr/lib/xen-tools/ Code: total 24 drwxr-xr-x 2 root root 4096 2008-09-13 13:41 centos4.d -rw-r--r-- 1 root root 2658 2006-11-19 21:51 common.sh lrwxrwxrwx 1 root root 8 2008-09-13 13:41 dapper.d -> ubuntu.d drwxr-xr-x 2 root root 4096 2008-09-13 13:41 debian.d lrwxrwxrwx 1 root root 8 2008-09-13 13:41 edgy.d -> ubuntu.d lrwxrwxrwx 1 root root 8 2008-09-13 13:41 etch.d -> debian.d drwxr-xr-x 2 root root 4096 2008-09-13 13:41 fedora.d drwxr-xr-x 2 root root 4096 2008-09-13 13:41 gentoo.d lrwxrwxrwx 1 root root 8 2008-09-13 13:41 sarge.d -> debian.d lrwxrwxrwx 1 root root 8 2008-09-13 13:41 sid.d -> debian.d lrwxrwxrwx 1 root root 8 2008-09-13 13:41 stentz.d -> fedora.d drwxr-xr-x 2 root root 4096 2008-09-19 14:04 ubuntu.d I tried before creating a symbolic link; Code: $ cd /usr/lib/xen-tools $ ln -s ubuntu.d hardy.d It didn't solve the problem. I suppose the problem coming from the version of dbootstrap on this Xen box. It is in French, hardly for me to follow. I have; $ apt-cache policy debootstrap Code: debootstrap: Installed: 0.3.3.2etch1 Candidate: 0.3.3.2etch1 Version table: *** 0.3.3.2etch1 0 500 http://ftp.au.debian.org etch/main Packages 100 /var/lib/dpkg/status installed on this box. Would the new version; Code: landure.fr/pool/etch/debootstrap/debootstrap_1.0.10_all.deb $ dpkg -i debootstrap_1.0.10_all.deb be conflict with the running package? TIA B.R. satimis
I know this thread is old, but I just finished installing Ubuntu 9.10 (Karmic) on Xen as a guest, so I figured I should post what I had to do to get it that way. (Note: I can't boot... yet. Not sure what's wrong, is says "Error: Bootloader isn't executable"; either way, I managed to get past the stumbling block, as detailed below... perhaps this isn't the right way, but at least it did say that it installed, and not that it failed.) First, I followed this tutorial, using image-based installations. I originally tried to install Ubuntu as a guest, but it was without success (I haven't tried again until just now, since Debian installed nicely). So, I had some "leftover breadcrumbs" to work off of for this attempt. I found this thread when I used Google for help with the "there is no hook directory for us to use" part. Here's what I have in one of my directories: Code: user@hostname:~$ ls -lA [B]/usr/lib/xen-tools/ubuntu.d/[/B] total 68 -rwxr-xr-x 1 root root 774 2008-09-29 18:08 [B]01-disable-daemons[/B] -rwxr-xr-x 1 root root 595 2008-09-29 18:08 [B]05-shadowconfig-on[/B] -rwxr-xr-x 1 root root 482 2008-09-29 18:08 [B]15-disable-hwclock[/B] -rwxr-xr-x 1 root root 1887 2008-09-29 18:08 [B]20-setup-apt[/B] -rwxr-xr-x 1 root root 511 2008-09-29 18:08 [B]25-generate-locale[/B] -rwxr-xr-x 1 root root 1007 2008-09-29 18:08 [B]30-disable-gettys[/B] -rwxr-xr-x 1 root root 3437 2008-09-29 18:08 [B]35-setup-users[/B] -rwxr-xr-x 1 root root 2649 2008-09-29 18:08 [B]40-setup-networking[/B] -rwxr-xr-x 1 root root 2240 2008-09-29 18:08 [B]50-setup-hostname[/B] -rwxr-xr-x 1 root root 813 2008-09-29 18:08 [B]60-copy-host-files[/B] -rwxr-xr-x 1 root root 729 2008-09-29 18:08 [B]65-copy-user-files[/B] -rwxr-xr-x 1 root root 571 2008-09-29 18:08 [B]70-install-ssh[/B] -rwxr-xr-x 1 root root 843 2008-09-29 18:08 [B]75-fixup-securetty[/B] -rwxr-xr-x 1 root root 1811 2008-09-29 18:08 [B]80-install-modules[/B] -rwxr-xr-x 1 root root 2151 2008-09-29 18:08 [B]90-make-fstab[/B] -rwxr-xr-x 1 root root 485 2008-09-29 18:08 [B]99-clean-image[/B] -rwxr-xr-x 1 root root 584 2008-09-29 18:08 [B]99-enable-daemons[/B] user@hostname:~$ I believe I had just copied them over from one of the other folders - I didn't even have the computer in 2008, and that's the timestamp on the files - so they're probably the same ones that got installed along with the Debian stuff, just not quite in the same spot. Partial "ls -lA /usr/lib/xen-tools/" output: Code: lrwxrwxrwx 1 root root 27 2010-01-01 22:06 karmic.d -> /usr/lib/xen-tools/ubuntu.d . . . drwxr-xr-x 2 root root 4096 2009-10-20 21:54 ubuntu.d Again, in this next one, I think it's just a copy of the original for one of the other (older - I think "gusty") Ubuntu scripts; partial "ls -lA /usr/share/debootstrap/scripts/" output: Code: lrwxrwxrwx 1 root root 6 2010-01-01 22:12 karmic -> ubuntu -rw-r--r-- 1 root root 5839 2009-10-20 22:00 ubuntu Here's the final stuff in the shell: Code: user@hostname:~$ [I]sudo xen-create-image --hostname=ubuntu-test-machine --role=udev --dhcp --dist=[B]karmic[/B][/I] General Information -------------------- Hostname : ubuntu-test-machine Distribution : karmic Partitions : swap 512Mb (swap) / 5Gb (ext3) Image type : sparse Memory size : 128Mb Networking Information ---------------------- IP Address : DHCP [MAC: FF:11:22:33:44:00] Netmask : 255.255.255.x Broadcast : x.x.x.255 Gateway : x.x.x.x Creating partition image: /home/xen/domains/ubuntu-test-machine/swap.img Done Creating swap on /home/xen/domains/ubuntu-test-machine/swap.img Done Creating partition image: /home/xen/domains/ubuntu-test-machine/disk.img Done Creating ext3 filesystem on /home/xen/domains/ubuntu-test-machine/disk.img Done Installation method: debootstrap Done Running hooks Done Role: udev File: /etc/xen-tools/role.d/udev Role script completed. Creating Xen configuration file Done Setting up root password Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully All done Logfile produced at: /var/log/xen-tools/ubuntu-test-machine.log user@hostname:~$ Looking back, I think the bootload issue was caused by me commenting out the kernel/initrd lines in the main xen-tools configuration file. I'm not sure, but I'm loopback-mounting, and chroot-installing a kernel, so I'll find out soon. Also, I think the kernel version needed is "2.6.31-16-generic".
hi folks, you can practically watch the guest creation in unbuntu on this link http://linuxandfriends.com/2009/02/12/create-an-ubuntu-guest-in-virtualbox/ thanks