On 11/15/2017 06:57 PM, Richard W.M. Jones wrote: > On Tue, Nov 14, 2017 at 05:25:03PM +0000, Daniel P. Berrange wrote: >> I would anticipate a standalone process "libvirt-qemu" that an >> application can spawn, providing a normal domain XML file via the >> command line or stdin. It would then connect to libvirtd to register >> its existance and claim its ownership of the guest name + >> UUID. Assuming that succeeds, 'libvirt-qemu' would directly spawn >> QEMU. > > To be really clear about this, the application would run something > like: > > libvirt_xml = sprintf ("<domain><uuid>%s</uuid> etc etc", uuid); > libvirt_xml_file = /* write libvirt_xml to a temporary file */; > > if (fork () == 0) { > execlp ("libvirt-qemu", > "libvirt-qemu", "--config", libvirt_xml_file, NULL); Problem with this is libvirt-qemu binary would need a connection object so that ... > } > > dom = virDomainLookupByUUID (conn, uuid); ... it registers the domain under @conn connection (= it needs to register the domain at the right libvirtd [or whomever is going to keep list of running domains]). Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list