[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-users] xm vcpu-set doesn't work
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |