On May 9, 2012, at 4:26 PM, John Wayne <m01z04-libvirt@xxxxxxxxx> wrote: > hi, > > i am a bit confused on how to start an inactive domain using the python bindings, any help would be appreciated. > (inactive as in the domain was created with virConnect.defineXML sometime in the past) > > > looks like i have to use virDomain.create, however virDomain.create needs a defined domain xmldesc as a parameter and i am not sure on how to get that > > i guess if virConnect.create was happening right after virConnect.defineXML i could get the return value of virConnect.defineXML and pass that onto virDomain.create. > however, since the domain was created sometime in the past, i am not sure on how to get the domain ptr which virDomain.create needs > > thanks > > John, I think you are confusing methods. libvirt.virDomain.create() just takes a virDomain object while libvirt.virConnect.createXML() takes an xmldesc. $ python >>> import libvirt >>> conn = libvirt.open("qemu:///system") >>> dom = conn.lookupByName("my-machine") >>> dom.create() Should do the trick. -- Doug Goldstein _______________________________________________ libvirt-users mailing list libvirt-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvirt-users