Bug 710342

Summary: libvirt reports 'cannot send monitor command '{"execute":"qmp_capabilities"}' when there is a legitimate error in the logfile
Product: Red Hat Enterprise Linux 6 Reporter: Min Zhan <mzhan>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 6.2CC: dallan, dyuan, llim, mshao, mzhan
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-15 02:11:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
vm log none

Description Min Zhan 2011-06-03 06:18:17 UTC
Description of problem:
In virt-manager, install a new guest, then customize the configuration, Select
Add Hardware->Storage, add 3 storage and 5 network,then finish and begin installation. Then error display:
Unable to complete install: 'cannot send monitor command '{"execute":"qmp_capabilities"}': Connection reset by peer'

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


How reproducible:


Steps to Reproduce:
1. Launch virt-manager,Create a new guest
2. Tick 'Customize configuration before install', click Finish
3. Add 3 storage , 5 network and watchdog devices, then Begin installation
guest xml pls refer to the Additional info.

  
Actual results:
An error display:
Unable to complete install: 'cannot send monitor command '{"execute":"qmp_capabilities"}': Connection reset by peer'

Expected results:
Installation should success.

Additional info:

# tail -f /root/.virt-manager/virt-manager.log
...

[Fri, 03 Jun 2011 14:11:55 virt-manager 6363] DEBUG (Guest:1229) Generated boot XML: 
<domain type='kvm'>
  <name>http</name>
  <currentMemory>1048576</currentMemory>
  <memory>1048576</memory>
  <uuid>7297a72c-7f88-24ac-c97b-d263d642cec8</uuid>
  <os>
    <type arch='x86_64'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/><apic/><pae/>
  </features>
  <clock offset="utc"/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <vcpu>1</vcpu>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='threads'/>
      <source file='/var/lib/libvirt/images/http.img'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='vmdk' io='threads'/>
      <source file='/var/lib/libvirt/images/a11.img'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='threads'/>
      <source file='/var/lib/libvirt/images/a4.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='threads'/>
      <source file='/var/lib/libvirt/images/d1.img'/>
      <target dev='vdb' bus='virtio'/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <mac address='52:54:00:f8:f6:55'/>
      <model type='virtio'/>
    </interface>
    <interface type='network'>
      <source network='default'/>
      <mac address='52:54:00:cb:6b:b9'/>
      <model type='e1000'/>
    </interface>
    <interface type='network'>
      <source network='default'/>
      <mac address='52:54:00:96:7e:98'/>
      <model type='ne2k_pci'/>
    </interface>
    <interface type='network'>
      <source network='default'/>
      <mac address='52:54:00:b4:eb:d6'/>
      <model type='pcnet'/>
    </interface>
    <interface type='network'>
      <source network='default'/>
      <mac address='52:54:00:c3:bc:c7'/>
      <model type='rtl8139'/>
    </interface>
    <interface type='network'>
      <source network='default'/>
      <mac address='52:54:00:30:4a:56'/>
      <model type='virtio'/>
    </interface>
    <input type='tablet' bus='usb'/>
    <graphics type='vnc' port='-1'/>
    <console type='pty'/>
    <sound model='ich6'/>
    <video>
      <model type='cirrus'/>
    </video>
    <watchdog model='i6300esb' action='none'/>
  </devices>
</domain>

