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] X server in a domU, with pci access and no X in dom0

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] X server in a domU, with pci access and no X in dom0
From: nicko.koinkoin@xxxxxxx
Date: Wed, 23 Aug 2006 13:39:49 +0200
Delivery-date: Wed, 23 Aug 2006 04:40:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <44EC2BB8.3050701@xxxxxxxxx>
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: <1156258958.44eb1c8e95433@xxxxxxxxxxxxxxxx> <3D0C0512-0E94-442C-A3BF-628F442A3FDB@xxxxxxxxx> <44EC257A.9050702@xxxxxxxxx> <44EC2BB8.3050701@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Internet Messaging Program (IMP) 3.2.5
First thanks to everybody for your answers.

In fact I forgot to tell some things about my configuration :

I use xen-2.0.7. If I am not using Xen-3 it is because I need support for 2.4
kernels, and because I want the direct PCI devices access.

Also I just try with a Debian domU (also 2.4.30), and I have the same error
about missing /dev/tty0, even if no error message are displayed at boot time
(so don't seem to be a Gentoo specific error).

I also try : # X vt1    , resulting in "missing virtual console 1" for the
debian domU and

Fatal server error:
xf86OpenConsole: VT_GETMODE failed

for the Gentoo domU.

> i've just reread the whole thread - it seems to me your problem is more
> with virtual consoles than grafix card isn't it?
> what distro did you install in the domU? do you have the devices
> /dev/ttyN in your DomU filesystem? could you post your /etc/inittab from
> DomU please?
>
> cheers
>
> galileon.

Exactly ! ;) Like said in my first post I used Gentoo Linux for both dom0 and
domU. What I did is hidden the video card for dom0, with the option
physdev_dom0_hide and give access to the video card to my domU, with option
pci=[...] in its configuration file (remenber I use xen2). I also add support
for device driver domain in the Linux kernel, and as I obtained a compilation
error, I add the option for privileged domain (after searching in google, if
compiling the support for device driver domain, we MUST add the privileged
option support... so is my domU could also manage domains ?(I hope no....)).

In my domU:
domU ~ # ls -l /dev/tty*
crw-r--r-- 1 root root 5, 0 Aug 23 13:27 /dev/tty
lrwxrwxrwx 1 root root    4 Aug 18 18:35 /dev/tty0 -> vc/0
lrwxrwxrwx 1 root root    4 Aug 18 18:35 /dev/tty1 -> vc/1
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty10 -> vc/10
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty11 -> vc/11
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty12 -> vc/12
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty13 -> vc/13
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty14 -> vc/14
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty15 -> vc/15
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty16 -> vc/16
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty17 -> vc/17
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty18 -> vc/18
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty19 -> vc/19
lrwxrwxrwx 1 root root    4 Aug 18 18:35 /dev/tty2 -> vc/2
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty20 -> vc/20
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty21 -> vc/21
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty22 -> vc/22
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty23 -> vc/23
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty24 -> vc/24
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty25 -> vc/25
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty26 -> vc/26
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty27 -> vc/27
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty28 -> vc/28
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty29 -> vc/29
lrwxrwxrwx 1 root root    4 Aug 18 18:35 /dev/tty3 -> vc/3
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty30 -> vc/30
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty31 -> vc/31
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty32 -> vc/32
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty33 -> vc/33
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty34 -> vc/34
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty35 -> vc/35
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty36 -> vc/36
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty37 -> vc/37
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty38 -> vc/38
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty39 -> vc/39
lrwxrwxrwx 1 root root    4 Aug 18 18:35 /dev/tty4 -> vc/4
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty40 -> vc/40
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty41 -> vc/41
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty42 -> vc/42
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty43 -> vc/43
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty44 -> vc/44
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty45 -> vc/45
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty46 -> vc/46
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty47 -> vc/47
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty48 -> vc/48
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty49 -> vc/49
lrwxrwxrwx 1 root root    4 Aug 18 18:35 /dev/tty5 -> vc/5
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty50 -> vc/50
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty51 -> vc/51
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty52 -> vc/52
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty53 -> vc/53
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty54 -> vc/54
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty55 -> vc/55
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty56 -> vc/56
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty57 -> vc/57
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty58 -> vc/58
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty59 -> vc/59
lrwxrwxrwx 1 root root    4 Aug 18 18:35 /dev/tty6 -> vc/6
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty60 -> vc/60
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty61 -> vc/61
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty62 -> vc/62
lrwxrwxrwx 1 root root    5 Aug 18 18:35 /dev/tty63 -> vc/63
lrwxrwxrwx 1 root root    4 Aug 18 18:35 /dev/tty7 -> vc/7
lrwxrwxrwx 1 root root    4 Aug 18 18:35 /dev/tty8 -> vc/8
lrwxrwxrwx 1 root root    4 Aug 18 18:35 /dev/tty9 -> vc/9

