Change in vdsm[master]: Add support for specifying vm maximum memory

ofrenkel at redhat.com ofrenkel at redhat.com
Wed May 6 09:13:45 UTC 2015


Omer Frenkel has posted comments on this change.

Change subject: Add support for specifying vm maximum memory
......................................................................


Patch Set 1:

(3 comments)

https://gerrit.ovirt.org/#/c/40547/1/vdsm/rpc/vdsmapi-schema.json
File vdsm/rpc/vdsmapi-schema.json:

Line 3582: # @serial:                #optional Serial number for the VM.
Line 3583: #
Line 3584: # @numOfIoThreads:        #optional The num of iothreads qemu allocates
Line 3585: #
Line 3586: # @maxMemSize:            The maximum amount of memory that can be assigned
> isn't this optional? If this is mandatory, new VDSMs will not work with old
Done
Line 3587: #                         to the VM in MB
Line 3588: #
Line 3589: # Since: 4.10.0
Line 3590: ##


Line 3601:           '*smpCoresPerSocket': 'uint', '*smpThreadsPerCore': 'uint',
Line 3602:           'status': 'VmStatus', 'timeOffset': 'uint',
Line 3603:           'transparentHugePages': 'bool', 'vmId': 'UUID', 'vmName': 'str',
Line 3604:           'vmType': 'VmType', '*exitCode': 'int', '*exitMessage': 'str',
Line 3605:           '*serial': 'str', '*numOfIoThreads': 'uint', 'maxMemSize': 'uint'}}
> if this is indeed optional, don't forget to update here as well.
Done
Line 3606: 
Line 3607: ##
Line 3608: # @VmParameters:
Line 3609: #


https://gerrit.ovirt.org/#/c/40547/1/vdsm/virt/vmxml.py
File vdsm/virt/vmxml.py:

Line 169:         self.dom.appendChildWithArgs('currentMemory', text=memSizeKB)
Line 170:         if 'maxMemSize' in self.conf:
Line 171:             maxMemSizeKB = str(int(self.conf['maxMemSize']) * 1024)
Line 172:             self.dom.appendChildWithArgs('maxMemory', text=maxMemSizeKB,
Line 173:                                          slots=self._getMaxVCpus())
> is the usage of _getMaxVCpus() intentional?
you are right this is wrong, i will change it to be sent from the engine as well
Line 174:         vcpu = self.dom.appendChildWithArgs('vcpu', text=self._getMaxVCpus())
Line 175:         vcpu.setAttrs(**{'current': self._getSmp()})
Line 176: 
Line 177:         self._devices = Element('devices')


-- 
To view, visit https://gerrit.ovirt.org/40547
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54a698fbd45d6605f24b3641c541ff10a332d9f8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Vitor de Lima <vdelima at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list