Page 1 of 1

start windows vm with 3D Acceleration on thru ssh

Posted: 26. Oct 2016, 11:54
by jaoued
I'm using virtualbox on a debian server. I'm connecting thru ssh to this server.
I've created a windows 7 vm on it.
the VM start with 3D Acceleration off but do not start if I set this option to on. the driver is istalled on the guest vm.
I've find a way to start the VM by launching a X client on my desktop. this solution is not very good because if I'm leaving my ssh connection or if I turn of my X client, the vm freeze !
do you know if there is a way to turn on 3D Acceleration without needing a X client connection.

technical information :

Code: Select all

vboxmanage --version
5.0.24_Debianr108355

DISPLAY=:0 glxinfo | grep direct
direct rendering: Yes
    GL_ARB_derivative_control, GL_ARB_direct_state_access,
    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_indirect,
    GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect,

 vboxmanage showvminfo "windows7_32b"
Name:            windows7_32b
Groups:          /
Guest OS:        Windows 7 (32-bit)
UUID:            ***
Config file:     windows7_32b.vbox
Snapshot folder: Snapshots
Log folder:      Logs
Hardware UUID:   ***
Memory size:     3072MB
Page Fusion:     off
VRAM size:       256MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  2
PAE:             on
Long Mode:       off
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
Time offset:     0ms
RTC:             UTC
Hardw. virt.ext: on
Nested Paging:   on
Large Pages:     on
VT-x VPID:       on
VT-x unr. exec.: on
Paravirt. Provider: Default
State:           powered off (since 2016-10-21T07:04:52.000000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration:
Autostart Enabled: off
Autostart Delay: 0
Default Frontend:
Storage Controller Name (0):            IDE Controller
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
IDE Controller (0, 0): Empty
IDE Controller (0, 1): Empty
IDE Controller (1, 0): box-disk1.vmdk (UUID: ***)
NIC 1:           MAC: 08002799B15F, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 1 Rule(0):   name = ssh, protocol = tcp, host ip = 127.0.0.1, host port = 2222, guest ip = , guest port = 22
NIC 1 Rule(1):   name = tcp33389, protocol = tcp, host ip = , host port = 33389, guest ip = , guest port = 3389
NIC 1 Rule(2):   name = winrm, protocol = tcp, host ip = 127.0.0.1, host port = 55985, guest ip = , guest port = 5985
NIC 1 Rule(3):   name = winrm-ssl, protocol = tcp, host ip = 127.0.0.1, host port = 55986, guest ip = , guest port = 5986
NIC 2:           MAC: 080027392DDA, Attachment: Bridged Interface 'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: allow-all, Bandwidth group: none
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
UART 3:          disabled
UART 4:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           disabled
Clipboard Mode:  Bidirectional
Drag and drop Mode: disabled
VRDE:            disabled
USB:             enabled
EHCI:            disabled
XHCI:            disabled

USB Device Filters:

<none>

Bandwidth groups:  <none>

Shared folders:

Name: 'vagrant', Host path: 'windows7_32b' (machine mapping), writable

Video capturing:    not active
Capture screens:    0
Capture file:      windows7_32b.webm
Capture dimensions: 1024x768
Capture rate:       512 kbps
Capture FPS:        25

Guest:

Configured memory balloon size:      0 MB

Re: start windows vm with 3D Acceleration on thru ssh

Posted: 26. Oct 2016, 12:03
by Martin
3D accelleration works by passing thru 3D commands to the host graphics driver. If you try to start a guest in an environment which doesn't have a 3D host graphics available this doesn't work.
Also vagrant changes too much in/around the virtualbox installation so we cannot support uch a setup.

Re: start windows vm with 3D Acceleration on thru ssh

Posted: 26. Oct 2016, 14:04
by jaoued
ok I understand for vagrant but I just want to know if something is missing on my environement to get it work.
for exemple if I run glxinfo it respond an error after a timeout :

Code: Select all

glxinfo
MobaXterm X11 proxy: unable to connect to forwarded X server: Network error: Connection refused
Error: unable to open display localhost:10.0
but if I prefix this command with DISPLAY=:0 it work :

Code: Select all

 DISPLAY=:0 glxinfo | grep direct
direct rendering: Yes
    GL_ARB_derivative_control, GL_ARB_direct_state_access,
    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_indirect,
    GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect,
do you think it can be something like that for the 3D Acceleration option ?

Re: start windows vm with 3D Acceleration on thru ssh

Posted: 2. Nov 2016, 21:36
by jaoued
Hello all,

I'm going back to this problem.
so I've made some changes to make it work :
- I've bought an nvidia card and installed the drivers !
- I've removed virtualbox from debian repository and installed virtualbox 5.1.8 from http://download.virtualbox.org/virtualbox/debian/ repo.
- I've installed the lastest Guest Additions 5.1.8

but nothing changed. still the same problem.
I'va take a look to the log file, and there is the most relevant things :

Code: Select all

00:00:09.857256 OpenGL Info: Render SPU: Opening display localhost:11.0
00:00:09.857271 OpenGL Warning: Render SPU: display string looks like a proxy X server!
00:00:09.857273 OpenGL Warning: Render SPU: This is usually a problem!
...
00:00:22.525052 VMMDev: Guest Log: VBoxMP::DriverEntry: VBox WDDM Driver for Windows Vista and 7 version 5.1.8r111374, 32 bit; Built Oct 18 2016 14:52:56
00:00:22.525390 VMMDev: Guest Log: VBoxMP::DriverEntry: OsVersion(6, 1, 7601)
00:00:22.525815 VMMDev: Guest Log: VBoxMP::VBoxMpCrCtlConInit: Insufficient host 3D capabilities
00:00:22.525960 VMMDev: Guest Additions capability report: (0x0 -> 0x0) seamless: no, hostWindowMapping: no, graphics: no
00:00:22.526032 VMMDev: Guest Log: VBoxMP::DriverEntry: 3D is NOT supported by the host, but is NOT required for the current guest version using this driver, continuing with Disabled 3D..


Re: start windows vm with 3D Acceleration on thru ssh

Posted: 3. Nov 2016, 09:13
by Martin
Did you try it locally on the host system? I'm still not sure if 3D acceleration will/can work over a remote connection.

Re: start windows vm with 3D Acceleration on thru ssh

Posted: 3. Nov 2016, 10:45
by jaoued
I figured out how to attach to display, simply run :

Code: Select all

export DISPLAY=:0
don't know why I didn't think about this before :/

and I'm getting in the log :

Code: Select all

00:00:00.190759 OpenGL Info: Render SPU: Opening display :0
00:00:00.195240 OpenGL Info: Render SPU: Opening display :0
00:00:00.216183 OpenGL Info: Render SPU: GL_VENDOR:   NVIDIA Corporation
00:00:00.216195 OpenGL Info: Render SPU: GL_RENDERER: GeForce GTX 750 Ti/PCIe/SSE2
00:00:00.216197 OpenGL Info: Render SPU: GL_VERSION:  4.5.0 NVIDIA 352.79
00:00:00.216198 OpenGL Info: Render SPU: GL_EXTENSIONS: GL_AMD_multi_draw_indirect ...
00:00:00.216243 OpenGL Info: Host does not support OpenGL extension(s):
00:00:00.216244 OpenGL Info:   GL_ARB_shadow_ambient
00:00:00.216307 OpenGL Info:   GL_EXT_clip_volume_hint
00:00:00.216314 OpenGL Info:   GL_EXT_blend_logic_op
00:00:00.216409 OpenGL Info:   GL_EXT_texture_rectangle
00:00:00.216451 OpenGL Info:   GL_SGIS_texture_border_clamp
00:00:00.216458 OpenGL Info:   GL_SGIS_texture_edge_clamp
00:00:00.216486 OpenGL Info:   GL_GREMEDY_string_marker
00:00:00.217467 OpenGL Info: Render SPU: GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB=4096
00:00:00.217473 OpenGL Info: Host supports version 4.5 [4.5.0 NVIDIA 352.79]
00:00:00.217475 OpenGL Info: Cfg: u32Caps(0x1f), fVisualBitsDefault(0x23)
00:00:00.217546 Shared OpenGL service loaded -- 3D enabled