[Lxc-users] xf86OpenConsole: VT_ACTIVATE failed: Invalid argument

Guillaume Thouvenin guillaume.thouvenin at polymtl.ca
Thu Mar 21 09:44:26 UTC 2013


Hello everybody,

  I'm still trying to run an X server in a container with GLX support. 
I compiled the official driver provided by nvidia. Everything worked 
fine and I could load the kernel module. So I started X. The 
nvidia_drv.so was loaded correctly, I was exited but at the end of the 
Xorg.0.log I got:

[174183.355] (II) LoadModule: "nvidia"
[174183.356] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[174183.356] (II) Module nvidia: vendor="NVIDIA Corporation"
[174183.356]    compiled for 4.0.2, module version = 1.0.0
[174183.356]    Module class: X.Org Video Driver
[174183.356] (II) NVIDIA dlloader X Driver  304.54  Sat Sep 29 00:07:17 
PDT 2012
[174183.356] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[174183.356] (--) using VT number 2

[174183.356] (WW) xf86OpenConsole: VT_GETSTATE failed: Invalid argument
[174183.356] Fatal server error:
[174183.356] xf86OpenConsole: VT_ACTIVATE failed: Invalid argument


I "straced" the problem and I found something that seems intresting to me:

X is opening "/dev/tty2" and does an ioctl that fails:

   open("/dev/tty2", O_RDWR|O_NONBLOCK) = 9
   ioctl(9, VT_GETSTATE, 0x7fff94f0fc60) = -1 EINVAL (Invalid argument)

I'm using an ubuntu 12.04.2. I created a file /etc/inittab where I added:

c1:2345:respawn:/sbin/agetty -8 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 38400 tty3 linux
c4:2345:respawn:/sbin/agetty -8 38400 tty4 linux

And I also added "lxc.tty = 4" in my lxc configuration file but There 
is still a problem with /dev/tty2.

If anyone has some hints or any links to help me he is welcome :)

Note: I tested the xorg.conf outside the container (ie on the host) and 
it is working. Now I want to do the same but in the container so on the 
host I did an "rmmod" on the nvidia kernel module and halted the X 
server.

The complete lxc config file is pasted at the end of the email.

Regards,
Guillaume


lxc.network.type=veth
lxc.network.link=local_br
lxc.network.name=eth0
lxc.network.flags=up
lxc.network.hwaddr = 52:54:BE:EF:4b:96

lxc.network.type=veth
lxc.network.link=mngmtbr
lxc.network.name=eth1
lxc.network.flags=up
lxc.network.hwaddr = 52:54:BE:EF:4b:97

#Network is configured inside the guest otherwise
#gateway is not well sets. Maybe a LXC bug...
#lxc.network.ipv4=192.168.35.13/24
#lxc.network.ipv4.gateway=192.168.35.1
lxc.utsname = testvm1

lxc.devttydir = lxc
lxc.tty = 4
lxc.pts = 1024
lxc.mount  = /var/lib/lxc/testvm1/fstab
lxc.arch = amd64
lxc.cap.drop = mac_admin
lxc.pivotdir = lxc_putold

# uncomment the next line to run the container unconfined:
#lxc.aa_profile = unconfined

lxc.cgroup.devices.deny = a
# Allow any mknod (but not using the node)
lxc.cgroup.devices.allow = c *:* m
lxc.cgroup.devices.allow = b *:* m

# /dev/mem
lxc.cgroup.devices.allow = c 1:1 rwm
# /dev/null and zero
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm

# consoles
lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 4:0 rwm
lxc.cgroup.devices.allow = c 4:1 rwm
lxc.cgroup.devices.allow = c 4:2 rwm
lxc.cgroup.devices.allow = c 4:3 rwm
lxc.cgroup.devices.allow = c 4:4 rwm

# /dev/{,u}random
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm

# rtc
lxc.cgroup.devices.allow = c 254:0 rwm

#fuse
lxc.cgroup.devices.allow = c 10:229 rwm

#tun
lxc.cgroup.devices.allow = c 10:200 rwm

#full
lxc.cgroup.devices.allow = c 1:7 rwm

#hpet
lxc.cgroup.devices.allow = c 10:228 rwm

#kvm
lxc.cgroup.devices.allow = c 10:232 rwm

# vga_arbiter
lxc.cgroup.devices.allow = c 10:63 rwm

# nvidia
lxc.cgroup.devices.allow = c 195:* rwm

# fb0
lxc.cgroup.devices.allow = c 29:0 rwm

lxc.rootfs = /dev/lxcvg/testvm1lv






More information about the lxc-users mailing list