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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to 
> "freebsd-virtualization-unsubscr...@freebsd.org"

Roman Bogorodskiy

Attachment: pgpFl81NJF4aV.pgp
Description: PGP signature

Reply via email to