WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Exported PCI video to domU. Need another video card for

To: "Xen Users" <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Exported PCI video to domU. Need another video card for console?
From: "Emre Erenoglu" <erenoglu@xxxxxxxxx>
Date: Tue, 13 Nov 2007 15:20:02 +0100
Delivery-date: Tue, 13 Nov 2007 06:21:02 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=vpWvACGFekxd7c5pg9L3A29xhcCORsC04LcXscPYmEg=; b=d9E4fn1ydHo2UkWew5r97M2Cuvrt/ZMjKzdDIJNyshOnGpWoFBWBH0SFuEIEjJPdnO77jB8yGDKqtBMC3Tns3l224if/xJBQSi2t9HDQTMBnqo/DprGonVb/C8V67k6ju9DJKjHouLdBFjBnUVZZuaWYVVrrrWm6E30tNmq43GQ=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=kyuVaoFEIZhl4ynH7aWyKRq2mzpxpWMb2bnSHRqgscge/HFvJqJcBPRPMDsYJS55aPnX142k8mtIA44bX787hRuq0Z/t/MV1xp7v1O4sys2sD/J929aEt/qe7XRgciQq/BW9mUHPJC0VEY/TggOAIZ5Au6ClelBn/nJ1jzCqtCY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4739B070.4040708@xxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <47385A0B.8060009@xxxxxxxxxxxxx> <4739B070.4040708@xxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi Paul,

I didn't really understand why you're trying to hide your PCI card. In your NX based setup, the KDE or KDM on the remote DomU (if I understand right) does not need a physical graphic card anyway. They run without it very well. You can still use NX to have the user interface of KDE running inside a DomU. (Dom0 also)

So why are you doing it?

Best regards,

Emre


On Nov 13, 2007 3:10 PM, Paul Waldo <pwaldo@xxxxxxxxxxxxx> wrote:
Paul Waldo wrote:
Hi all,

I'm exporting my nVidia video card to one of my domUs.  It works great, but I am unable to get a console on the dom0.  I'm assuming this is because the video card is in use by the domU.  Does this make sense and, if so, can I solve this by adding abother PCI video card and connecting the monitor to that?  Thanks for helping!

Paul
Hi all,

I have receive numerous requests for how I did this, so I'm glad to give back!

I do have to provide a caveat, so don't get your hopes up yet...  My setup is that I have a 4 CPU Xeon box.  It is a big, loud, hot unit, so it is in the computer closet.  I am using a low-end machine on my desk as a fancy xterminal.  The idea is that KDE runs on the Xen box, and I interact with it via the open source version of NX from nomachine.com, running on my low-end machine.  NX allows desktop sharing as well as sound and printers to be seamlessly piped to the desktop box.  The only thing I haven't figured out is how to get peripherals attached to the desktop box (like a CF card reader or a USB DVD writer) to be automatically recognized on the Xen box...  The idea behind getting the domU to use the nVidia card is not necessarily for games and such, although that may work OK...

So anyway, here is what I did to make this all work:
The first thing to do is hide the video card from the dom0.  Here is the stanza from my GRUB menu.lst:
title           Xen 3.1 / Ubuntu 7.10, kernel 2.6.22-14-xen
root            (hd0,0)
kernel          /xen-3.1.gz dom0_mem=262144
module          /vmlinuz-2.6.22-14-xen root=/dev/mapper/hydra-root ro xencons=xvc console=xvc0 console=tty1 pciback.hide=(05:00.0)
module          /initrd.img-2.6.22-14-xen
quiet


The key here is "pciback.hide=(05:00.0)".  The number is obtained using the lspci command on dom0:
root@hydra:~# lspci|grep -i nvidia
05:00.0 VGA compatible controller: nVidia Corporation NV38GL [Quadro FX 1300] (rev a2)


So, once the changes are made to the GRUB config, reboot the machine.  Be prepared to SSH into the box, as you won't get a console!!!  The reason for this is that as far as the dom0 is concerned, the video card doesn't exist.  Actually, it may not be that dire.  IIRC, I was still able to get a console at this point, and it is the next step that prevented the console.  I know my memory, and would not rely on it too much if I were you.  Just make sure that sshd is running before you do any of this... :-)

OK, so now the video card has been unshackled from the dom0.  How do you get a domU to claim it?  Here is my domU's config file:
#
# Configuration file for the Xen instance gutsy, created
# by xen-tools 3.5 on Mon Nov  5 13:39:24 2007.
#
#
#  Kernel + memory size
#
kernel      = '/boot/vmlinuz-2.6.22-14-xen'
ramdisk     = '/boot/initrd.img-2.6.22-14-xen'
memory      = '1024'
vcpus       = '4'
extra       = 'xencons=xvc'
pci         = ['05:00.0']
#
#  Disk device(s).
#
root        = '/dev/sda1 ro'
disk        = [ 'file:/root/domains/gutsy/disk.img,sda1,w', 'file:/root/domains/gutsy/swap.img,sda2,w' ]
#
#  Hostname
#
name        = 'gutsy'
#
#  Networking
#
dhcp        = 'dhcp'
vif         = [ '' ]
#
#  Behaviour
#
> on_reboot   = 'restart'
on_crash    = 'restart'


The key line here is "pci = ['05:00.0']".  This tells the domU to claim the video card.  Reboot the domU and you should then be able to see the video card:
$ lspci
00:00.0 VGA compatible controller: nVidia Corporation NV38GL [Quadro FX 1300] (rev a2)


At this point, you can use it just like a normal machine.  Change your driver in xorg.conf from "nv" to "nvidia", "apt-get install nvidia-glx-new" to get the nVidia drivers, maybe do a reboot, and you are up and running!

As pointed out in the caveat, I DO NOT get graphical output from the video card, nor am I even able to log into the box from the console.  I am going to try putting an additional PCI video card into the machine for console logins, but I'm pretty happy with the setup.

Feel free to let me know if you have questions, and by all means let me know if you have success.  Good luck!

Paul

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users



--
Emre Erenoglu
erenoglu@xxxxxxxxx
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users