py-libvirt problems with bhyve

Roman Bogorodskiy novel at FreeBSD.org
Wed Jun 25 18:04:02 UTC 2014


  Craig Rodrigues wrote:

> Hi,
> 
> I did the following:
> 
> (1)  Set up libvirt, taking Roman's latest port, and configuring bhyve
> support:
> 
>       http://people.freebsd.org/~rodrigc/libvirt/libvirt-bhyve.html
> 
> (2)  Installed the py-libvirt port.
> 
> 
> I wrote this code:
> 
> import libvirt
> import sys
> 
> conn = libvirt.openReadOnly(None)
                              ^^^

I think here the URI should be 'bhyve:///system'.

Or you could tweak libvirt.conf and assign the bhyve url value to the
'uri_default' parameter.

http://libvirt.org/uri.html#URI_default

> if conn == None:
>     print 'Failed to open connection to the hypervisor'
>     sys.exit(1)
> 
> try:
>     print conn.listAllDomains()
>     #print dir(conn)
>     dom0 = conn.lookupByName("bhyve")
> except:
>     print 'Failed to find the main domain'
>     sys.exit(1)
> 
> 
> but when I ran the code, I got this error:
> 
> []
> libvirt: QEMU Driver error : Domain not found: no domain with matching name
> 'bhyve'
> Failed to find the main domain
> 
> 
> Can anyone tell me how to write a py-libvirt program to
> start/stop a bhyve VM?
> 
> Thanks.
> --
> Craig
> _______________________________________________
> freebsd-virtualization at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe at freebsd.org"

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-virtualization/attachments/20140625/c44c5fcc/attachment.sig>


More information about the freebsd-virtualization mailing list