Hi
I tried to use virsh blkstat to get information of a
block, but it returns an error message as shown below
This function works fine in KVM, but fail in XEN.
I tried XEN
All of them are fail to get the block status.
The following is the config file and error message of
virsh domblkstat.
Any one knows how to make this function work?
[root@localhost ~]# virsh dumpxml vm1
<domain type='xen' id='1'>
<name>vm1</name>
<uuid>12af1ed4
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>1</vcpu>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<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>
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file'
device='disk'>
<driver
name='file'/>
<source
file='/var/lib/libvirt/images/vm1.img'/>
<target dev='hda'
bus='ide'/>
</disk>
<disk type='file' device='cdrom'>
<target dev='hdc'
bus='ide'/>
<readonly/>
</disk>
<interface type='bridge'>
<mac
address='00:16:36:
<source
bridge='eth0'/>
<script
path='/etc/xen/scripts/vif-bridge'/>
<target
dev='vif1.0'/>
</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'/>
<sound model='es1370'/>
</devices>
</domain>
[root@localhost ~]# virsh domblkstat vm1 hda
error: Failed to get block stats vm1 hda
error: internal error read_bd_stats: Failed to read
any block statistics