WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] Problem finding Block device statistics for a Xen domU using

To: Xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Problem finding Block device statistics for a Xen domU using libvirt API.
From: "shashank rachamalla" <shashank.rachamalla@xxxxxxxxx>
Date: Sun, 24 Feb 2008 20:24:24 +0530
Delivery-date: Sun, 24 Feb 2008 06:54:56 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=8efqG0cUCU++W8NDDHdnEw+2WG/sdz9pW/WTDSShzzw=; b=p9lhRQZ1oRo31VcNFTaxMPwBpJND37OY4JCGv5vlf54OjYzd+retq/FAEMDEG7PlsfOYRNxGyt/ER4+jLm3G0hbqkrYvC/WqUhrEmiUPvPmufuOLkU9LCEJncJfbcdh7oLBObu0VCT2KGtp133S0Y6bz/Eh6TgjAiy7sYA2E0Xk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=Nqnt3q38/YculqZMItXWMjuxP7NUlyKUGkZQ+xMWqRlFSpC9LiqH9KGxFMPu+TeeLMKbZiG1gR2MJsHursE7t4/xuAUoYLdBi/4exz48jKimZRgj8i/oP1KMcxg65ZmClwEsheiUJvGsKw6STe3N6xlamzuTWcWh0zl+TD2YZQw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
I am using fedora core 8 with two domUs installed on xen, CentOS and Fedora Core 6. I manually created a 100MB block disk device and attached it to centos domU using the following set of commands.

creating a block device

 dd if=/dev/zero of=/xen/dsk.img bs=1024 count=100000
 
 mke2fs -q /xen/dsk.img


attaching a block device to domain

 xm block-attach centOS file:///xen/dsk.img /dev/hdc w


I can successfully access the above device in both domU and dom0.
The following is the XML description for centos domain fetched using  virDomainGetXMLDesc("centos",0);


<domain type='xen' id='1'>
  <name>centOS</name>
  <uuid>e335a8f8-405d-33f0-5c6a-bac8282c3cb1</uuid>
  <bootloader>/usr/bin/pygrub</bootloader>
  <os>
    <type>linux</type>
  </os>
  <memory>204800</memory>
  <currentMemory>190464</currentMemory>
  <vcpu>1</vcpu>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <interface type='bridge'>
      <source bridge='virbr0'/>
      <target dev='vif1.0'/>
      <mac address='00:16:3e:65:56:dc'/>
      <script path='vif-bridge'/>
    </interface>
    <disk type='file' device='disk'>
      <driver name='file'/>
      <source file='/var/lib/xen/images/centos.img'/>
      <target dev='xvda'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='file'/>
      <source file='///xen/dsk.img'/>
      <target dev='/dev/hdc'/>
    </disk>
    <input type='mouse' bus='xen'/>
    <graphics type='vnc' port='5900' keymap='en-us'/>
    <console tty='/dev/pts/3'/>
  </devices>
</domain>

I am using the function virDomainBlockStats(dom,"xvda",&blstructure,sizebl) to fetch the block statistics where

   dom is virDomainPtr
   blstructure is virDomainBlockStatsStruct
   size_t sizebl=sizeof(blstructure);

and i can properly print read/write bytes and requests for "xvda", but if i use "/dev/hdc" in the place of "xvda" i get the following error
libvir: Linux Stats error : this function is not supported by the hypervisor: xenLinuxDomainBlockStats: unsupported path (use xvda, hda, etc.)

I tried using "hdc" but it did not work.

plz let me know if i am doing anything wrong. Thanks in advance.
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] Problem finding Block device statistics for a Xen domU using libvirt API., shashank rachamalla <=