[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (manager:720) VM http started
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (Installer:359) Removing /var/lib/libvirt/boot/virtinst-vmlinuz.5eFqeE
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] ERROR (domain:1390) Error reading disk stats for 'http' dev 'vda': Requested operation is not valid: domain is not running
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (domain:1391) Adding vda to skip list.
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (Installer:359) Removing /var/lib/libvirt/boot/virtinst-initrd.img.YLXGVf
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] ERROR (domain:1390) Error reading disk stats for 'http' dev 'hdc': Domain not found: no domain with matching uuid '7297a72c-7f88-24ac-c97b-d263d642cec8'
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (domain:1391) Adding hdc to skip list.
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] ERROR (domain:1390) Error reading disk stats for 'http' dev 'hda': Domain not found: no domain with matching uuid '7297a72c-7f88-24ac-c97b-d263d642cec8'
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (domain:1391) Adding hda to skip list.
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] ERROR (domain:1390) Error reading disk stats for 'http' dev 'vdb': Domain not found: no domain with matching uuid '7297a72c-7f88-24ac-c97b-d263d642cec8'
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (domain:1391) Adding vdb to skip list.
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] ERROR (domain:1358) Error reading net stats for 'http' dev 'vnet8': Domain not found: no domain with matching uuid '7297a72c-7f88-24ac-c97b-d263d642cec8'
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (domain:1359) Adding vnet8 to skip list.
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] ERROR (domain:1358) Error reading net stats for 'http' dev 'vnet9': Domain not found: no domain with matching uuid '7297a72c-7f88-24ac-c97b-d263d642cec8'
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (domain:1359) Adding vnet9 to skip list.
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] ERROR (domain:1358) Error reading net stats for 'http' dev 'vnet10': Domain not found: no domain with matching uuid '7297a72c-7f88-24ac-c97b-d263d642cec8'
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (domain:1359) Adding vnet10 to skip list.
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] ERROR (domain:1358) Error reading net stats for 'http' dev 'vnet11': Domain not found: no domain with matching uuid '7297a72c-7f88-24ac-c97b-d263d642cec8'
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (domain:1359) Adding vnet11 to skip list.
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] ERROR (domain:1358) Error reading net stats for 'http' dev 'vnet12': Domain not found: no domain with matching uuid '7297a72c-7f88-24ac-c97b-d263d642cec8'
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (domain:1359) Adding vnet12 to skip list.
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] ERROR (domain:1358) Error reading net stats for 'http' dev 'vnet13': Domain not found: no domain with matching uuid '7297a72c-7f88-24ac-c97b-d263d642cec8'
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (domain:1359) Adding vnet13 to skip list.
[Fri, 03 Jun 2011 14:11:56 virt-manager 6363] DEBUG (error:66) dialog message: Unable to complete install: 'cannot send monitor command '{"execute":"qmp_capabilities"}': Connection reset by peer' : Unable to complete install: 'cannot send monitor command '{"execute":"qmp_capabilities"}': Connection reset by peer'
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 1622, in do_install
    guest.start_install(False, meter=meter)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1193, in start_install
    start_xml, final_xml, is_initial)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1252, in _create_guest
    dom = self.conn.createLinux(start_xml or final_xml, 0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1454, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: cannot send monitor command '{"execute":"qmp_capabilities"}': Connection reset by peer

Comment 2 Cole Robinson 2011-06-10 22:50:11 UTC
Can you provide the output of /var/log/libvirt/qemu/$vmname.log ?

Comment 3 Min Zhan 2011-06-14 04:45:38 UTC
Environment version:
# uname -a
Linux mzhan 2.6.32-131.0.5.el6.x86_64 #1 SMP Wed Apr 20 00:16:35 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
qemu-kvm-0.12.1.2-2.159.el6.x86_64
libvirt-0.9.1-1.el6.x86_64
virt-manager-0.8.6-4.el6.noarch

Also /var/log/libvirt/qemu/http.log pls refer to the attachment.

Comment 4 Min Zhan 2011-06-14 04:46:22 UTC
Created attachment 504588 [details]
vm log

Comment 6 Cole Robinson 2011-07-15 00:20:46 UTC
Sounds like the root cause is 710337 like you suggest, however libvirt should be reporting the log output in this case. In fact, someone should probably audit all startup error paths to make sure the relevant ones are reporting the log output.

Reassigning to libvirt.

Comment 7 Dave Allan 2011-07-15 02:11:04 UTC
This indeed appears to be a dupicate of 710337.  Closing as such.

*** This bug has been marked as a duplicate of bug 710337 ***