Hi,
I'm currently trying to boot a Xen VM with the root file system on NFS
via libvirt. Previously we used a small python script and "xm create" to
boot a number of VMs (which worked fine). Now I'm trying to integrate
that functionality in a python project which uses libvirt, but
sadly booting the VMs fail.
The small script constructs a Xen command line which looks like the
following:
create =("/usr/sbin/xm create /foo.cfg \
kernel=%s ramdisk=%s memory=64\
root=/dev/nfs nfs_server=%s nfs_root=%s name=%s vif='mac=%s'\
dhcp='dhcp' vcpus=1 extra='init=/stateless.sh xencons=tty1'\
")%(vm_kernel, vm_ramdisk, vm_nfs_server, vm_nfs_root, hostname, vif)
kernel and ramdisk are the path to the installed version, vm_nfs_server is the
IP address of the NFS server and vm_nfs_root the path to the operating system
installation (which is a Debian Linux). Firing up the script brings up
all VMs with a read-only NFS root file system.
Now I tried to do this with libvirt, but all attempts failed with the
following error popping up after the VM boots (after a certain
time(out)):
Gave up waiting for root device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Check root= (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/nfs does not exist. Dropping to a shell!
BusyBox v1.10.2 (Debian 1:1.10.2-2) built-in shell (ash)
Enter 'help' for a list of built-in commands.
/bin/sh: can't access tty; job control turned off
(initramfs) cat /proc/cmdline
root=/dev/nfs nfs_server=10.0.0.150 nfs_root=/opt/xge/util/ph
vif="mac=1A:00:00:00:00:64" dhcp=dhcp extra="init=./stateless.sh
xencons=tty"
The cmdline looks the same as in the script, but booting won't work. I
can provide the libvirt XML used to boot the VM and further information
if that is necessary.
Cheers
Matthias
PS: I'm using Xen 3.2.1, Kernel 2.6.26 and libvirt 0.6.3 from Debian
here.