Bug 705286 - virsh vcpuinfo gives inaccurate output for win7 x86 domain guest.
Summary: virsh vcpuinfo gives inaccurate output for win7 x86 domain guest.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.7
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-17 09:34 UTC by wangyimiao
Modified: 2011-05-19 05:19 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 05:19:36 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description wangyimiao 2011-05-17 09:34:50 UTC
Description of problem:
virsh vcpuinfo gives inaccurate output for win7 x86 domain guest.

Version-Release number of selected component (if applicable):
libvirt-0.8.2-20.el5
kvm-qemu-img-83-232.el5
kernel-2.6.18-259.el5

How reproducible:
5/5

Steps to Reproduce:
1.# virsh dumpxml win7
<domain type='qemu' id='1'>
  <name>win7</name>
  <uuid>262cc192-ace7-ec5e-8052-b4df90412981</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch='x86_64' machine='rhel5.4.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'>
    <timer name='pit' tickpolicy='delay'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/images/win7-32-virtio.qcow2'/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-hd0'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='network'>
      <mac address='54:52:00:10:bd:e7'/>
      <source network='default'/>
      <target dev='vnet0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target port='0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
  </devices>
  <seclabel type='dynamic' model='selinux'>
    <label>system_u:system_r:svirt_t:s0:c26,c787</label>
    <imagelabel>system_u:object_r:svirt_image_t:s0:c26,c787</imagelabel>
  </seclabel>
</domain>

2.Define and start guest domain win7_x86 with 2 vcps.
# virsh start win7
Domain win7 started

3.shown vcpuinfo
# virsh vcpuinfo win7
VCPU:           0
CPU:            0
State:          running
CPU time:       1623.8s
CPU Affinity:   yy
 
Actual results:
virsh vcpuinfo gives inaccurate output for win7 x86 domain guest,should be shown 2 vcpus info.

Expected results:
virsh vcpuinfo gives accurate for win7 x86 domain guest

Comment 1 Daniel Berrangé 2011-05-17 10:06:36 UTC
>  <domain type='qemu' id='1'>

Your guest is using 'qemu' rather than 'kvm'. In this case, libvirt is not able to give per-CPU time status.

Please re-test with KVM

Comment 2 wangyimiao 2011-05-19 05:19:36 UTC
test with <domain type='kvm' id='1'> it works fine.It till give 2 cpus info.
I will closed that issue as comment 1, libvirt unspport it.


Note You need to log in before you can comment on or make changes to this bug.