py-libvirt problems with bhyve
Craig Rodrigues
rodrigc at FreeBSD.org
Wed Jun 25 17:48:42 UTC 2014
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)
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
More information about the freebsd-python
mailing list