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] xm vcpu-set doesn't work

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] xm vcpu-set doesn't work
From: Pepo Viola <pepoviola@xxxxxxxxx>
Date: Mon, 8 Jun 2009 09:29:51 -0300
Delivery-date: Mon, 08 Jun 2009 05:30:37 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=+cd9VSMvSFF5bjER7F2E31VgrX+rJtbTT2pRFstAzaU=; b=bB6uQ5uMfVMAI0NQu0fq0YPdB4UCetZTRDKtZXHXmLpbaaGV+jGlP7APxplIjJC10t vNZ3Y714mhsdddh0EbtXL8eSNIPfw4wBDftbbr5u7faIWozKbnUjV5w0eY3CpNnLyRBg eM6vrwV+sE2KkIocVuf2EGuhdl4CMEaDcgNDc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=q4r5QPFXXEGythUOSYU/+D5QTp4FWBcVlf23SHeDs/fimCrG43edEyJRmnK93moHRy MjBnvR1IDeByWvjbyWgeC6dXg9JkgbkwJ0CDvriOdkUPVBmvdEWlr3ckkWCVczWd0iYN eF4Lxd80m0w9PUly0LDcYetdY3rL0QDSNGg68=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi all,
       I can't change the number of vcpu with this command, when I run the command gives no error, but does not update the amount of vcpus.
The version of the xen is 3.2.1 running on Debian 5.
This is the vm config file:

name = 'vm-999998'
memory = '512'
disk = [ 'file:xxxxx.root,hda,w',
         'file:xxxxxx1.swap,hdb,w',
         'file:xxxxxx2.opt,hdc,w' ]
vif = [ 'mac=00:16:3e:xx:xx:xx, bridge=xenbrxxx', ]
vfb = [ 'type=vnc,vncpasswd=xxxx,vncdisplay=xxx']
root = '/dev/hda1'
extra = 'ro xencons=xvc video=xenfb'
kernel = '/opt/vm-manager/kernel-domU-64'
vcpus=2
maxvcpus=4
> on_reboot   = 'restart'
on_crash    = 'restart'
cpu_cap = '100'
cpu_weight = 256

==============

This is the patched function (file XendDomainInfo.py):

(...)
    def setVCpuCount(self, vcpus):
        if vcpus <= 0:
            raise XendError('Invalid VCPUs')

        self.info['vcpu_avail'] = (1 << vcpus) - 1
        if self.domid >= 0:
            self.storeVm('vcpu_avail', self.info['vcpu_avail'])
            # update dom differently depending on whether we are adjusting
            # vcpu number up or down, otherwise _vcpuDomDetails does not
            # disable the vcpus
            if self.info['VCPUs_max'] > vcpus:
                # decreasing
                self._writeDom(self._vcpuDomDetails())
                self.info['VCPUs_live'] = vcpus
            else:
                # same or increasing
                self.info['VCPUs_live'] = vcpus
                self._writeDom(self._vcpuDomDetails())
        else:
            self.info['VCPUs_live'] = vcpus
            self.info['VCPUs_max'] = vcpus
            xen.xend.XendDomain.instance().managed_config_save(self)
        log.info("Set VCPU count on domain %s to %d", self.info['name_label'],
                 vcpus)
(...)

==============================================
When I run the command (xm vcpu-set) i see this log:

#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  1000     8     r-----   5252.7
vm-999998                                    6   512     2     -b----     30.7

#xm vcpu-set vm-999998 1

( tail /var/log/xen/xend.log )
[2009-06-08 09:23:02 32568] TRACE (XendDomainInfo:1039) XendDomainInfo.storeChanged
[2009-06-08 09:23:02 32568] INFO (XendDomainInfo:1176) Set VCPU count on domain vm-999998 to 1

xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  1000     8     r-----   5253.2
vm-999998                                    6   512     2     -b----     30.7


Regards

Viola Villanueva Javier.-

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