<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hi.</div>
<div><br>
</div>
<div>I am running virtualbox 4.3 on Mac OS X 10.11.12 and libvirtd 1.3.1 (installed with brew).</div>
<div>I want to control the virtual machines via virsh.</div>
<div><br>
</div>
<div>On libvirtd, I enabled tcp mode, removed all the authentication etc.. It's a development environment, so no worries here.</div>
<div>It allows me to make a call such as:</div>
<div><i>virsh –c vbox+tcp://172.30.5.51/session list —all</i></div>
<div><br>
</div>
<div>172.30.5.51 being my Mac IP address.</div>
<div><br>
</div>
<div>Virsh connects successfully to libvirtd (I see my request in the log) but the "list —all" returns an error.</div>
<div><br>
</div>
<div>
<div><i>virsh -c vbox+tcp://172.30.5.51/session list --all</i></div>
<div><i>error: Failed to list domains</i></div>
<div><i>error: invalid connection pointer in virGetDomain</i></div>
<div><br>
</div>
<div><br>
</div>
<div>Based on the debug logs, it appears the vbox driver is properly used</div>
<div><br>
</div>
<div>
<div>2016-03-03 22:27:44.415+0000: 18446744073709551615: debug : do_open:1003 : name "vbox:///session" to URI components:</div>
<div>  scheme vbox</div>
<div>  server <null></div>
<div>  user <null></div>
<div>  port -1</div>
<div>  path /session</div>
</div>
<div>(…)</div>
<div>2016-03-03 22:27:44.416+0000: 18446744073709551615: debug : do_open:1050 : trying driver 4 (VBOX) ...</div>
<div>2016-03-03 22:27:44.416+0000: 18446744073709551615: debug : virArchFromHost:181 : Mapped x86_64 to 32 (x86_64)</div>
<div>2016-03-03 22:27:44.416+0000: 18446744073709551615: info : virObjectNew:202 : OBJECT_NEW: obj=0x7fa41950b2c0 classname=virCaps</div>
<div>2016-03-03 22:27:44.416+0000: 18446744073709551615: debug : virArchFromHost:181 : Mapped x86_64 to 32 (x86_64)</div>
<div>2016-03-03 22:27:44.416+0000: 18446744073709551615: info : virObjectNew:202 : OBJECT_NEW: obj=0x7fa41a208da0 classname=virDomainXMLOption</div>
<div>2016-03-03 22:27:44.416+0000: 18446744073709551615: debug : vboxConnectOpen:460 : in vboxOpen</div>
<div>2016-03-03 22:27:44.416+0000: 18446744073709551615: debug : do_open:1065 : driver 4 VBOX returned SUCCESS</div>
<div><br>
</div>
<div><br>
</div>
<div>But later there is this error:</div>
<div><br>
</div>
<div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : virThreadJobSet:96 : Thread 18446744073709551615 (virNetServerHandleJob) is now running job remoteDispatchConnectListAllDomains</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : virEventPollCleanupTimeouts:526 : Cleanup 2</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : remoteDispatchConnectListAllDomainsHelper:1219 : server=0x7fa419700040 client=0x7fa4196037c0 msg=0x7fa41a201280 rerr=0x700000415d40 args=0x7fa419602c90 ret=0x7fa419600ad0</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : virEventPollCleanupHandles:575 : Cleanup 5</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : virConnectListAllDomains:6701 : conn=0x7fa41950afe0, domains=0x700000415c40, flags=3</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : virEventPollMakePollFDs:401 : Prepare n=0 w=1, f=5 e=1 d=0</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : virEventPollMakePollFDs:401 : Prepare n=1 w=2, f=7 e=1 d=0</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : virEventPollMakePollFDs:401 : Prepare n=2 w=3, f=9 e=1 d=0</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : virEventPollMakePollFDs:401 : Prepare n=3 w=4, f=11 e=1 d=0</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : virEventPollMakePollFDs:401 : Prepare n=4 w=8, f=12 e=1 d=0</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : virEventPollCalculateTimeout:338 : Calculate expiry of 2 timers</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : virEventPollCalculateTimeout:346 : Got a timeout scheduled for 1457044069419</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : virEventPollCalculateTimeout:359 : Schedule timeout then=1457044069419 now=1457044064420</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: debug : virEventPollCalculateTimeout:369 : Timeout at 1457044069419 due in 4999 ms</div>
<div>2016-03-03 22:27:44.420+0000: 18446744073709551615: info : virEventPollRunOnce:641 : EVENT_POLL_RUN: nhandles=5 timeout=4999</div>
<div>2016-03-03 22:27:44.421+0000: 18446744073709551615: error : virGetDomain:203 : invalid connection pointer in virGetDomain</div>
<div>2016-03-03 22:27:44.422+0000: 18446744073709551615: debug : virThreadJobClear:121 : Thread 18446744073709551615 (virNetServerHandleJob) finished job remoteDispatchConnectListAllDomains with ret=-1</div>
</div>
<div> </div>
</div>
<div><br>
</div>
<div>The full log is here http://pastebin.com/raw/83Fgs5MZ</div>
<div><br>
</div>
<div><br>
</div>
<div>I've been digging around but can't find anything I should change in my configuration or in virtualbox.</div>
<div>I poked in the libvirt code, but I am not a C developer, so can't really figure it out.</div>
<div><br>
</div>
<div><br>
</div>
<div>Any chance somebody sees a solution to this?</div>
<div>There must be something obvious that I don't see…</div>
<div><br>
</div>
<div>Thanks!</div>
<div><br>
</div>
<PRE>_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
</PRE></body>
</html>