OpenVZ Forum


Home » General » Support » Configure virtualized /proc
Configure virtualized /proc [message #34390] Sun, 28 December 2008 16:41 Go to next message
kjo.hansi.glaz
Messages: 7
Registered: December 2008
Junior Member
Hi !

I'm trying to find out how to add entries in /proc of an openvz container, and I found no documentation at all. A only find information on adding /dev entries (with vzctl --devnodes).

What I'm tring to do is to add /proc/bus/pci in a container. Is it possible ?

Thanks by advance !
Re: Configure virtualized /proc [message #34394 is a reply to message #34390] Mon, 29 December 2008 08:40 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

why do you need to get such information from inside the VE?
Re: Configure virtualized /proc [message #34402 is a reply to message #34394] Mon, 29 December 2008 16:49 Go to previous messageGo to next message
kjo.hansi.glaz
Messages: 7
Registered: December 2008
Junior Member
Quote:

why do you need to get such information from inside the VE?

Because I'd like tu run X. Please don't tell me it's stupid, I know it could be, I just wanna do it fore some reason. If that's a problem for you just don't waste your time to answer.

I hope anyway that some people will answer me !

Thanks by advance.
Re: Configure virtualized /proc [message #34403 is a reply to message #34402] Mon, 29 December 2008 17:03 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Please, look at this page. Hope it could be helpful

http://wiki.openvz.org/X_inside_VE
Re: Configure virtualized /proc [message #34408 is a reply to message #34403] Mon, 29 December 2008 20:49 Go to previous messageGo to next message
kjo.hansi.glaz
Messages: 7
Registered: December 2008
Junior Member
Thanks, but that was where I began and it does NOT cover the topic on how to run an X server inside a VE, it only covers "ways to run X applications inside your container" using another X server for the display.

I invesigate and I really think that I miss /proc/bus/pci/02/00.0 inside the VE.
Re: Configure virtualized /proc [message #34411 is a reply to message #34408] Tue, 30 December 2008 09:48 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

the main problem is to achieve hardware from inside the VE.
Why don't you start additional X server inside VE0 (or inside external machine) and X applications (or complete X environment) inside VE?

Could you possibly describe what has been done?
What kind of capabilities did you grant to VE, what kind of devices you had to create? What kind of xorg configuration file do you use?

Do you think that /proc/bus/pci/02/00.0 whould be sufficient? Could you please show the output while X server is starting inside VE?

[Updated on: Tue, 30 December 2008 11:22]

Report message to a moderator

Re: Configure virtualized /proc [message #34412 is a reply to message #34411] Tue, 30 December 2008 11:23 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

the main problem is to achieve hardware from inside the VE.
Why don't you start additional X server inside VE0 (or inside external machine) and X applications (or complete X environment) inside VE?

Could you possibly describe what has been done?
What kind of capabilities did you grant to VE, what kind of devices you had to create? What kind of xorg configuration file do you use?

Do you think that /proc/bus/pci/02/00.0 whould be sufficient? Could you please show the output while X server is starting inside VE?

Re: Configure virtualized /proc [message #34413 is a reply to message #34411] Tue, 30 December 2008 11:38 Go to previous messageGo to next message
kjo.hansi.glaz
Messages: 7
Registered: December 2008
Junior Member
Hi !

Quote:

the main problem is to achieve hardware from inside the VE.
Why don't you start additional X server inside VE0 (or inside external machine) and X applications (or complete X environment) inside VE?


I want to set up a machine with a LAN server, an internet server and a desktop. So I use openvz to separate the LAN server and the internet server and I thought it would be nice to separate also the desktop. I know that I can run the X server inside VE0 and X environnement inside VE, but I thought it would be nice to have no big application running on VE0. Perhaps that is a stupid assumtion, given that giving a VE enough capabilities to run X is perhaps not better than running X inside VE0. Anyway I began to investigate and would have been happy to find a solution.

Googeling the web I found nobody successfuly running X server on openvz, but lots of people doing that on vservers, so I think it's possible.

Quote:

Could you possibly describe what has been done?
What kind of capabilities did you grant to VE, what kind of devices you had to create? What kind of xorg configuration file do you use?


What I tried on a testing machine (on which X runs also on VE0 and which is NOT my server) :

sudo aptitude install xserver-xorg udev_
vzctl set <VEID> --capability sys_rawio:on --save
vzctl restart <VEID>

vzctl set <VEID> --devices c:1:1:rw --save
vzctl set <VEID> --devnodes mem:rw --save
vzctl set <VEID> --devices c:4:0:rw --save
vzctl set <VEID> --devnodes tty0:rw --save
vzctl set <VEID> --devices c:4:8:rw --save
vzctl set <VEID> --devnodes tty8:rw --save
vzctl set <VEID> --devices c:10:1:rw --save
vzctl set <VEID> --devnodes psaux:rw --save
vzctl set <VEID> --devices c:13:63:rw --save
vzctl set <VEID> --devnodes input/mice:rw --save


A also tried these, which didn't changed anything, then I removed them :
vzctl set <VEID> --capability ipc_lock:on --save
vzctl set <VEID> --capability ipc_owner:on --save
vzctl set <VEID> --capability sys_admin:on --save
vzctl set <VEID> --capability net_admin:on --save
vzctl set <VEID> --capability net_raw:on --save
vzctl set <VEID> --capability mknod:on --save
vzctl set <VEID> --devices c:10:175:rw --save
vzctl set <VEID> --devnodes agpgart:rw --save


The Xorg.conf I use on the machine on which I run the tests (which have Xorg in VE0) is nearly exactly the same that works on VE0:
# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "ServerFlags"
	 Option "AllowMouseOpenFail"  "true"
EndSection

Section "Files"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"latitude"
	Option		"XkbLayout"	"fr"
	Option		"XkbVariant"	"oss"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ImPS/2"
	Option		"Emulate3Buttons"	"true"
EndSection

Section "InputDevice"
	Identifier	"Synaptics Touchpad"
	Driver		"synaptics"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"auto-dev"
	Option		"HorizScrollDelta"	"0"
EndSection

Section "Device"
	Identifier	"ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]"
	Driver		"radeon"
	BusID		"PCI:1:0:0"
	Option		"XAANoOffscreenPixmaps"	"true"
	Option		"AddARGBGLXVisuals"	"true"
	Option		"EnablePageFlip"	"1"
	Option		"AGPMode"		"4"
	Option		"DynamicClocks" 	"true"
	Option 		"AccelMethod" 		"EXA"
EndSection

Section "Monitor"
	Identifier	"Écran générique"
	Option		"DPMS"
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Device		"ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]"
	Monitor		"Écran générique"
	DefaultDepth	24
	SubSection "Display"
		Modes		"1024x768"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice	"Synaptics Touchpad"
EndSection

Section "Extensions"
	Option "Composite" "enable"
EndSection


Quote:

Do you think that /proc/bus/pci/02/00.0 whould be sufficient? Could you please show the output while X server is starting inside VE?


I try to start X with :
X :0 vt8

And I get :
testvz:/# X :0 vt8

X.Org X Server 1.4.2
Release Date: 11 June 2008
X Protocol Version 11, Revision 0
Build Operating System: Linux Debian (xorg-server 2:1.4.2-9)
Current Operating System: Linux testvz 2.6.26-1-openvz-686 #1 SMP Mon Dec 15 20:27:00 UTC 2008 i686
Build Date: 15 November 2008  05:39:59PM
 
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Dec 30 11:11:51 2008
(==) Using config file: "/etc/X11/xorg.conf"
(EE) No devices detected.

Fatal server error:
no screens found


The my Xorg.0.log is :
X.Org X Server 1.4.2
Release Date: 11 June 2008
X Protocol Version 11, Revision 0
Build Operating System: Linux Debian (xorg-server 2:1.4.2-9)
Current Operating System: Linux testvz 2.6.26-1-openvz-686 #1 SMP Mon Dec 15 20:27:00 UTC 2008 i686
Build Date: 15 November 2008  05:39:59PM
 
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Dec 30 11:11:51 2008
(==) Using config file: "/etc/X11/xorg.conf"
(==) ServerLayout "Default Layout"
(**) |-->Screen "Default Screen" (0)
(**) |   |-->Monitor "Écran générique"
(**) |   |-->Device "ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]"
(**) |-->Input Device "Generic Keyboard"
(**) |-->Input Device "Configured Mouse"
(**) |-->Input Device "Synaptics Touchpad"
(**) Option "AllowMouseOpenFail" "true"
(==) Automatically adding devices
(==) Automatically enabling devices
(WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/share/fonts/X11/Type1" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
	Entry deleted from font path.
(WW) The directory "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" does not exist.
	Entry deleted from font path.
(==) FontPath set to:
	/usr/share/fonts/X11/misc
(==) RgbPath set to "/etc/X11/rgb"
(==) ModulePath set to "/usr/lib/xorg/modules"
(**) Extension "Composite" is enabled
(WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
(II) No APM support in BIOS or kernel
(II) Loader magic: 0x81e38a0
(II) Module ABI versions:
	X.Org ANSI C Emulation: 0.3
	X.Org Video Driver: 2.0
	X.Org XInput driver : 2.0
	X.Org Server Extension : 0.3
	X.Org Font Renderer : 0.5
(II) Loader running on linux
(II) LoadModule: "pcidata"
(II) Loading /usr/lib/xorg/modules//libpcidata.so
(II) Module pcidata: vendor="X.Org Foundation"
	compiled for 1.4.2, module version = 1.0.0
	ABI class: X.Org Video Driver, version 2.0
(++) using VT number 8

(WW) OS did not count PCI devices, guessing wildly
(II) Addressable bus resource ranges are
	[0] -1	0	0x00000000 - 0xffffffff (0x0) MX[B]
	[1] -1	0	0x00000000 - 0x0000ffff (0x10000) IX[B]
(II) OS-reported resource ranges:
	[0] -1	0	0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B)
	[1] -1	0	0x000f0000 - 0x000fffff (0x10000) MX[B]
	[2] -1	0	0x000c0000 - 0x000effff (0x30000) MX[B]
	[3] -1	0	0x00000000 - 0x0009ffff (0xa0000) MX[B]
	[4] -1	0	0x00
...

Re: Configure virtualized /proc [message #34417 is a reply to message #34413] Tue, 30 December 2008 16:38 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
A crazy but workable advice (I was able to run KDE environment inside VE) Smile :

Mount /proc from HN to VE. i.e.:


# umount -l /vz/root/$VEID/proc
# mount -t proc proc /vz/root/$VEID/proc

But seriously speaking you'd better run X server on the HN and all window stuff inside VE. It's not a big restriction but it provides isolation.
Re: Configure virtualized /proc [message #34424 is a reply to message #34417] Wed, 31 December 2008 01:25 Go to previous messageGo to next message
kjo.hansi.glaz
Messages: 7
Registered: December 2008
Junior Member
It isn't possible to configure which devices appears in a VE's proc, as it's possible to do in a VE's dev ?
Re: Configure virtualized /proc [message #34437 is a reply to message #34390] Fri, 02 January 2009 01:54 Go to previous messageGo to next message
januszzz is currently offline  januszzz
Messages: 50
Registered: January 2007
Location: Opole, Poland
Member
well....

the easiest way to run the desktop in VE is to install for example KDE without X at all... I just install nxserver and access the VE desktop with little, remote X server from nxclient package.

regards.

PS. I see no reason to run Xorg inside VE, if I'm not able to login remotely.

[Updated on: Fri, 02 January 2009 01:57]

Report message to a moderator

Re: Configure virtualized /proc [message #34443 is a reply to message #34413] Sat, 03 January 2009 13:59 Go to previous messageGo to next message
miguel is currently offline  miguel
Messages: 2
Registered: January 2009
Location: Brazil
Junior Member
Well, first things first. As far as I know, there is NO WAY you can run an X server inside a VE for various reasons.

But here is an idea: you can start gdm and run a full X desktop in the VE.

Put this in /etc/gdm/gdm.conf:

[daemon]
VTAllocation=false

[security]
DisallowTCP=false

[xdmcp]
Enable=true

[gui]

[greeter]

[chooser]

[debug]
[server-false]
name=false
command=/bin/false

[servers]
0=false


And then restart gdm.

On some another machine:
Xnest :1 -query VE_IP_ADDRESS -geometry 800x600


Be aware of the security impact of enabling XDMCP.
Re: Configure virtualized /proc [message #34447 is a reply to message #34417] Sat, 03 January 2009 18:16 Go to previous messageGo to next message
kjo.hansi.glaz
Messages: 7
Registered: December 2008
Junior Member
I tried this.

- With ati driver, X starts a little more, but "freezes" my display.

- With vesa driver, this works !

As you said, I'm not sure at all it's a good solution, but at least it works.

Thanks !
Re: Configure virtualized /proc [message #35551 is a reply to message #34447] Thu, 02 April 2009 22:11 Go to previous messageGo to next message
bbhenry is currently offline  bbhenry
Messages: 17
Registered: February 2009
Junior Member
Hi, can you explain what you've actually tried and worked?

I have also wanted to be able to access some kind of display device from HN inside VE.

But the concept of displaying your HN and a VE from the same video card already sounds conflicting: which machine should your monitor display? (HN or VE)?

So I was thinking of using 2 video cards or video cards with 2 displays, and pass the second display access to one of the VE we want to run X. So please help me on what is already being tested. And you mentioned that people who use Vserver has already done things like this?
Re: Configure virtualized /proc [message #38506 is a reply to message #34447] Mon, 28 December 2009 08:34 Go to previous message
bbhenry is currently offline  bbhenry
Messages: 17
Registered: February 2009
Junior Member
Just following up my own question. Doesn't the display get confused of which one to display?

The screen is showing VE0 or the container you have installed full X Server on?

What if I don't have full XServer installed , I just want to show the command line screen of the container on screen . Without doing vzctl enter VEID , can I still view the container by using the method in this thread?
What do I do after I have done the following:
Mount /proc from HN to VE. i.e.:
# umount -l /vz/root/$VEID/proc
# mount -t proc proc /vz/root/$VEID/proc
Previous Topic: DAHDI/Zaptel for Asterisk in OpenVZ (/proc issue)
Next Topic: Firewall and NAT
Goto Forum:
  


Current Time: Fri Jul 26 23:30:07 GMT 2024

Total time taken to generate the page: 0.03184 seconds