I enter a root session with "sudo su" and then launch the binary. Simply
running the binary with sudo seems to produce the same results.
-----Original Message-----
From: "Maxime Dor" <m...@kamax.io>
Sent: 23/04/2016 17:37
To: "vbox-dev@virtualbox.org" <vbox-dev@virtualbox.org>
Subject: Re: [vbox-dev] VirutalBox XPCOM interface as root
Do you actually run as a complete root session, or with sudo?
On 23/04/16 16:05, Rūdolfs Bundulis wrote:
I removed the virtual machines to exclude that as a source of error. Now
running my program that tries to launch a VM called Xubuntu fails as expected
when non-root (the API tells there is no such machine and that shows up in the
VBoxSVC.log), while root fails and VBoxSVC.log does not contain anything
special. I can continue on for now working as non root, but eventually I need
to launch my binary from a nodejs process which needs to be root to bind to the
TCP port (I could however launch the slaves under other users but I'd like to
sort out why this happens). Is there any way to enable extended logging in the
VBoxSVC.log? Exporting BOXSVC_RELEASE_LOG=main.e.l.f+gui.e.l.f did not change
anything.
Logs as non root:
VBoxSVC.log:
VirtualBox XPCOM Server 5.0.12 r104815 linux.amd64 (Dec 18 2015 17:08:04)
release log
00:00:00.000218 main Log opened 2016-04-23T14:00:47.617485000Z
00:00:00.000220 main Build Type: release
00:00:00.000222 main OS Product: Linux
00:00:00.000223 main OS Release: 3.16.0-30-generic
00:00:00.000223 main OS Version: #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14
UTC 2015
00:00:00.000254 main DMI Product Name: Z9PE-D16 Series
00:00:00.000260 main DMI Product Version: 1.0X
00:00:00.000330 main Host RAM: 15995MB total, 15725MB available
00:00:00.000333 main Executable: /usr/lib/virtualbox/VBoxSVC
00:00:00.000333 main Process ID: 2873
00:00:00.000334 main Package type: LINUX_64BITS_UBUNTU_14_04
00:00:00.103915 nspr-2 Home directory: '/home/rudolfs/.config/VirtualBox'
00:00:00.104076 nspr-2 Loading settings file
"/home/rudolfs/.config/VirtualBox/VirtualBox.xml" with version "1.12-linux"
00:00:00.109599 nspr-2 HostDnsMonitor: old information
00:00:00.109609 nspr-2 no server entries
00:00:00.109614 nspr-2 no search string entries
00:00:00.109616 nspr-2 no domain set
00:00:00.109618 nspr-2 HostDnsMonitor: new information
00:00:00.109620 nspr-2 server 1: 192.168.1.1
00:00:00.109623 nspr-2 no search string entries
00:00:00.109625 nspr-2 no domain set
00:00:00.109630 nspr-2 HostDnsMonitorProxy::notify
00:00:00.110588 nspr-2 VD: VDInit finished
00:00:00.112975 nspr-2 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001)
aIID={0169423f-46b4-cde9-91af-1e9d5b6cd945} aComponent={VirtualBoxWrap}
aText={Could not find a registered machine named 'Xubuntu'}, preserve=false
aResultDetail=0
00:00:05.612083 Watcher ERROR [COM]: aRC=E_ACCESSDENIED (0x80070005)
aIID={0169423f-46b4-cde9-91af-1e9d5b6cd945} aComponent={VirtualBoxWrap}
aText={The object is not ready}, preserve=false aResultDetail=0
00:00:10.114131 main {00007f6124012b80}
HostPowerServiceLinux::~HostPowerServiceLinux: RTThreadWait() for 5000 ms
failed with VERR_TIMEOUT
My log:
[23.04.2016 17:00:47.600] === Start (PID: 2864) ===
[23.04.2016 17:00:47.741]
../../../Sources/VirtualBoxSource/VirtualBoxSource.cpp(59): could not find
virtual machine Xubuntu(0x80bb0001)
[23.04.2016 17:00:47.754] === Stop ===
Logs as root:
VBoxSVC.log:
VirtualBox XPCOM Server 5.0.12 r104815 linux.amd64 (Dec 18 2015 17:08:04)
release log
00:00:00.000430 main Log opened 2016-04-23T14:02:52.309751000Z
00:00:00.000431 main Build Type: release
00:00:00.000433 main OS Product: Linux
00:00:00.000434 main OS Release: 3.16.0-30-generic
00:00:00.000434 main OS Version: #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14
UTC 2015
00:00:00.000455 main DMI Product Name: Z9PE-D16 Series
00:00:00.000460 main DMI Product Version: 1.0X
00:00:00.000517 main Host RAM: 15995MB total, 15724MB available
00:00:00.000520 main Executable: /usr/lib/virtualbox/VBoxSVC
00:00:00.000520 main Process ID: 2902
00:00:00.000521 main Package type: LINUX_64BITS_UBUNTU_14_04
00:00:00.103713 nspr-2 Home directory: '/root/.config/VirtualBox'
00:00:00.103891 nspr-2 Loading settings file
"/root/.config/VirtualBox/VirtualBox.xml" with version "1.12-linux"
00:00:00.106584 nspr-2 Successfully initialised host USB using sysfs
00:00:00.111953 nspr-2 HostDnsMonitor: old information
00:00:00.111964 nspr-2 no server entries
00:00:00.111968 nspr-2 no search string entries
00:00:00.111971 nspr-2 no domain set
00:00:00.111973 nspr-2 HostDnsMonitor: new information
00:00:00.111976 nspr-2 server 1: 192.168.1.1
00:00:00.111979 nspr-2 no search string entries
00:00:00.111981 nspr-2 no domain set
00:00:00.111986 nspr-2 HostDnsMonitorProxy::notify
00:00:00.113053 nspr-2 VD: VDInit finished
00:00:05.614453 Watcher ERROR [COM]: aRC=E_ACCESSDENIED (0x80070005)
aIID={0169423f-46b4-cde9-91af-1e9d5b6cd945} aComponent={VirtualBoxWrap}
aText={The object is not ready}, preserve=false aResultDetail=0
00:00:10.124637 main {00007f5ebc014fb0}
HostPowerServiceLinux::~HostPowerServiceLinux: RTThreadWait() for 5000 ms
failed with VERR_TIMEOUT
My log:
[23.04.2016 17:02:52.295] === Start (PID: 2891) ===
[23.04.2016 17:02:52.433]
../../../Sources/VirtualBoxSource/VirtualBoxSource.cpp(31): failed to create
VirtualBox API instance(0x80004005)
[23.04.2016 17:02:52.447] === Stop ===
2016-04-23 15:49 GMT+03:00 Rūdolfs Bundulis <rudolfs.bundu...@gmail.com>:
Thanks for pointing out the location. I opened the file just after the error
but it did no contain anything interresting:
VirtualBox XPCOM Server 5.0.12 r104815 linux.amd64 (Dec 18 2015 17:08:04)
release log
00:00:00.003705 main Log opened 2016-04-23T12:37:03.945428000Z
00:00:00.003707 main Build Type: release
00:00:00.003710 main OS Product: Linux
00:00:00.003710 main OS Release: 3.16.0-30-generic
00:00:00.003711 main OS Version: #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14
UTC 2015
00:00:00.003739 main DMI Product Name: Z9PE-D16 Series
00:00:00.003746 main DMI Product Version: 1.0X
00:00:00.003823 main Host RAM: 15995MB total, 15708MB available
00:00:00.003826 main Executable: /usr/lib/virtualbox/VBoxSVC
00:00:00.003827 main Process ID: 2428
00:00:00.003827 main Package type: LINUX_64BITS_UBUNTU_14_04
00:00:00.110860 nspr-2 Home directory: '/root/.config/VirtualBox'
00:00:00.111175 nspr-2 Loading settings file
"/root/.config/VirtualBox/VirtualBox.xml" with version "1.12-linux"
00:00:00.117237 nspr-2 Successfully initialised host USB using sysfs
00:00:00.124953 nspr-2 HostDnsMonitor: old information
00:00:00.124964 nspr-2 no server entries
00:00:00.124969 nspr-2 no search string entries
00:00:00.124971 nspr-2 no domain set
00:00:00.124973 nspr-2 HostDnsMonitor: new information
00:00:00.124975 nspr-2 server 1: 192.168.1.1
00:00:00.124978 nspr-2 no search string entries
00:00:00.124980 nspr-2 no domain set
00:00:00.124984 nspr-2 HostDnsMonitorProxy::notify
00:00:00.130331 nspr-2 VD: VDInit finished
00:00:00.140840 nspr-2 Loading settings file "/root/VirtualBox VMs/Windows 7
XPDM/Windows 7 XPDM.vbox" with version "1.12-linux"
00:00:00.143291 nspr-2 Loading settings file "/root/VirtualBox
VMs/Xubuntu/Xubuntu.vbox" with version "1.14-linux"
00:00:05.154728 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c)
aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap}
aText={Medium '/root/VirtualBox VMs/Windows 7 XPDM/Windows 7 XPDM-disk2.vmdk'
cannot be closed because it is still attached to 1 virtual machines},
preserve=false aResultDetail=0
00:00:05.154850 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c)
aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap}
aText={Medium '/tmp/DisplayWall/Build/Linux/Debug/Xubuntu.vdi' cannot be closed
because it is still attached to 1 virtual machines}, preserve=false
aResultDetail=0
00:00:05.644170 Watcher ERROR [COM]: aRC=E_ACCESSDENIED (0x80070005)
aIID={0169423f-46b4-cde9-91af-1e9d5b6cd945} aComponent={VirtualBoxWrap}
aText={The object is not ready}, preserve=false aResultDetail=0
00:00:10.159690 main {00007f97f0015160}
HostPowerServiceLinux::~HostPowerServiceLinux: RTThreadWait() for 5000 ms
failed with VERR_TIMEOUT
My error occurs on 15:37:04 so the trailing errors should not be the cause,
will investigate further but thanks for the help.
[23.04.2016 15:37:03.894] === Start (PID: 2417) ===
[23.04.2016 15:37:04.099]
../../../Sources/VirtualBoxSource/VirtualBoxSource.cpp(31): failed to create
VirtualBox API instance(0x80004005)
[23.04.2016 15:37:04.102] === Stop ===
_______________________________________________
vbox-dev mailing list
vbox-dev@virtualbox.org
https://www.virtualbox.org/mailman/listinfo/vbox-dev
_______________________________________________
vbox-dev mailing list
vbox-dev@virtualbox.org
https://www.virtualbox.org/mailman/listinfo/vbox-dev