[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



Yes and no.  The part of the card that drives the monitor is unused, but the part of the card that speeds up graphical operations *does* get used by the nVidia driver.  HTH!

Paul

Emre Erenoglu wrote:
OK now I understood. Good use :)

Which also means that you don't actually use the exported PCI-X card in your DomU to display user interface and play fancy Compiz and 3D games.

I tried once, nvidia module failed to load with some memory map error, didn't try after...

Emre


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

I'm doing it to speed up graphic operations in general, and for specific programs.  pfstools generates tone-mapped images from high-dynamic-range images, but it is a slow process.  The developers are working on the ability to use the video card's GPU to do some of the complex calculations.  I can't recall what the exact numbers reported were, but my recollection is that using the GPU reduced the calculation time by at least one, if not two or three, orders of magnitude.

Another reason is that the nVidia card is PCI-X, and this particular box is the only one I have with PCI-X.  I hate to see good hardware go to waste... :-)

Paul

Emre Erenoglu wrote:
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




--
Emre Erenoglu
erenoglu@xxxxxxxxx

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

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.