<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Try with "sudo su -"<br>
<br>
<div class="moz-cite-prefix">On 23/04/16 16:53, Rudolfs Bundulis
wrote:<br>
</div>
<blockquote
cite="mid:571b8c86.6a8d700a.1eda6.ffffba4f@mx.google.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div>
<div style="font-family: Calibri,sans-serif; font-size: 11pt;">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.</div>
</div>
<div dir="ltr">
<hr><span style="font-family: Calibri,sans-serif; font-size:
11pt; font-weight: bold;">From: </span><span
style="font-family: Calibri,sans-serif; font-size: 11pt;"><a
moz-do-not-send="true" href="mailto:max@kamax.io">Maxime Dor</a></span><br>
<span style="font-family: Calibri,sans-serif; font-size: 11pt;
font-weight: bold;">Sent: </span><span style="font-family:
Calibri,sans-serif; font-size: 11pt;">23/04/2016 17:37</span><br>
<span style="font-family: Calibri,sans-serif; font-size: 11pt;
font-weight: bold;">To: </span><span style="font-family:
Calibri,sans-serif; font-size: 11pt;"><a
moz-do-not-send="true" href="mailto:vbox-dev@virtualbox.org"><a class="moz-txt-link-abbreviated" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a></a></span><br>
<span style="font-family: Calibri,sans-serif; font-size: 11pt;
font-weight: bold;">Subject: </span><span style="font-family:
Calibri,sans-serif; font-size: 11pt;">Re: [vbox-dev]
VirutalBox XPCOM interface as root</span><br>
<br>
</div>
Do you actually run as a complete root session, or with sudo?<br>
<br>
<div class="moz-cite-prefix">On 23/04/16 16:05, Rūdolfs Bundulis
wrote:<br>
</div>
<blockquote
cite="mid:CAHtFw605dxgHNWe7yhVwKX4vnt2rCjzVQQdHy5wQro9rgpN15A@mail.gmail.com"
type="cite">
<div dir="ltr">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.
<div><br>
</div>
<div>Logs as non root:</div>
<div><br>
</div>
<div>VBoxSVC.log:</div>
<div>VirtualBox XPCOM Server 5.0.12 r104815 linux.amd64 (Dec
18 2015 17:08:04) release log<br>
</div>
<div>
<div>00:00:00.000218 main Log opened
2016-04-23T14:00:47.617485000Z</div>
<div>00:00:00.000220 main Build Type: release</div>
<div>00:00:00.000222 main OS Product: Linux</div>
<div>00:00:00.000223 main OS Release: 3.16.0-30-generic</div>
<div>00:00:00.000223 main OS Version: #40~14.04.1-Ubuntu
SMP Thu Jan 15 17:43:14 UTC 2015</div>
<div>00:00:00.000254 main DMI Product Name: Z9PE-D16
Series</div>
<div>00:00:00.000260 main DMI Product Version: 1.0X</div>
<div>00:00:00.000330 main Host RAM: 15995MB total,
15725MB available</div>
<div>00:00:00.000333 main Executable:
/usr/lib/virtualbox/VBoxSVC</div>
<div>00:00:00.000333 main Process ID: 2873</div>
<div>00:00:00.000334 main Package type:
LINUX_64BITS_UBUNTU_14_04</div>
<div>00:00:00.103915 nspr-2 Home directory:
'/home/rudolfs/.config/VirtualBox'</div>
<div>00:00:00.104076 nspr-2 Loading settings file
"/home/rudolfs/.config/VirtualBox/VirtualBox.xml" with
version "1.12-linux"</div>
<div>00:00:00.109599 nspr-2 HostDnsMonitor: old
information</div>
<div>00:00:00.109609 nspr-2 no server entries</div>
<div>00:00:00.109614 nspr-2 no search string entries</div>
<div>00:00:00.109616 nspr-2 no domain set</div>
<div>00:00:00.109618 nspr-2 HostDnsMonitor: new
information</div>
<div>00:00:00.109620 nspr-2 server 1: 192.168.1.1</div>
<div>00:00:00.109623 nspr-2 no search string entries</div>
<div>00:00:00.109625 nspr-2 no domain set</div>
<div>00:00:00.109630 nspr-2 HostDnsMonitorProxy::notify</div>
<div>00:00:00.110588 nspr-2 VD: VDInit finished</div>
<div>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</div>
<div>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</div>
<div>00:00:10.114131 main {00007f6124012b80}
HostPowerServiceLinux::~HostPowerServiceLinux:
RTThreadWait() for 5000 ms failed with VERR_TIMEOUT</div>
<div><br>
</div>
<div>My log:</div>
<div>
<div>[23.04.2016 17:00:47.600] === Start (PID: 2864) ===</div>
<div>[23.04.2016 17:00:47.741]
../../../Sources/VirtualBoxSource/VirtualBoxSource.cpp(59):
could not find virtual machine Xubuntu(0x80bb0001)</div>
<div>[23.04.2016 17:00:47.754] === Stop ===</div>
</div>
<div><br>
</div>
<div>Logs as root:</div>
<div><br>
</div>
<div>VBoxSVC.log:</div>
<div>
<div>VirtualBox XPCOM Server 5.0.12 r104815 linux.amd64
(Dec 18 2015 17:08:04) release log</div>
<div>00:00:00.000430 main Log opened
2016-04-23T14:02:52.309751000Z</div>
<div>00:00:00.000431 main Build Type: release</div>
<div>00:00:00.000433 main OS Product: Linux</div>
<div>00:00:00.000434 main OS Release:
3.16.0-30-generic</div>
<div>00:00:00.000434 main OS Version:
#40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015</div>
<div>00:00:00.000455 main DMI Product Name: Z9PE-D16
Series</div>
<div>00:00:00.000460 main DMI Product Version: 1.0X</div>
<div>00:00:00.000517 main Host RAM: 15995MB total,
15724MB available</div>
<div>00:00:00.000520 main Executable:
/usr/lib/virtualbox/VBoxSVC</div>
<div>00:00:00.000520 main Process ID: 2902</div>
<div>00:00:00.000521 main Package type:
LINUX_64BITS_UBUNTU_14_04</div>
<div>00:00:00.103713 nspr-2 Home directory:
'/root/.config/VirtualBox'</div>
<div>00:00:00.103891 nspr-2 Loading settings file
"/root/.config/VirtualBox/VirtualBox.xml" with version
"1.12-linux"</div>
<div>00:00:00.106584 nspr-2 Successfully initialised
host USB using sysfs</div>
<div>00:00:00.111953 nspr-2 HostDnsMonitor: old
information</div>
<div>00:00:00.111964 nspr-2 no server entries</div>
<div>00:00:00.111968 nspr-2 no search string entries</div>
<div>00:00:00.111971 nspr-2 no domain set</div>
<div>00:00:00.111973 nspr-2 HostDnsMonitor: new
information</div>
<div>00:00:00.111976 nspr-2 server 1: 192.168.1.1</div>
<div>00:00:00.111979 nspr-2 no search string entries</div>
<div>00:00:00.111981 nspr-2 no domain set</div>
<div>00:00:00.111986 nspr-2 HostDnsMonitorProxy::notify</div>
<div>00:00:00.113053 nspr-2 VD: VDInit finished</div>
<div>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</div>
<div>00:00:10.124637 main {00007f5ebc014fb0}
HostPowerServiceLinux::~HostPowerServiceLinux:
RTThreadWait() for 5000 ms failed with VERR_TIMEOUT</div>
</div>
<div><br>
</div>
<div>My log:</div>
<div>
<div>[23.04.2016 17:02:52.295] === Start (PID: 2891) ===</div>
<div>[23.04.2016 17:02:52.433]
../../../Sources/VirtualBoxSource/VirtualBoxSource.cpp(31):
failed to create VirtualBox API instance(0x80004005)</div>
<div>[23.04.2016 17:02:52.447] === Stop ===</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div> </div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-04-23 15:49 GMT+03:00 Rūdolfs
Bundulis <span dir="ltr"><<a
href="mailto:rudolfs.bundulis@gmail.com" target="_blank"
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:rudolfs.bundulis@gmail.com">rudolfs.bundulis@gmail.com</a></a>></span>:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px
0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204,
204); border-left-width: 1px; border-left-style: solid;">
<div class="HOEnZb">
<div class="h5">
<div dir="ltr"><span style="font-size: 12.8px;">Thanks
for pointing out the location. I opened the file
just after the error but it did no contain
anything interresting:</span>
<div style="font-size: 12.8px;"><br>
</div>
<div style="font-size: 12.8px;">
<div>VirtualBox XPCOM Server 5.0.12 r104815
linux.amd64 (Dec 18 2015 17:08:04) release log</div>
<div>00:00:00.003705 main Log opened
2016-04-23T12:37:03.945428000Z</div>
<div>00:00:00.003707 main Build Type: release</div>
<div>00:00:00.003710 main OS Product: Linux</div>
<div>00:00:00.003710 main OS Release:
3.16.0-30-generic</div>
<div>00:00:00.003711 main OS Version:
#40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC
2015</div>
<div>00:00:00.003739 main DMI Product Name:
Z9PE-D16 Series</div>
<div>00:00:00.003746 main DMI Product Version:
1.0X</div>
<div>00:00:00.003823 main Host RAM: 15995MB
total, 15708MB available</div>
<div>00:00:00.003826 main Executable:
/usr/lib/virtualbox/VBoxSVC</div>
<div>00:00:00.003827 main Process ID: 2428</div>
<div>00:00:00.003827 main Package type:
LINUX_64BITS_UBUNTU_14_04</div>
<div>00:00:00.110860 nspr-2 Home directory:
'/root/.config/VirtualBox'</div>
<div>00:00:00.111175 nspr-2 Loading settings
file "/root/.config/VirtualBox/VirtualBox.xml"
with version "1.12-linux"</div>
<div>00:00:00.117237 nspr-2 Successfully
initialised host USB using sysfs</div>
<div>00:00:00.124953 nspr-2 HostDnsMonitor: old
information</div>
<div>00:00:00.124964 nspr-2 no server entries</div>
<div>00:00:00.124969 nspr-2 no search string
entries</div>
<div>00:00:00.124971 nspr-2 no domain set</div>
<div>00:00:00.124973 nspr-2 HostDnsMonitor: new
information</div>
<div>00:00:00.124975 nspr-2 server 1:
192.168.1.1</div>
<div>00:00:00.124978 nspr-2 no search string
entries</div>
<div>00:00:00.124980 nspr-2 no domain set</div>
<div>00:00:00.124984 nspr-2
HostDnsMonitorProxy::notify</div>
<div>00:00:00.130331 nspr-2 VD: VDInit finished</div>
<div>00:00:00.140840 nspr-2 Loading settings
file "/root/VirtualBox VMs/Windows 7
XPDM/Windows 7 XPDM.vbox" with version
"1.12-linux"</div>
<div>00:00:00.143291 nspr-2 Loading settings
file "/root/VirtualBox VMs/Xubuntu/Xubuntu.vbox"
with version "1.14-linux"</div>
<div>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</div>
<div>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</div>
<div>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</div>
<div>00:00:10.159690 main {00007f97f0015160}
HostPowerServiceLinux::~HostPowerServiceLinux:
RTThreadWait() for 5000 ms failed with
VERR_TIMEOUT</div>
</div>
<div style="font-size: 12.8px;"><br>
</div>
<div style="font-size: 12.8px;">My error occurs on
15:37:04 so the trailing errors should not be the
cause, will investigate further but thanks for the
help.</div>
<div style="font-size: 12.8px;"><br>
</div>
<div style="font-size: 12.8px;">
<div>[23.04.2016 15:37:03.894] === Start (PID:
2417) ===</div>
<div>[23.04.2016 15:37:04.099]
../../../Sources/VirtualBoxSource/VirtualBoxSource.cpp(31):
failed to create VirtualBox API
instance(0x80004005)</div>
<div>[23.04.2016 15:37:04.102] === Stop ===</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote"><br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
vbox-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://www.virtualbox.org/mailman/listinfo/vbox-dev">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a>
</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
vbox-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a>
<a class="moz-txt-link-freetext" href="https://www.virtualbox.org/mailman/listinfo/vbox-dev">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>