libvirt/src/xen
Stefan Bader 26e9ef4762 xend_internal: Use domain/status for shutdown check
On newer xend (v3.x and after) there is no state and domid reported
for inactive domains. When initially creating connections this is
handled in various places by assigning domain->id = -1.
But once an instance has been running, the id is set to the current
domain id. And it does not change when the instance is shut down.
So when querying the domain info, the hypervisor driver, which gets
asked first will indicate it cannot find information, then the
xend driver is asked and will set the status to NOSTATE because it
checks for the -1 domain id.
Checking domain/status for 0 seems to be more reliable for that.

One note: I am not sure whether the domain->id also should get set
back to -1 whenever any sub-driver thinks the instance is no longer
running.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=746007
BugLink: http://bugs.launchpad.net/bugs/929626

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2012-04-12 17:09:01 -06:00
..
block_stats.c Consistent style for usage of sizeof operator 2012-03-30 11:47:24 +01:00
block_stats.h Remove virConnectPtr from virRaiseErrorFull 2011-04-17 07:22:23 +02:00
xen_driver.c Cleanup for a return statement in source files 2012-03-26 14:45:22 -06:00
xen_driver.h Rename hash.h and hash.c to virhash.h and virhash.c 2012-01-26 14:11:13 +00:00
xen_hypervisor.c Consistent style for usage of sizeof operator 2012-03-30 11:47:24 +01:00
xen_hypervisor.h Fixed URI parsing 2012-02-24 16:49:21 -07:00
xen_inotify.c xen: drop unused callbacks 2011-07-28 14:57:55 -06:00
xen_inotify.h drivers: prefer unsigned int for flags 2011-07-07 14:15:37 -06:00
xend_internal.c xend_internal: Use domain/status for shutdown check 2012-04-12 17:09:01 -06:00
xend_internal.h xml: use long long internally, to centralize overflow checks 2012-03-07 18:24:43 -07:00
xm_internal.c Cleanup for a return statement in source files 2012-03-26 14:45:22 -06:00
xm_internal.h xml: use long long internally, to centralize overflow checks 2012-03-07 18:24:43 -07:00
xs_internal.c Cleanup for a return statement in source files 2012-03-26 14:45:22 -06:00
xs_internal.h xml: use long long internally, to centralize overflow checks 2012-03-07 18:24:43 -07:00