Date: Wed, 25 Jun 2014 10:48:39 -0700 From: Craig Rodrigues <rodrigc@FreeBSD.org> To: "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>, freebsd-python@freebsd.org Subject: py-libvirt problems with bhyve Message-ID: <CAG=rPVdYf%2BaYP72owuaiecKxM7MHoDAioNpMGFJPu1G_S5fUZA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVdYf%2BaYP72owuaiecKxM7MHoDAioNpMGFJPu1G_S5fUZA>
