Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 515100

Summary: Command: virsh domblkstat: Fail to get guest block stats
Product: Red Hat Enterprise Linux 5 Reporter: zhanghaiyan <yoyzhang>
Component: xenAssignee: Xen Maintainance List <xen-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 5.4CC: berrange, clalance, virt-maint, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-04 11:09:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
capabilities info
none
guest xml info
none
version info
none
debug info
none
xend.log
none
xenstore-ls none

Description zhanghaiyan 2009-08-02 02:09:28 UTC
Description of problem:
On rhel5.4-Client-i386, run command # virsh domblkstat test1 hda, output error info: error: Failed to get block stats test1 hda
error: internal error read_bd_stats: Frontend block device not connected


Version-Release number of selected component (if applicable):
RHEL5.4-Client-i386
libvirt-0.6.3-17.el5
xen-3.0.3-92.el5


How reproducible:
100%

Steps to Reproduce:
1. # virsh define xen-fv-i386.xml
2. # virsh start test1
3. # virsh domblkstat test1 hda

  
Actual results:
Output:
error: Failed to get block stats test1 hda
error: internal error read_bd_stats: Failed to read any block statistics


Expected results:
Output hda stat info

Additional info:
Attach capabilities info (capabilities), guest xml info (xen-fv-i386.xml), version info (version), debug info (debug.log)

Comment 1 zhanghaiyan 2009-08-02 02:11:34 UTC
Created attachment 355909 [details]
capabilities info

Comment 2 zhanghaiyan 2009-08-02 02:12:00 UTC
Created attachment 355910 [details]
guest xml info

Comment 3 zhanghaiyan 2009-08-02 02:12:26 UTC
Created attachment 355911 [details]
version info

Comment 4 zhanghaiyan 2009-08-02 02:12:51 UTC
Created attachment 355912 [details]
debug info

Comment 5 zhanghaiyan 2009-08-02 02:14:03 UTC
Attach /var/log/xen/xend.log

Comment 6 zhanghaiyan 2009-08-02 02:14:24 UTC
Created attachment 355913 [details]
xend.log

Comment 7 zhanghaiyan 2009-08-02 03:43:37 UTC
This function works for kvm guest

Comment 8 Chris Lalancette 2009-08-03 08:33:16 UTC
Yes, this is known to be broken for xen HVM guests.  I'll put it on the list to look at for 5.5.

Chris Lalancette

Comment 9 Daniel Berrangé 2009-08-03 10:15:45 UTC
No, this should work for HVM guests if you have paravirt drivers installed in the HVM guest.

Can you provide the output of 'xenstore-ls', and confirm whether or not the guest is using paravirt drivers, or plain IDE emulated drivers ?

Comment 10 zhanghaiyan 2009-08-04 07:22:17 UTC
Attach xenstore-ls

Comment 11 zhanghaiyan 2009-08-04 07:23:22 UTC
Created attachment 356116 [details]
xenstore-ls

Comment 12 Daniel Berrangé 2009-08-04 11:09:36 UTC
The xenstore logs show the front end devices are not connected, so the guest must be using the emulated IDE/RTL8139 drivers, and not the Xen paravirt block/net drivers. 

I/O stats are not available with emulated drivers, so the virsh error message is expected behaviour.

Comment 13 Paolo Bonzini 2010-04-08 15:47:58 UTC
This bug was closed during 5.5 development and it's being removed from the internal tracking bugs (which are now for 5.6).

Comment 14 Chris Lalancette 2010-07-19 13:39:53 UTC
Clearing out old flags for reporting purposes.

Chris Lalancette