From owner-freebsd-virtualization@FreeBSD.ORG Wed Jun 25 17:48:42 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 860A9AD2; Wed, 25 Jun 2014 17:48:42 +0000 (UTC) Received: from mail-la0-x233.google.com (mail-la0-x233.google.com [IPv6:2a00:1450:4010:c03::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 D7FA02233; Wed, 25 Jun 2014 17:48:41 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id mc6so1010362lab.38 for ; Wed, 25 Jun 2014 10:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=ynObKZzrsOdM+0714hrRRiQw7Llh8CjKLoFBvqlYOn8=; b=fLm9vYVYQzX6deE5XXw63+7Uf9AKYgn3zABSsAC98f3kJVXHlvfQJC7Yxt6E3A4jIM ndi9tXfQIZ3Gc5yZ8IRqE3bAVQgIAnWlTE5cTbpYP9bEh3+JxHPgT++GJTm8kqyB6i0k KSCbURli7LtHGFRmlBB8DIFdWHU1lT/xBjGiC0h6Uzl7KjxoK5gD6Ab1rzh2EvbyuHr3 NkylPLxKUCsXqooiCl0HgHRbcBtYxVMAQJtVdMYz9WEODNRRllfzRphTpbjnSel6OxkG QdtEAL006AbSG3tOt5o15y2oBmH5pJXbCe7ml7YOvg+XEQzzn/Lvw36V5Re7OOqxq6t+ gDPw== MIME-Version: 1.0 X-Received: by 10.152.88.41 with SMTP id bd9mr1992067lab.91.1403718519618; Wed, 25 Jun 2014 10:48:39 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.67.71 with HTTP; Wed, 25 Jun 2014 10:48:39 -0700 (PDT) Date: Wed, 25 Jun 2014 10:48:39 -0700 X-Google-Sender-Auth: Io_rmli2BZ_5eAa5ZBJOad3mehQ Message-ID: Subject: py-libvirt problems with bhyve From: Craig Rodrigues To: "freebsd-virtualization@freebsd.org" , freebsd-python@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 17:48:42 -0000 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