]> xenbits.xensource.com Git - libvirt.git/commit
Implement code to attach to external QEMU instances.
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 5 May 2011 16:32:21 +0000 (17:32 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 12 Jul 2011 14:39:04 +0000 (15:39 +0100)
commit109efd79419532c11da049f1048a52fdbe013c9b
tree417f017ea9fe066572b9ba4eace3f67839b8b52b
parent7760eaa05063aef5f564c34f5e572a6f86621ea2
Implement code to attach to external QEMU instances.

Given a PID, the QEMU driver reads /proc/$PID/cmdline and
/proc/$PID/environ to get the configuration. This is fed
into the ARGV->XML convertor to build an XML configuration
for the process.

/proc/$PID/exe is resolved to identify the full command
binary path

After checking for name/uuid uniqueness, an attempt is
made to connect to the monitor socket. If successful
then 'info status' and 'info kvm' are issued to determine
whether the CPUs are running and if KVM is enabled.

* src/qemu/qemu_driver.c: Implement virDomainQemuAttach
* src/qemu/qemu_process.h, src/qemu/qemu_process.c: Add
  qemuProcessAttach to connect to the monitor of an
  existing QEMU process
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_command.c
src/qemu/qemu_driver.c
src/qemu/qemu_process.c
src/qemu/qemu_process.h