From owner-freebsd-python@FreeBSD.ORG Wed Jun 25 18:04:02 2014 Return-Path: Delivered-To: freebsd-python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4ECC7110; Wed, 25 Jun 2014 18:04:02 +0000 (UTC) Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6DF9E2400; Wed, 25 Jun 2014 18:04:01 +0000 (UTC) Received: by mail-lb0-f179.google.com with SMTP id z11so2075811lbi.24 for ; Wed, 25 Jun 2014 11:03:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=HjlqYnDyIIoOIzqwNcesYbkHayS1GguJg1XuAKg1mP0=; b=VvyEzE9dCUoqEsxcMBa7aFkMHN51xB0nlY7qj5MlbVfI98aM/h88cCMZO3RfKgnlb/ pBJ+mXwUts45mEpaOelJhLOaFXMH3s30tyiCSqFfrpcHoLLANLT/PyFs8tercEaAZKv2 5ddv8KC20PpacXzrrE25215aRMQTOZTPlLFpBWjySgKsWNtpnKJ0QRNKdbwZ1EydYVTc tgP9ZrFSohy7WYS5pGPjhkV9q4DAwaBJu+OMqJgIp++5chtlV/exuCfVhfihevO4I4Pl ov9mP4RhWWzUgBTCBsv36xrdbahJS/WfimT70/TgNlemfL5n02uQPqtPH5EeUDJtyd3H u/yA== X-Received: by 10.112.53.161 with SMTP id c1mr2050733lbp.86.1403719439381; Wed, 25 Jun 2014 11:03:59 -0700 (PDT) Received: from kloomba ([95.104.140.69]) by mx.google.com with ESMTPSA id ba10sm4339535lbc.47.2014.06.25.11.03.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jun 2014 11:03:58 -0700 (PDT) Sender: Roman Bogorodskiy Date: Wed, 25 Jun 2014 22:01:18 +0400 From: Roman Bogorodskiy To: Craig Rodrigues Subject: Re: py-libvirt problems with bhyve Message-ID: <20140625180116.GA1304@kloomba> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "freebsd-virtualization@freebsd.org" , freebsd-python@freebsd.org X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 18:04:02 -0000 --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--