[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] xm vcpu-set doesn't work


  • To: xen-users@xxxxxxxxxxxxxxxxxxx
  • From: Pepo Viola <pepoviola@xxxxxxxxx>
  • Date: Mon, 8 Jun 2009 09:29:51 -0300
  • Delivery-date: Mon, 08 Jun 2009 05:30:37 -0700
  • 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=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.