Carefully, Correctly Wrong ([info]diffrentcolours) wrote,
@ 2008-11-04 12:04:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Entry tags:geek, virtualisation

Virtualisation on Debian GNU/Linux 5.0 ("Lenny"), part 1: Xen

Virtualisation basically means Running multiple pretend-computers on one real computer. Most people have heard of VMWare, a program which pretends to be a standard i386 or amd64 PC and lets you run GNU/Linux on Windows or vice-versa; there's also Parallels which is some Mac thing, and a host of other programs right down to QuickTransit which lets you run individual Solaris/SPARC apps on an amd64 system running Solaris or GNU/Linux. Virtualisation is big business, and modern Intel and AMD CPUs include hardware support to make your virtualisation go faster.

Over in the free software world, for a long time we've had User Mode Linux which lets you run a (modified) Linux kernel as a standard application on your GNU/Linux system. The big thing a few years ago however was Xen, one of the first high-performance free software virtualisation applications.

I've got a Xen setup on my desktop, which is still running the currently-stable version of Debian GNU/Linux. I use a virtual machine to connect to work, which keeps my work stuff and home stuff entirely separate. Given my plans to turn that desktop into a media player, I want to upgrade it to the soon-to-be-released (honest) Debian Lenny, which has more tightly integrated MythTV software.

Unfortunately, since the release of Etch, Xen has fallen out of favour in the Linux world; I understand that while other projects like OpenVZ and even VMWare were working on a consistent virtualisation interface in the kernel, which would improve interoperability between virtualisation technologies, Xen basically said Hang on, we invented this stuff in Linux, you lot should do it our way. Linux evolved without Xen, and now cramming Xen support back into Linux is a bit of a bodge job. OpenSUSE did it first, and Debian has recently started including their patch.

I started off by installing linux-image-2.6.26-1-xen-amd64, which set up a bootable kernel entry which didn't actually boot, hence this bug. It eventually transpires, after lots of Googling and asking on IRC, that I was supposed to install xen-linux-system-2.6.26-1-xen-amd64 which sets up a working kernel entry (as well as leaving a broken one but that's a separate bug).

Unfortunately, the Xen kernel in Lenny breaks both the vesa and nv drivers for the X Window System, meaning that you can't have both Xen virtualisation and a GUI at the same time:

Fatal server error:
xf86MapVidMem: Could not mmap framebuffer (0xd0000000,0x10000000) (Invalid argument)

It's been suggested that I can disable iommu to fix this, but I can't find out how to do that, and have read several things which suggest that it's impossible. Given how little success I've had in finding documentation about Xen in Lenny, which is a large part of the reason for me trying to file more bugs and write this blog post, I'm pretty much giving up hope of trying to get the technology I'm already familiar with to work. Next stop is going to be new kid on the block kvm.




(10 comments) - (Post a new comment)


[info]stilettowhore
2008-11-04 11:38 pm UTC (link)
It's stories like this that put me off touching linux with a 10-foot pole.
Which is a shame really, I'd like to try something other than Windows, but there's still no viable alternatives at the moment.

(Reply to this) (Thread)


[info]diffrentcolours
2008-11-08 12:04 pm UTC (link)
I'm trying to do something which is complicated on any operating system, on an as-yet-unreleased development version of a distribution. I'm not surprised that I'm running into a the odd problem.

(Reply to this) (Parent)


[info]thefalken
2008-11-08 01:37 am UTC (link)
Ya see, this is one of those things where I put my principles to one side and just install non-libre-but-free VMware *much like Flash).
It just works, and the new-ish v2 is faster than v1 too.

stilettowhore : You have to remember Dave is a geek, and trying loads of really=fairly-hard-on-any-platform stuff. Download a live CD of Ubuntu or something and give it a no-commitment go.

(Reply to this) (Thread)


[info]diffrentcolours
2008-11-08 11:58 am UTC (link)
I use VMWare at work, and while it is quite convenient, I'd like to try the alternatives as well for sake of comparison. Plus Xen, kvm etc. have both GUIs and a nice commandline interfaces, which probably suits me better.

(Reply to this) (Parent)

just install nvidia drivers
(Anonymous)
2009-02-16 02:55 pm UTC (link)
download em, then

export CC=gcc-4.1
export IGNORE_XEN_PRESENCE=1
Sh NVIDIA-Linux.run

:)

(Reply to this) (Thread)

Re: just install nvidia drivers
[info]diffrentcolours
2009-02-16 02:59 pm UTC (link)
1) I don't want to run software that isn't free

2) That's not a good way to install nVidia drivers on a Debian system anyway since nVidia's installer breaks your package management system

(Reply to this) (Parent)(Thread)

Getting X to work with lenny and xen 3.2
(Anonymous)
2009-03-25 04:24 am UTC (link)
I had a similar problem with X not working when i upgraded to lenny.

If your graphics card shares system memmory (i.e. integrated graphics) then limiting dom0 memory will sort out X. Even if memory is not shared this may solve your issue.

You have to pass an argument to xen using grub. This is my boot stanza in menu.lst, notice the dom0_men=930M option on the kernel line.

title GUI (Xen 3.2-1-amd64 / Debian GNU/Linux, kernel 2.6.26-1-xen-amd64)
root (hd0,0)
kernel /xen-3.2-1-amd64.gz dom0_mem=930M
module /vmlinuz-2.6.26-1-xen-amd64 root=/dev/mapper/system-root0 ro console=tty0 5
module /initrd.img-2.6.26-1-xen-amd64

Hope this helps.

(Reply to this) (Parent)(Thread)

Re: Getting X to work with lenny and xen 3.2
(Anonymous)
2009-08-18 11:25 am UTC (link)
Thanks a mill! It works :)

(Reply to this) (Parent)

Re: Getting X to work with lenny and xen 3.2
(Anonymous)
2009-08-18 01:29 pm UTC (link)
Thanks a mill! It works :)

(Reply to this) (Parent)

Re: Getting X to work with lenny and xen 3.2
(Anonymous)
2009-08-31 10:24 am UTC (link)
Stoked! Worked for me too! Wow!
Thanks!!

(Reply to this) (Parent)


(10 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…