You are viewing diffrentcolours

You Don't Live Like I Do - Virtualisation on Debian GNU/Linux 5.0 ("Lenny"), part 1: Xen [entries|archive|friends|userinfo]
Carefully, Correctly Wrong

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Virtualisation on Debian GNU/Linux 5.0 ("Lenny"), part 1: Xen [Nov. 4th, 2008|12:04 pm]
Previous Entry Add to Memories Share Next Entry
[Tags|, ]

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.

link

Comments:
[User Picture]From: 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.
(Replies frozen) (Thread)
[User Picture]From: 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.
(Replies frozen) (Parent) (Thread)
[User Picture]From: 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.
(Replies frozen) (Thread)
[User Picture]From: 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.
(Replies frozen) (Parent) (Thread)
From: (Anonymous)
2009-02-16 02:55 pm (UTC)

just install nvidia drivers

(Link)

download em, then

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

:)
(Replies frozen) (Thread)
[User Picture]From: diffrentcolours
2009-02-16 02:59 pm (UTC)

Re: just install nvidia drivers

(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
(Replies frozen) (Parent) (Thread)
From: (Anonymous)
2009-03-25 04:24 am (UTC)

Getting X to work with lenny and xen 3.2

(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.
(Replies frozen) (Parent) (Thread)
From: (Anonymous)
2009-08-18 11:25 am (UTC)

Re: Getting X to work with lenny and xen 3.2

(Link)

Thanks a mill! It works :)
(Replies frozen) (Parent) (Thread)
From: (Anonymous)
2009-08-18 01:29 pm (UTC)

Re: Getting X to work with lenny and xen 3.2

(Link)

Thanks a mill! It works :)
(Replies frozen) (Parent) (Thread)
From: (Anonymous)
2009-08-31 10:24 am (UTC)

Re: Getting X to work with lenny and xen 3.2

(Link)

Stoked! Worked for me too! Wow!
Thanks!!
(Replies frozen) (Parent) (Thread)
From: (Anonymous)
2010-01-14 01:50 pm (UTC)

Re: Getting X to work with lenny and xen 3.2

(Link)

Great!!!
That did the job!!!!
(Replies frozen) (Parent) (Thread)
From: (Anonymous)
2010-05-13 09:57 am (UTC)

Re: Getting X to work with lenny and xen 3.2

(Link)

Thank you very much, looking for a solution I found this and worked perfectly to me! :D
(Replies frozen) (Parent) (Thread)
From: (Anonymous)
2010-07-29 08:01 pm (UTC)

Re: Getting X to work with lenny and xen 3.2

(Link)

Thanks!!! This needs to be added to the Debian Lenny Xen wiki!!!
(Replies frozen) (Parent) (Thread)
From: (Anonymous)
2010-10-13 09:48 pm (UTC)

Re: Getting X to work with lenny and xen 3.2

(Link)

tu es un génie !! Merci et vive le logiciel libre =)
(Replies frozen) (Parent) (Thread)
From: (Anonymous)
2010-09-08 02:41 pm (UTC)

dcb

(Link)

it really works!!! thx!!!!
(Replies frozen) (Thread)
From: (Anonymous)
2011-01-31 10:28 pm (UTC)

Re: dcb

(Link)

Hi,
I'm lucky I found this on the web... I was stuck miserably, and got to get it working in seconds thanks to your trick!
This is why I love so much open folk who love sharing their knowledge for the benefit of everyone.
Thanks a lot.
jb
(Replies frozen) (Parent) (Thread)
From: elianamicra
2011-01-23 04:18 pm (UTC)

(Link)

I'm only using VMWare to run a Windows 7 instance under Ubuntu so my kid is able to play some RTS windows based games.
regcure
(Replies frozen) (Thread)
From: tonynrec
2011-06-03 07:21 am (UTC)

xf86MapVidMem Solved, Xen 4.0.0 With X finally

(Link)

Sir, you are a genious indeed, I was really struggling with this issue, and I couldn't even find an small clue about it... and you made it all easy for me.. and for us.. God bless you! As Da Vinci said once: "Simplicity is the ultimate sophistication". Thank you sooo much!!!!! Anthony!
(Replies frozen) (Thread)