I also add the support for virtual terminals in the Linux kernel (I try, don't
know if really needed), and now startx returns :

Fatal server error:
xf86OpenConsole: Cannot find a free VT

and X vt1 always :

Fatal server error:
xf86OpenConsole: VT_GETMODE failed

Sorry for the size of this post, but I think that I gave all needed information,
no ?

thanks guys.

> Nawal Husnoo wrote:
> > hello all,
> >
> > (sorry for the first blank fwd:..., i clicked on send by accident
> > before typing the message - good thing it was not the global
> > thermonuclear war button from wargame)
> >
> > I just got NVIDIA drivers to work under Dom-0 in ubuntu linux
> > yesterday, and as i havent yet produced a tutorial for it and you only
> > need the nvidia anyway, ill explain only this
> >
> >
> > 1) configure and install your xen kernel, if its dom-0 boot into it,
> > (yours is domU, so you boot that virtual machine)
> > 2) download the patch from halfway down the screen in this link
> > http://www.nvnews.net/vbulletin/showthread.php?t=68648
> >
> > 3) copy-paste the script from further down the page, then you need to
> > adjust the script, only the first two lines need to change to reflect:
> > your nvidia-binary-you-got-from-nvidia.com,
> > your kernel version, ie uname -r
> >
> > you dont need to change anything in the patch itself, just leave
> > everything as it is, even the bits about 1.0-8756 (remember we're
> > probably dealing with the latest driver, ie 8762)
> >
> > eg, my first three lines:
> >
> > NVIDIA=NVIDIA-Linux-x86-1.0-8762-pkg1.run
> > KERNEL=2.6.16.13-xen
> > PATCH=patch-nv-1.0-8756-xen-3.0.2-2.txt
> >
> >
> >
> > now copy the NVIDIA-binary, patch, and script to /usr/src
> > and make sure you have a link in /usr/src/linux which points to your
> > linux kernel source tree (not your xen source) eg for me its
> > /homes/ubuntu/xen/xen-3.0-testing/linux-2.6.16.13-xen/
> >
> >
> > just execute the script, and it should produce the kernel module...
> >
> > at this point, my notes are a bit dark, and i had to
> > clean-install-recompile-xen three times to think of trying this:
> > apt-get install nvidia-glx
> > apt-get install nvidia-glx-dev
> >
> > then you do a dpkg-reconfigure xserver-xorg
> >
> > note the last three lines are for ubuntu/debian, and under another
> > distro that would simply be install the packages nvidia-glx and
> > nvidia-glx-dev, and modify
> >
> > Section "Device"
> >        Identifier      "NVIDIA Corporation NV40 [GeForce 6200?]"
> >        Driver          "nvidia"
> >        BusID           "PCI:1:0:0"
> >        Option          "RenderAccel"           "true"
> > EndSection
> >
> >
> > to include Driver "nvidia" instead of "nv"
> >
> >
> > i'm not sure if i needed those 2 packages, and  if yours works without
> > them, could you let me know please? i'm too tired of messing with xen
> > to reinstall just for that - its all working so perfectly now that i
> > need to get some holiday homework done!!
> >
> > and could you also let me know if the domU xserver likes the driver as
> > well, coz i think its a jolly good idea to run the xserver as well in
> > domU - though you might struggle with your mouse and keyboard as Adam
> > said...
> >
> > is your card PCI-Express? mine is, and hopefully the pci bit will
> > allow xen to pass it through...
> >
> > good luck,
> >
> > galileon.
> >
> >
> >
> > Adam Seering wrote:
> >> Hi,
> >>     Right now, in order for graphics cards to work properly, their X
> >> drivers have to be modified to recognize Xen.  I don't think this has
> >> been done for any open-source graphics card drivers; there is a way
> >> to get the NVidia binary module to work, but it requires a fair bit
> >> of Googling and kernel and module patching, and things like that.  I
> >> was able to follow the instructions at
> >> <http://www.nvnews.net/vbulletin/showthread.php?t=68703>, and with
> >> some tweaking I did get a graphics card to work.
> >>
> >>     Note that the domU doesn't have physical access to your
> >> hardware.  This means, No keyboard and mouse, unless you have a PCI
> >> USB card and you export that card to your domU as well, and configure
> >> X to use them.
> >>
> >> Adam
> >>
> >>
> >> On Aug 22, 2006, at 11:02 AM, nicko.koinkoin@xxxxxxx wrote:
> >>
> >>> Hi everybody
> >>>
> >>> I try to have a running X server in a domU.
> >>>
> >>> What I want is not to have an X server in dom0, for security
> >>> purposes. I know
> >>> that it is not an easy thing, but I need it. First I hide the video
> >>> card from
> >>> dom0, what is working fine. Indeed, lspci in dom0 doesn't show the
> >>> video card.
> >>>
> >>> I give direct access to the video card to my domU, thanks to its
> >>> configuration
> >>> file. But in fact I can't launch my X server. Indeed, during the
> >>> boot of my
> >>> domU, I got the following error message :
> >>>
> >>>  * Loading key mappings ...assuming iso-8859-1 cedilla
> >>> assuming iso-8859-1 acute
> >>> assuming iso-8859-1 diaeresis
> >>> assuming iso-8859-1 brokenbar
> >>> assuming iso-8859-1 threequarters
> >>> assuming iso-8859-1 currency
> >>> assuming iso-8859-1 onehalf
> >>> assuming iso-8859-1 onequarter
> >>> assuming iso-8859-1 currency
> >>> Couldnt get a file descriptor referring to the console
> >>>
> >>>  * Error loading key mappings
> >>>
> >>>     [ !! ]
> >>>  * Setting terminal encoding to ASCII
> >>> ...                                 [ ok ]
> >>>  * Setting user font ...Couldnt open //dev/vc/1
> >>> Couldnt open //dev/vc/2
> >>> Couldnt open //dev/vc/3
> >>> Couldnt open //dev/vc/4
> >>> Couldnt open //dev/vc/5
> >>> Couldnt open //dev/vc/6
> >>> Couldnt open //dev/vc/7
> >>> Couldnt open //dev/vc/8
> >>> Couldnt open //dev/vc/9
> >>> Couldnt open //dev/vc/10
> >>> Couldnt open //dev/vc/11
> >>>
> >>>  * Failed to set user font
> >>>
> >>>     [ !! ]
> >>>
> >>> So of course when typing startx, I got :
> >>>
> >>> Fatal server error:
> >>> xf86OpenConsole: Cannot open /dev/tty0 (No such device)
> >>>
> >>> I use Gentoo Linux with kernel 2.4.30 as my domU (the same for dom0,
> >>> but there
> >>> is no error messages during dom0 boot), the configuration file of my
> >>> domU is:
> >>>
> >>> kernel  = "/boot/vmlinuz-2.4.30-xenU-basic"
> >>>
> >>> memory  = 128
> >>>
> >>> name    = "domU"
> >>>
> >>> nics    = 1
> >>>
> >>> vif = ['mac=aa:00:00:00:00:d2, bridge=xen-br0']
> >>>
> >>> disk = ['phy:/dev/hda5,hda1,w',
> >>>         'phy:/dev/hda6,hda2,w']
> >>>
> >>> root = "/dev/hda1 ro";
> >>>
> >>> #extra="xencons=ttyS console=tty0"
> >>> extra="console=tty0"
> >>>
> >>> pci=['02,00,0']
> >>>
> >>> I also try to append the same options to my domU kernel as the ones
> >>> of dom0, but
> >>> thus no console is available during boot, so no display at all.
> >>> Please let's me know if what I try is a crazy thing, or if someone
> >>> has already
> >>> suceeded in having a running and usable X server in a domU with no X
> >>> in dom0,
> >>> or if it can be a Gentoo specific error due to devfs.
> >>>
> >>> Thanks a lot.
> >>>
> >>> _______________________________________________
> >>> 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
> >>
> >
> >
>
>
> _______________________________________________
> 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