[Libvir] [PATCH] libvirt incorrectly reports crashed domains as shutoff

Peter Vetere pvetere at redhat.com
Wed Oct 11 15:02:38 UTC 2006


Hi, I've noticed that libvirt seems to report crashed domains as 
shutoff.  Here's an example:

[root at XXXXX ~]# virsh list
  Id Name                 State
----------------------------------
   0 Domain-0             running
  27 test03               blocked
  34 test01               shut off
  36 onetwentyeight       blocked

[root at XXXXX ~]# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0      356     1 r-----  3655.4
onetwentyeight                    36      128     1 -b----    16.7
test01                            34      256     1 ----c-     7.4
test03                            27      256     1 -b----   231.7

The reason is because xen_internal.c does not interpret the additional 
shutdown flags when it checks the domain's state.  Attached is a patch 
which correctly checks these flags and reports the crashed state.  I 
wasn't sure of the best way to react to the other shutdown flags, so I 
just defaulted to "SHUTOFF" for everything else.

Pete

-------------- next part --------------
A non-text attachment was scrubbed...
Name: xen_internal.c.diff
Type: text/x-patch
Size: 2366 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20061011/159fdfc8/attachment-0001.bin>


More information about the libvir-list mailing list