Bug 726066

Summary: libvirt "loses" all domains
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aquini, berrange, clalance, crobinso, itamar, jforbes, laine, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-08 11:05:18 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 724814    
Bug Blocks:    

Description Richard W.M. Jones 2011-07-27 08:59:51 EDT
[Note I'm assigning this to libvirt for investigation,
even though it is highly likely that this is a qemu bug]

Description of problem:

libvirt "loses" all domains.  eg:

$ sudo virsh -c qemu:///system list --all
 Id Name                 State
----------------------------------
[empty list]

Version-Release number of selected component (if applicable):

2:qemu-system-x86-0.15.0-0.2.20110718525e3df.fc16.x86_64
libvirt-0.9.3-2.fc16.x86_64
host kernel: 2.6.38.7-30.fc15.x86_64

How reproducible:

100%

Additional info:

The XML configuration files in /etc/libvirt/qemu are intact.

On further investigation, we saw errors related to qemu in
libvirtd.log:

13:57:43.296: 6077: info : libvirt version: 0.9.3, package: 2.fc16 (Fedora Project, 2011-07-06-14:25:55, x86-07.phx2.fedoraproject.org)
13:57:43.296: 6077: error : libxlStartup:972 : cannot initialize libxenlight context
13:57:43.350: 6077: error : virCommandWait:1957 : internal error Child process (LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu -device ? -device pci-assign,? -device virtio-blk-pci,? -device virtio-net-pci,?) status unexpected: exit status 1
13:57:43.372: 6077: error : virCommandWait:1957 : internal error Child process (LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu-system-x86_64 -device ? -device pci-assign,? -device virtio-blk-pci,? -device virtio-net-pci,?) status unexpected: exit status 1
13:57:43.391: 6077: error : virCommandWait:1957 : internal error Child process (LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu-system-arm -device ? -device pci-assign,? -device virtio-blk-pci,? -device virtio-net-pci,?) status unexpected: exit status 1
13:57:43.411: 6077: error : virCommandWait:1957 : internal error Child process (LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu-system-mips -device ? -device pci-assign,? -device virtio-blk-pci,? -device virtio-net-pci,?) status unexpected: exit status 1
13:57:43.430: 6077: error : virCommandWait:1957 : internal error Child process (LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu-system-mipsel -device ? -device pci-assign,? -device virtio-blk-pci,? -device virtio-net-pci,?) status unexpected: exit status 1
13:57:43.449: 6077: error : virDomainDefParseXML:6069 : unknown OS type hvm
13:57:43.449: 6077: error : virDomainDefParseXML:6069 : unknown OS type hvm
[last error repeated about 20 times]

The output of
  qemu-system-x86_64 -device ? -device pci-assign,? \
    -device virtio-blk-pci,? -device virtio-net-pci,?
is:
  KVM not supported for this target
  No accelerator found!

virsh capabilities is almost empty:

<capabilities>

  <host>
    <uuid>2b8c6f80-b15c-11df-9cfd-b727e82cf6bb</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>Westmere</model>
      <vendor>Intel</vendor>
      <topology sockets='1' cores='2' threads='2'/>
      <feature name='rdtscp'/>
      <feature name='xtpr'/>
      <feature name='tm2'/>
      <feature name='est'/>
      <feature name='vmx'/>
      <feature name='ds_cpl'/>
      <feature name='monitor'/>
      <feature name='pbe'/>
      <feature name='tm'/>
      <feature name='ht'/>
      <feature name='ss'/>
      <feature name='acpi'/>
      <feature name='ds'/>
      <feature name='vme'/>
    </cpu>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num='1'>
        <cell id='0'>
          <cpus num='4'>
            <cpu id='0'/>
            <cpu id='1'/>
            <cpu id='2'/>
            <cpu id='3'/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <secmodel>
      <model>selinux</model>
      <doi>0</doi>
    </secmodel>
  </host>

</capabilities>
Comment 1 Cole Robinson 2011-07-27 09:59:53 EDT
Yeah this is a side effect of the qemu issue:

https://bugzilla.redhat.com/show_bug.cgi?id=724814

Since getting qemu binary info fails, we don't list anything in capabilities, so when we read all the stored XML configs they don't validate against capabilities, they aren't defined, and they don't show up in virsh list.
Comment 2 Cole Robinson 2011-09-08 11:05:18 EDT
Been fixed in rawhide for a bit