Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jun 2014 22:01:18 +0400
From:      Roman Bogorodskiy <novel@FreeBSD.org>
To:        Craig Rodrigues <rodrigc@FreeBSD.org>
Cc:        "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>, freebsd-python@freebsd.org
Subject:   Re: py-libvirt problems with bhyve
Message-ID:  <20140625180116.GA1304@kloomba>
In-Reply-To: <CAG=rPVdYf%2BaYP72owuaiecKxM7MHoDAioNpMGFJPu1G_S5fUZA@mail.gmail.com>
References:  <CAG=rPVdYf%2BaYP72owuaiecKxM7MHoDAioNpMGFJPu1G_S5fUZA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

  Craig Rodrigues wrote:

> Hi,
>=20
> I did the following:
>=20
> (1)  Set up libvirt, taking Roman's latest port, and configuring bhyve
> support:
>=20
>       http://people.freebsd.org/~rodrigc/libvirt/libvirt-bhyve.html
>=20
> (2)  Installed the py-libvirt port.
>=20
>=20
> I wrote this code:
>=20
> import libvirt
> import sys
>=20
> conn =3D 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 =3D=3D None:
>     print 'Failed to open connection to the hypervisor'
>     sys.exit(1)
>=20
> try:
>     print conn.listAllDomains()
>     #print dir(conn)
>     dom0 =3D conn.lookupByName("bhyve")
> except:
>     print 'Failed to find the main domain'
>     sys.exit(1)
>=20
>=20
> but when I ran the code, I got this error:
>=20
> []
> libvirt: QEMU Driver error : Domain not found: no domain with matching na=
me
> 'bhyve'
> Failed to find the main domain
>=20
>=20
> Can anyone tell me how to write a py-libvirt program to
> start/stop a bhyve VM?
>=20
> Thanks.
> --
> Craig
> _______________________________________________
> freebsd-virtualization@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@free=
bsd.org"

Roman Bogorodskiy

--h31gzZEtNLTqOjlF
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (FreeBSD)

iQEcBAEBAgAGBQJTqw5sAAoJEMltX/4IwiJqRuAH/jkzaoczuYaXU0pED1tfXyUN
QRj33ooCdSYxqAYjQwc6YlGN2lVTnB6FVd4Dy1jkxJ+N6xruZ1OShRmEWtDkDmjx
Yil0Fp9nm99f6iT/wY+yH1Tmla7MX+Bq/W4h3qAgqUOGUSDA3J35gYFFmBTA26H7
j4Caq8NeiQOxwcG8XC8Sb5h4ES3x9mW8B3f0gPQo8T+wsnsc1S/S1mCBSRh9W9nM
/yf1vGLctwanSYAsg2pxw/Db0oFuB1qOdErqTVzNuqa8AVHIJNnLvG4E8DMnfetb
/tz1RE0MLdA5CQB9E4HlakscH8s5wH644m9EQ+UQDTPjiM+CffbksXQcqmrZUFA=
=QSSM
-----END PGP SIGNATURE-----

--h31gzZEtNLTqOjlF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140625180116.GA1304>