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-devel

[Xen-devel] Re: VDI size on local repository always 0

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: VDI size on local repository always 0
From: Dante <dantespace.ml@xxxxxxxxx>
Date: Thu, 6 May 2010 11:07:24 +0200
Delivery-date: Thu, 06 May 2010 02:09:35 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=G3fCnbbeXpVGJbhF71myjDkyPqO5X9rCknJzzR7S3Xc=; b=SnTvJtP32okS7sb9zsnXh1D+7KJ/PbAUFa+X+2KJceNcTebEPm9f1tuO21s07MrfK0 q42DbPBYJ24Sn2N/G9VqTNdXCzuhzhdpCxPqtDpVaQU8w7a0PuOWxSIOUNlvA53SYDAa 8vOuSE9XbAmOTymwpT/5qSqktpkkaLaiq54zk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=TY1ItdUuWU/5qectqQyTR3b31b3anJV1zmJKzlOrAYpMBYJo941b+AQX73/GAVfkqq 88M/Y4tHzjNCRV5G67acqJ/bmKoAU46IPnXxUkFR76p5NQJtwef+utu48L8knjjZihYK f7f2L/J0cNwrnibDKaTPsu2ffCMWGS5SWZWBc=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <m2jfacd9fa1005050440we6448320ma486ff35f54153c3@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <m2jfacd9fa1005050440we6448320ma486ff35f54153c3@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi guys,
   from file XendVDI.py:

class XendQCoWVDI(XendVDI):
    def __init__(self, uuid, sr_uuid, qcow_path, cfg_path, vsize, psize):
        XendVDI.__init__(self, uuid, sr_uuid)
        self.auto_save = False
        self.qcow_path = qcow_path
        self.cfg_path = cfg_path
        self.physical_utilisation = psize
        self.virtual_size = vsize
        self.auto_save = True
        self.other_config['location'] = 'tap:qcow:%s' % self.qcow_path

    def get_location(self):
        return self.other_config['location']

class XendLocalVDI(XendVDI):
    def __init__(self, vdi_struct):
        vdi_uuid = vdi_struct['uuid']
        sr_uuid = vdi_struct['SR']
        XendVDI.__init__(self, vdi_uuid, sr_uuid)

        self.auto_save = False
        self.cfg_path = None
        self.name_label = vdi_struct.get('name_label','')
        self.name_description = vdi_struct.get('name_description', '')
        self.physical_utilisation = 0
        self.virtual_size = 0
        self.type = vdi_struct.get('type', '')
        self.sharable = vdi_struct.get('sharable', False)
        self.read_only = vdi_struct.get('read_only', False)
        self.other_config = vdi_struct.get('other_config', {})

As you can see no physical utilisation and virtual size value in local repository. So, how could it possible to check vdi size?

Thanks,
Dante

On Wed, May 5, 2010 at 1:40 PM, Dante <dantespace.ml@gmail.com> wrote:
Hello guys,
   I'm working on a cloud computing project involving Xen Hypervisor. I looked for the issue described in the subject in old posts but no success. I'm using the local storage repository and I can't set physical_utilisation and virtual_utilisation via xen API because XendVDI.py has hardcoded the 0 value for local repository while is passed for QcoW storage repoistory.
   Any reason why is VDI implemented in this way? I have to use a workaround and set size in description field to retrieve this information but it's quite annoying since there is a field dedicated to it.
   Posting this question in both xen-devel and xen-api mailing list. I think the question is cross-mailing-list. Sorry for duplication.

Thanks in advance for your help!
Dante
  

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>