Debian Sid gets Xen 3.0

Posted by Steve on Mon 8 May 2006 at 07:21

Now that the Xen 3.0 packages have made it to Debians unstable distribution installation has become much more straightforward. Here we'll take a look at installing and getting started with it upon a generic unstable machine.

To start with we'll need to update our machine, so as root run:

apt-get update

Once you've got the most recent packages lists we can begin the work of installing the software properly. We'll need to install several packages:

  • xen-hypervisor-3.0
    • This is the hypervisor which will be booted by your machine.
  • linux-image-2.6.16-1-xen-686
    • This is the kernel that will be used for the Xen host, and guest domains.
  • xen-utils-3.0
    • These are the user-space utilities which are used for starting, stopping, and working with Xen domains.
  • libc-xen
    • This is a version of the C runtime libraries which doesn't suffer from the slowdown under Xen of the normal ibc.
  • Since the host I'm running upon has less than a gigabyte of memory I can use the normal Xen package. (Install xen-hypervisor-3.0-i386-pae if you need more memory.)

    root@steve:~# apt-get install xen-hypervisor-3.0-i386 xen-utils-3.0 
    

    Once installed your next step depends on whether you're happy with the default kernel available in the Debian repository, or whether you'd like to install a kernel from scratch. I usually prefer using stock kernels, unless I need some specific hardware support that isn't available, so I'll just choose the default imag:

    root@steve:~# apt-get install linux-image-2.6.16-1-xen-686 
    
    Kernel Package Problem

    The Xen kernel packages currently available in unstable don't create an initrd image when they are installed, so they fail to boot.

    Create one by running the following command after installing the kernel:

    mkinitrd  -o /boot/initrd.img-2.6.16-1-xen-686 2.6.16-1-xen-686
    

    (Adjust the type from 686 if you're using a different flavour of the kernel such as k7)

    Now that the kernel is installed and we have an initrd image we need to setup our bootloader to use it. Add something like the following to your /boot/grub/menu.lst file:

    title Xen 3.0 / XenLinux 2.6
    kernel /boot/xen-3.0-i386.gz noreboot
    module /boot/vmlinuz-2.6.16-1-xen-686 root=/dev/hda1 ro 
    module /boot/initrd.img-2.6.16-1-xen-686
    

    At this point you might wish to adjust the network settings that Xen will use. The xend daemon is configured via the file /etc/xen/xend-config.sxp, and this is commented pretty thoroughly.

    For typical use the following are sufficient:

    (network-script network-bridge)
    (vif-script vif-bridge)
    

    Uncomment those lines and comment out any other settings for vif-script and network-script.

    We should now be able to install the minor support tools and reboot into our new system. Get them by running:

    root@steve:~# apt-get install bridge-utils iproute sysfsutils libc6-xen xen-tools
    

    All being well a reboot now should succeed and allow you to boot into your Xen system. If you have problems consult any open bugs against the Debian packages, and if that doesn't give you joy please consider describing your problem upon the xen-users mailing list.

    Assuming that you've got your new system booted correctly we can continue and create a new guest domain using the installed package xen-tools.

    Create a directory to contain your guest files:

    mkdir /home/xen
    

    Now edit the file /etc/xen-tools/xen-tools.conf to match your setup:

    #
    # /etc/xen-tools/xen-tools.conf
    #
    dir	= /home/xen
    size	= 2Gb  
    memory	= 128Mb
    swap	= 128Mb
    fs	= ext3 
    dist	= sarge
    gateway	= 192.168.1.1
    netmask	= 255.255.255.0
    passwd	= 1
    initrd  = /boot/initrd.img-2.6.16-1-xen-686
    kernel	= /boot/vmlinuz-2.6.16-1-xen-686
    mirror	= http://ftp.uk.debian.org/debian/
    

    Here I've stripped out comments, but you should find sufficient explanation included in the file. The important things to setup are:

    • The path to the kernel to boot, and the initrd image to use.
    • Your network gateway + netmask setup.
    • The size of the images + memory you wish to allocate to freshly created Xen instances.

    Once this is done you can create a new Xen guest image by executing the following command:

    xen-create-image --hostname=test --ip=192.168.1.222 --passwd
    

    Once the installation has finished, and you've been prompted to enter the new root password for the guest you can start the image by running:

    xm create test.cfg -c
    

    Press 'Ctrl+]' to exit from the console of the new system, and connect to it via SSH using the password specified when the image was created.

    If you receive errors booting you might need to specify a ramdisk to the xen instance. Do that by editing the Xen configuration file /etc/xen/test.cfg and adding a line:

    ramdisk = '/boot/initrd.img-2.6.16-1-xen-686'
    

    The 1.4 release of xen-tools will do this for you automatically, however this might not have moved to sid yet.

    Note: you don't need to use the xen-tools software to create new guest Xen domains. You can use debootstrap manually if you wish, or any other tools.

     

     


    Posted by Anonymous (82.43.xx.xx) on Mon 8 May 2006 at 08:01
    Erm I want to build my own kernels - where is the xen kernel source patch?

    Has the xen code made it into the debian kernel source package? But what if I want to build a xen kernel with firmwares and other stuff that Debian rips out?

    --
    Anonimouse

    [ Parent | Reply to this comment ]

    Posted by ultrotter (83.211.xx.xx) on Mon 8 May 2006 at 10:19
    [ Send Message ]
    You can find the most current kernel patch from the xen team on alioth...
    https://alioth.debian.org/projects/pkg-xen/

    [ Parent | Reply to this comment ]

    Posted by Anonymous (68.55.xx.xx) on Mon 8 May 2006 at 08:25
    It is worth noting that the Xen packages will be in backports any day now. The kernel images are already there.

    [ Parent | Reply to this comment ]

    Posted by ultrotter (83.211.xx.xx) on Mon 8 May 2006 at 10:30
    [ Send Message ]
    You need the -pae version of the hypervisor only if you have more than 4GB of ram.. The fix to the package description which specifies that is pending... If you make your own kernels with kernel-package the kernels will have a slightly different name, and the config files in /boot will be named a bit differently... In order to be able to create an initrd image with yaird you have to symlink that file to the "normal" name the config would have if it was not a xen kernel... In debian you might want to avoid the network-bridge script, live with the default network-dummy one and configure the bridge in the "debian way" under /etc/network/interfaces It might be useful to build and unprivileged and lightweight kernel if you want to run more than a few guest domains...

    [ Parent | Reply to this comment ]

    Posted by Anonymous (85.194.xx.xx) on Tue 9 May 2006 at 00:06
    A small correction: my experience was that PAE was needed even with 4GB of ram. Without PAE, I could only use around 3300MB, since the rest was more or less mapped by some low-level stuff.

    [ Parent | Reply to this comment ]

    Posted by Anonymous (80.96.xx.xx) on Wed 24 May 2006 at 12:56
    I've installed xen 3 and xen-tools on my ubuntu server and all seems well, until I try to start a client domain. (running on Linux xenserver 2.6.12.6-xen #1 SMP Wed Feb 1 21:23:17 UTC 2006 i686 GNU/ Linux)

    I get the error: "Error: Device 2049 (vbd) could not be connected. Backend device not found.

    Solution :
    I've set "use-ide = 1" in /etc/xen-tools/xen-tools.conf and recreated my images and it seems to work now.
    I figure that an IDE server has problems trying to run a SCSI domU.
    Just to confirm, changing use-ide = 1 and changing my /etc/init.d/ xend to read:

    start)
    modprobe loop max_loop=64
    cd /dev && /dev/MAKEDEV loop
    xend start
    await_daemons_up
    ;;

    fixed my problems. I now have three domU's working happily.




    [ Parent | Reply to this comment ]

    Posted by Anonymous (87.80.xx.xx) on Tue 24 Oct 2006 at 16:34
    i think the modprobe line does the trick - at least it did for me

    [ Parent | Reply to this comment ]

    Posted by randallb (69.116.xx.xx) on Wed 14 Feb 2007 at 15:55
    [ Send Message ]
    The modprobe line also fixed it for me. It looks like the 'loop' module wasn't being loaded at boot time nor by xen. I did a 'modprobe loop', restarted xend, and then was able to start the domU's. I added 'loop' to my /etc/modules so that it should load automatically on bootup.

    [ Parent | Reply to this comment ]

    Posted by Anonymous (193.83.xx.xx) on Sat 5 Apr 2008 at 22:46
    In my case it was simple a unplugged 'phy:' Device inside the 'DomU' 'configfile' at the 'Disk = [' Section...

    [ Parent | Reply to this comment ]

    Posted by Anonymous (84.220.xx.xx) on Fri 25 Apr 2008 at 16:19
    Y have the same problem, but i did not understand what changes to make in the file /etc/init.d/xend...
    somebody help me please!!!
    (escuse my bad english)

    [ Parent | Reply to this comment ]

    Posted by Anonymous (87.238.xx.xx) on Tue 9 May 2006 at 02:46
    Ok I can connect to the console and so on, but the part I didnt get how to properly set up the networking. I have this in my dom0:

    eth0 Link encap:Ethernet HWaddr 00:12:3F:0E:CF:ED
    inet addr:169.254.10.17 Bcast:169.254.255.255 Mask:255.255.0.0

    lo Link encap:Local Loopback

    peth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
    inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link

    vif0.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
    inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link


    xenbr0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
    inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link

    but nothing in my guest kernel..

    Do I have to setup a DHCP server? I put --dhcp in the xen-create-domain command
    Do I have to activate ip forwarding in the host kernel?

    Thank you

    [ Parent | Reply to this comment ]

    Posted by Steve (82.41.xx.xx) on Tue 9 May 2006 at 08:57
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    If you specify --dhcp then yes you'll need a DHCP server...

    IP forwarding shouldn't matter so long as you editted the xend-config.sxp appropriately.

    Steve

    [ Parent | Reply to this comment ]

    Posted by FRLinux (160.6.xx.xx) on Thu 6 Jul 2006 at 16:37
    [ Send Message ]
    Hello,

    I actually got the same issue, all the setup is working fine but none of the hosts is actually getting an IP. I did follow the setup by the book and i did uncomment these two lines in /etc/xen/xend-config.sxp :

    (network-script network-bridge)
    (vif-script vif-bridge)

    I also gave one in the configuration file, here's an example : vif = ['ip = "160.6.1.39", bridge=xenbr0']

    But right now, to be able to access the hosts, i have to boot them up and assign an IP address to them. What am I missing ?

    Steph

    [ Parent | Reply to this comment ]

    Posted by Steve (62.30.xx.xx) on Thu 6 Jul 2006 at 16:41
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    You still need to configure the IP address details of the new host in /etc/network/interfaces - did you do that?

    Steve

    [ Parent | Reply to this comment ]

    Posted by Steve (62.30.xx.xx) on Thu 6 Jul 2006 at 16:44
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    ps. the example you gave isn't correct:

    vif = ['ip = "160.6.1.39", bridge=xenbr0'] 
    

    You should have:

    vif = ['ip=160.6.1.39,bridge=xenbr0']
    

    (The quoting is different. Also note that the IP must be on the same range as your host/bridge.)

    Steve

    [ Parent | Reply to this comment ]

    Posted by FRLinux (160.6.xx.xx) on Thu 6 Jul 2006 at 16:55
    [ Send Message ]
    Thanks a lot it works great!

    My only remaining issue (minor one that is) is that every node i boot back up come with the main Xen hostname.

    Steph

    [ Parent | Reply to this comment ]

    Posted by Steve (62.30.xx.xx) on Thu 6 Jul 2006 at 16:57
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    Edit /etc/hostname on each new node - although if you're using xen-tools that should be handled automatically for you...

    Steve

    [ Parent | Reply to this comment ]

    Posted by FRLinux (160.6.xx.xx) on Thu 6 Jul 2006 at 17:03
    [ Send Message ]
    I did use xen-tools for the first node but it didn't change that. Not to worry, got a few nodes running, thanks again, next is FreeBSD :)

    Steph

    [ Parent | Reply to this comment ]

    Posted by Anonymous (128.131.xx.xx) on Tue 9 May 2006 at 09:47
    mkinitrd is no longer maintained.please use the update-initramfs from the initramfs-tools package:
    update-initramfs -c -k 2.6.16-1-xen-686

    [ Parent | Reply to this comment ]

    Posted by Anonymous (87.226.xx.xx) on Tue 9 May 2006 at 21:46
    also you dont need to put anything into menu.lst file - just run update-grub

    [ Parent | Reply to this comment ]

    Posted by spiney (85.124.xx.xx) on Thu 11 May 2006 at 17:38
    [ Send Message ]
    update-grub doesn't handle the special entries needed to boot into a Xen setup, it will just create a normal entry for the -xen kernel image (which won't even boot that way).
    --
    Debian GNU/Linux on an IBM Thinkpad T43p

    [ Parent | Reply to this comment ]

    Posted by fsateler (201.214.xx.xx) on Fri 12 May 2006 at 00:55
    [ Send Message | View Weblogs ]
    I am having trouble here running the nvidia module when running a xen kernel (notice not in a xen instance). When I issue module-assistant a-i nvidia, everything builds nicely, but when I modprobe it, I get a fatal error:
    nvidia: Unknown symbol xen_tlb_flush

    Any ideas on what can be causing it and/or how to avoid it?
    --------
    Felipe Sateler

    [ Parent | Reply to this comment ]

    Posted by Anonymous (71.199.xx.xx) on Mon 7 Aug 2006 at 00:45
    The nvidia module is a binary driver compiled against a particular version of the linux kernel. the Xen patches change alot about the kernel so the nvidia binaries aren't going to be compatable. If nvidia weren't a bunch of dicks - scuse me, didn't care about making money - they'd release their source and this wouldn't be a problem... solution... don't buy hardware that requires binary drivers.

    You'll have to use the open-source drivers that don't have 3D acceleration. Sorry, but there's not much you can do about this

    [ Parent | Reply to this comment ]

    Posted by fsateler (200.83.xx.xx) on Mon 7 Aug 2006 at 04:04
    [ Send Message | View Weblogs ]
    You are misinformed. The kernel interface to the driver is open source. So you can (and need) to recompile it for every version. There are people successfully using nvidia+xen combinations. My guess is that the problem lies in the System.map file, which is missing from the xen kernel packages.
    --------
    Felipe Sateler

    [ Parent | Reply to this comment ]

    Posted by clcastro (202.90.xx.xx) on Fri 12 May 2006 at 10:51
    [ Send Message ]
    I tried apt-get install
    but some of the package name shown in this guide cannot be found.
    what sid repository can u recommend for use? my location is Asia, Philippines.
    thanks!

    [ Parent | Reply to this comment ]

    Posted by Steve (82.41.xx.xx) on Fri 12 May 2006 at 11:31
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    My sources.list file just contains:

    #
    #  /etc/apt/sources.list
    #
    
    
    # Unstable
    deb     http://ftp.uk.debian.org/debian sid main contrib non-free
    deb-src http://ftp.uk.debian.org/debian sid main contrib non-free
    
    
    

    If there are newer packages the names might have changed, eg.linux-image-2.6.16-1-xen-686 might be -2-xen-686 by now.

    Running "apt-cache search [terms]" will probably help in that case.

    Steve

    [ Parent | Reply to this comment ]

    Posted by jasonmartens (64.105.xx.xx) on Fri 19 May 2006 at 18:24
    [ Send Message ]
    I'm trying to follow these instructions, but xen-tools and xen-utils-3.0 conflict with each other. Should I just uninstall xen-utils? What's the story?

    [ Parent | Reply to this comment ]

    Posted by paulproteus (151.196.xx.xx) on Tue 23 May 2006 at 02:58
    [ Send Message ]
    Above, I think the line:

    root@steve:~# apt-get install bridge-utils iproute sysfsutils libc6-xen xen-tools

    Should be:

    root@steve:~# apt-get install bridge-utils iproute sysfsutils libc6-xen xen-tools-3.0

    Steve, confirm or deny?

    --
    |/usr/games/fortune

    [ Parent | Reply to this comment ]

    Posted by Steve (62.30.xx.xx) on Tue 23 May 2006 at 17:10
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    Deny.

    The xen-tools package is my software and the package is called simply xen-tools.

    It doesn't conflict with anything either, so I'm not sure about the parent comment. (Unless it is xen-utils + xen-utils-3.0 conflict, in which case the solution is to unstall xen-utils-3.0.)

    Steve

    [ Parent | Reply to this comment ]

    Posted by jasonmartens (66.158.xx.xx) on Fri 2 Jun 2006 at 15:55
    [ Send Message ]
    Apologies. xen-tools recommends xen, which conflicts with xen-utils-3.0. The version of xen is currently 2.0.6-1, which makes me think this is for xen 2.0. Should I use the xen package, or the xen-utils-3.0 package?

    Jason

    [ Parent | Reply to this comment ]

    Posted by Steve (62.30.xx.xx) on Fri 2 Jun 2006 at 16:01
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    You are right the Debian "xen" package is for Xen 2.x, you don't want that.

    Instead you want the xen-utils-3.0 + xen-hypervisor-3.0 packages as explained in this article.

    I'm suprised you're seeing this problem with the xen-tools package though, since "Recommends" is only a suggestion, not a required package. Personally I use apt-get and ignore the recommended packages most of the time. Just don't install the recommended package and you'll be fine.

    If you're using something else which automatically installs recommended packages I'd regard that as broken ..

    (For what it is worth the version of Xen-tools in sid now recommends 'xen' or 'xen-hypervisor-3.0' - so this shouldn't be an issue anymore.)

    Steve

    [ Parent | Reply to this comment ]

    Posted by jasonmartens (66.158.xx.xx) on Fri 2 Jun 2006 at 17:03
    [ Send Message ]
    Thanks for the clarification. I was using aptitude, and it didn't force the recommends, I was just looking at it, and somewhat confused.

    Jason

    [ Parent | Reply to this comment ]

    Posted by Anonymous (207.194.xx.xx) on Thu 1 Jun 2006 at 21:06
    I've installed Xen 3.0 on a Sarge machine using the packages from backports.org. I'm not sure if its caused by the grub version or something specific to the way grub is configured in sarge, but I had to remove the leading /boot directory for my grub menu like this:
    title Xen 3.0 / XenLinux 2.6
    kernel /xen-3.0-i386.gz noreboot
    module /vmlinuz-2.6.16-1-xen-686 root=/dev/hda1 ro
    module /initrd.img-2.6.16-1-xen-686
    
    Hope that saves someone some frustration!

    [ Parent | Reply to this comment ]

    Posted by Steve (62.30.xx.xx) on Thu 1 Jun 2006 at 21:20
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    This is your grub setup I think.

    I'd guess that you have a seperate /boot partition? If so the images are relative to that - so the leading /boot isn't needed.

    If you have a single root, like I do, then you need it.

    Steve

    [ Parent | Reply to this comment ]

    Posted by Anonymous (84.203.xx.xx) on Fri 9 Jun 2006 at 21:47
    I had the same problem, but another i am having is that it kernel panics on md0 (my root partition is on a soft RAID1 slice). Any way around this ?

    Steph

    [ Parent | Reply to this comment ]

    Posted by Anonymous (24.49.xx.xx) on Tue 13 Jun 2006 at 21:39
    For anyone that already had the debianbase.de packages installed and running and tried to upgrade to Sid's version... Here's how:

    You'll need to stop your xen domUs first, then uninstall the xen packages. Be sure not to uninstall the xen-python libraries until after everything else is gone.

    Don't forget to un-install all the debianbase.de packages, they don't all conflict with the new stuff, but may cause trouble down the road.

    Now install all the new Sid Xen 3.0.2 packages,

    At the same time: You need to upgrade to a non-Xen 2.6.16 when you upgrade udev. If you don't the Xen-2.6.16 won't work. The dev filesystem will never get populated correctly.

    Once you have a working 2.6.16, you need to build an initrd for 2.6.16-xen. Don't use mkinitrd, it will NOT work. Use mkinitramfs-tools (ie: mkinitrafs-updaet -c -k 2.6.16-2-xen-686 ).

    Setup your grub menu.lst with the new xen, dom0 kernel, and initrd, boot into 2.6.16-xen, where previously it would complain that it can't find dev/console this time it should work.

    Now if you try to boot a domU it will fail with:
    Error: Device 0 (vif) could not be connected. Hotplug scripts not working.

    You need to link the xen-backend.rules file in /etc/udev from /etc/udev/rules.d
    cd /etc/udev/rules.d ; ln -s ../xen-backend.rules xen-backend.rules

    This will make the vif error go away, now you'll be getting cannot mount fs errors, unknown block device. This is because the initrd is now required for your domU to boot, so add this to your domU config file(s):
    ramdisk = "/boot/initrd.img-2.6.16-2-xen-686"

    or whatever would be appropriate.

    Now your domU should happily boot. Weeeeeee!

    Leeman

    [ Parent | Reply to this comment ]

    Posted by Anonymous (62.214.xx.xx) on Fri 23 Jun 2006 at 03:13
    Hi,

    After problems with source installation of Xen I tried this way and it seems much easier.
    I'm now on debootstrapping my hopefully working first xen domain. I had some problem with xen-create-image which had trouble when starting xt-install-image, and I didnt get a long time that I have to give an installation method.
    Couldn't get that of your HowTo (and also not from the script :). Maybe a hint to that in your text would be fine. maybe :

    xen-create-image --hostname=test --ip=192.168.1.222 --passwd --debootstrap

    thanks, this text helped a lot,

    greetz Adi

    [ Parent | Reply to this comment ]

    Posted by Anonymous (83.160.xx.xx) on Sun 2 Jul 2006 at 13:39
    Hi,

    I am not sure what the policy is on this web site, but it would be usefull if a couple of suggestions done in the comments would be propagated to the main article. I just used the article to set up xen and ran into a couple of issues. I figured them out, made notes and found them all covered in the comments. It would be easier if just the article were needed.

    The specific issues were:
    - --debootstrap option to xen-create-image
    - update-initramfs vs. mkinitrd
    - /boot in menu.lst.

    Still, this kind of article is of great help!

    Regards,

    Ruben

    [ Parent | Reply to this comment ]

    Posted by Steve (62.30.xx.xx) on Sun 2 Jul 2006 at 19:36
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    Comments tend to keep growing for weeks/months after the time an article was originally written, and it would be an insane amount of work to update the text to cover every problem/mistake noted in the comments.

    Especially when some of the articles describe software which has moved on, (eg. Apache 1.3 -> Apache 2.x). There might not be a sensible way of handling that short of rewriting the article from scratch!

    In short: Comments correcting mistakes and offering additional tips are very useful, but updating the article text isn't likely to occur unless a very glaring mistake is noticed early on.

    (I'll always update reported typos, or spelling errors though.)

    Regarding your points:

    • --debootstrap - Can be setup in the configuration file, /etc/xen-tools/xen-tools.conf.
    • /boot - Depends on your partition layout.
    • update-initramfs vs. mkinitrd - Good point, and I should have mentioned both.

    Steve

    [ Parent | Reply to this comment ]

    Posted by Mike_W (84.66.xx.xx) on Mon 24 Jul 2006 at 12:08
    [ Send Message ]
    I've got Xen up and running, but I still do not know how to get distributions besides those listed in the configuration file working. For example, how would I set up Zenwalk to work on Xen?

    Thanks

    [ Parent | Reply to this comment ]

    Posted by Steve (80.68.xx.xx) on Mon 24 Jul 2006 at 12:11
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    If they're not listed in the configuration file for xen-tools they aren't supported by it - I assume that is what you mean?

    You should be able to just "install into a file" using whatever means that system uses, and then start it up. Assuming Xen supports it of course.

    Perhaps check the archives of the xen-users mailing list?

    Steve

    [ Parent | Reply to this comment ]

    Posted by jsabater (80.36.xx.xx) on Tue 8 Aug 2006 at 11:26
    [ Send Message ]
    Thanks for your article, Steve.

    I've been following it to install Xen as of 2006/08/08 and I am having trouble when starting up the virtual machine. These are the last lines of the log:

    Using IPI Shortcut mode
    Freeing unused kernel memory: 144k freed
    usbcore: registered new driver usbfs
    usbcore: registered new driver hub
    USB Universal Host Controller Interface driver v2.3
    usbcore: registered new driver usbkbd
    drivers/usb/input/usbkbd.c: :USB HID Boot Protocol keyboard driver
    usbcore: registered new driver hiddev
    usbcore: registered new driver usbhid
    drivers/usb/input/hid-core.c: v2.6:USB HID core driver
    mice: PS/2 mouse device common for all mice
    SCSI subsystem initialized
    Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
    ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
    register_blkdev: cannot get major 8 for sd
    /bin/cat: /sys/block/sda/dev: No such file or directory
    Waiting 1 seconds for /sys/block/sda/dev to show up
    /bin/cat: /sys/block/sda/dev: No such file or directory
    Waiting 2 seconds for /sys/block/sda/dev to show up
    /bin/cat: /sys/block/sda/dev: No such file or directory
    Waiting 4 seconds for /sys/block/sda/dev to show up
    /bin/cat: /sys/block/sda/dev: No such file or directory
    Waiting 8 seconds for /sys/block/sda/dev to show up
    /bin/cat: /sys/block/sda/dev: No such file or directory
    Waiting 16 seconds for /sys/block/sda/dev to show up
    /bin/cat: /sys/block/sda/dev: No such file or directory
    Device /sys/block/sda/dev seems to be down.
    Debugging opportunity, type ^D to continue.
    /bin/dash: can't access tty; job control turned off

    I am running it on an up to date Debian Sid i386. Root partition has ReiserFS, /home partition has XFS. I am using the kernel that comes in the Debian packages (as I have not been able to compile one myself) and I am using initrd on Grub and ramdisk on /etc/xen/test.cfg.

    Any hints? Thanks in advance.

    --
    Jaume Sabater
    http://linuxsilo.net/

    "Ubi sapientas ibi libertas"

    [ Parent | Reply to this comment ]

    Posted by jsabater (80.36.xx.xx) on Tue 8 Aug 2006 at 12:12
    [ Send Message ]
    Just realized I forgot to edit /etc/xen/xend-config.sxp as stated in the article. I edited that file and rebooted the computer and now the error is gone, but a new one is here:

    I get the error: "Error: Device 2049 (vbd) could not be connected. Backend device not found.

    I am trying to follow the instructions in comment #17:

    http://www.debian-administration.org/articles/396#comment_17

    I have two Serial ATA devices in this computer, so I guess it could be the same problem.

    --
    Jaume Sabater
    http://linuxsilo.net/

    "Ubi sapientas ibi libertas"

    [ Parent | Reply to this comment ]

    Posted by Anonymous (84.207.xx.xx) on Thu 17 Aug 2006 at 15:53
    LILO is not able to boot XEN kernels by default, you'll have to use mbootpack before that.

    Please have a look at http://cyril.bouthors.org/blog/index/2006/08/17/16-xen-lilo for more information.

    Thanks

    [ Parent | Reply to this comment ]

    Posted by ptomblin (69.207.xx.xx) on Tue 21 Nov 2006 at 00:04
    [ Send Message ]
    I had a system with Debian sarge on which I'd installed a semi-working Xen. I wanted to try the pre-packed xen from this web page. So I upgrade to sid, and tried to follow the instructions. When I installed, it told me that there were existing files, but I told it to replace them all with the ones from the package. But when I booted the dom0, I found the following two problems, probably related.

    1. I didn't get any xenbr or vif interfaces, only eth0 and lo.

    2. xend won't start. The message in /var/log/xen/xend.log says "[2006-11-20 13:54:48 xend 4457] ERROR (__init__:1072) Exception starting xend ((
    111, 'Connection refused'))"

    Any ideas?

    [ Parent | Reply to this comment ]

    Posted by ptomblin (69.207.xx.xx) on Tue 21 Nov 2006 at 03:01
    [ Send Message ]
    Ok, never mind. I'm an idiot. I'd installed the wrong version of the hypervisor - there is one marked 3.0-unstable and one marked 3.0.3-1 and I installed the -unstable one. I've now got a dom0 up and running.

    [ Parent | Reply to this comment ]

    Posted by ptomblin (69.207.xx.xx) on Tue 21 Nov 2006 at 12:49
    [ Send Message ]
    Now that I have my domUs up and running (manually created on LVM volumes, not using the script provided), I have a question: How can I get iptables running on the domUs? An attempt to do an iptables -L command results in
    # iptables -L
    modprobe: Can't open dependencies file /lib/modules/2.6.18-2-xen-686/modules.dep (No such file or directory)
    iptables v1.2.11: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.
    

    [ Parent | Reply to this comment ]

    Posted by Steve (80.68.xx.xx) on Tue 21 Nov 2006 at 12:56
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    Make sure you've copied the modules belonging to the kernel into the domU.

    This error appears to be saying that /lib/modules/xxx in the domU doesn't have anything in it. Copy from the dom0.

    Steve

    [ Parent | Reply to this comment ]

    Posted by ptomblin (165.170.xx.xx) on Tue 21 Nov 2006 at 14:26
    [ Send Message ]
    I copied in the modules, and it doesn't seem to help. I got
    xen1-test:~# iptables -L
    modprobe: QM_MODULES: Function not implemented
    
    modprobe: QM_MODULES: Function not implemented
    
    modprobe: Can't locate module ip_tables
    iptables v1.2.11: can't initialize iptables table `filter': iptables who? (do you needto insmod?)
    Perhaps iptables or your kernel needs to be upgraded.
    xen1-test:~# depmod -a
    depmod: QM_MODULES: Function not implemented
    
    xen1-test:~# logout
    

    [ Parent | Reply to this comment ]

    Posted by Steve (80.68.xx.xx) on Tue 21 Nov 2006 at 14:30
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    The only time I've seen that was when mixing 64bit dom0 and 32bit domU - since in that cases the modules didn't match.

    If that isn't what you're I'd suggest reporting it on the xen-users mailing list, or searching google to see if there are any other obvious causes..

    Steve

    [ Parent | Reply to this comment ]

    Posted by ptomblin (165.170.xx.xx) on Tue 21 Nov 2006 at 14:47
    [ Send Message ]
    Found the problem! Evidently debootstrap installed modutils. I installed module-init-tools, and all is well.

    Thanks for putting up with my dumb questions.

    [ Parent | Reply to this comment ]

    Posted by Anonymous (84.164.xx.xx) on Wed 28 Feb 2007 at 21:53
    THANKS - THAT'S what I missed all the time ;-))))))))

    greetings LeoLinux.de

    [ Parent | Reply to this comment ]

    Posted by Anonymous (194.145.xx.xx) on Thu 28 Jun 2007 at 10:12
    Hi,
    I'm using debian etch
    So I try to install xen on it using xen-tools
    kernel version is 2.6.18-4 / w/t xen support /

    so I made disk, installation and swap via xen-create-image --hostname blabla --ip x.x.x.x ......
    it created me blabla.cfg in /etc/xen directory
    so now i'm trying to use
    xm create blabla.cfg -c and xen returns me:

    Using config file "blabla.cfg".
    Error: Device 0 (vif) could not be connected. Hotplug scripts not working.

    What dos it mean this error ? vif is vurtial interface, but as it see in ifconfig there is no vifx.x. interfaces ...
    So what shall I do ?

    Best Regards,
    Georgi

    [ Parent | Reply to this comment ]

    Posted by Steve (80.68.xx.xx) on Thu 28 Jun 2007 at 10:23
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    You should look at the xen logs to see what the error is coming from, then report it upon the xen-users mailing list.

    Most likely you've not changed /etc/xen/xend-config.sxp to be a bridge, or a routed setup..

    Steve

    [ Parent | Reply to this comment ]

    Posted by Anonymous (194.145.xx.xx) on Thu 28 Jun 2007 at 10:53
    Thank you Steve,
    I change it in xend-config.sxp
    from bridge to route
    now i receive another error :(

    Using config file "blabla.cfg".
    Error: Device 0 (vif) could not be connected. Hotplug scripts not working.

    so I check in cfg file is it there ramdisk:
    ramdisk = '/boot/initrd.img-2.6.18-4-xen-686'

    and also i checked for link in /etc/udev/rules.d
    z60_xen-backend.rules -> ../xen-backend.rules

    so do you know other possible problem from this error ?

    Best Wishes,
    Georgi

    [ Parent | Reply to this comment ]

    Posted by Steve (80.68.xx.xx) on Thu 28 Jun 2007 at 11:09
    [ Send Message | View Steve's Scratchpad | View Weblogs ]

    I can't guess the reason for the error, no.

    There are lots of things that could cause it. I'd suggest you look at /var/log/xen*.log - possibly after updating xend-config.sxp to increase the debug levels.

    But here isn't the place to get Xen help. The xen-users mailing list is the correct place; people there will be much better able to help you.

    Steve

    [ Parent | Reply to this comment ]

    Posted by Anonymous (194.145.xx.xx) on Thu 28 Jun 2007 at 12:23
    hi anagin

    [2007-06-28 13:02:48 xend.XendDomainInfo 10922] DEBUG (__init__:1072) XendDomainInfo.handleShutdownWatch
    [2007-06-28 13:02:48 xend 10922] DEBUG (__init__:1072) Waiting for devices vif.
    [2007-06-28 13:02:48 xend 10922] DEBUG (__init__:1072) Waiting for 0.
    [2007-06-28 13:02:48 xend 10922] DEBUG (__init__:1072) hotplugStatusCallback /local/domain/0/backend/vif/21/0/hotplug-status.
    [2007-06-28 13:04:28 xend.XendDomainInfo 10922] DEBUG (__init__:1072) XendDomainInfo.destroy: domid=21
    [2007-06-28 13:04:28 xend.XendDomainInfo 10922] DEBUG (__init__:1072) XendDomainInfo.destroyDomain(21)


    this is from xend.log


    so in here there is no /local/domain/0/backend/vif/21/0/hotplug-status such file !!!

    did you know what Xen looking for ?


    BR,
    Georgi

    [ Parent | Reply to this comment ]

    Posted by Anonymous (87.217.xx.xx) on Sat 7 Jul 2007 at 16:01
    Hi, I don't find the kernel images for Xen in sid repository. Where I cand find it?

    Thanks.

    [ Parent | Reply to this comment ]

    Sign In

    Username:

    Password:

    [Register|Advanced]

     

    Flattr

     

    Current Poll

    Which init system are you using in Debian?






    ( 1068 votes ~ 7 comments )