Merge pull request #1605 from nvazquez/fixVram

CLOUDSTACK-9428: Fix for CLOUDSTACK-9211 - Improve performance of 3D GPU 
support in cloud-plugin-hypervisor-vmwareJIRA TICKET: 
https://issues.apache.org/jira/browse/CLOUDSTACK-9428

### Introduction

On #1310 passing vRAM size to support 3D GPU problem was addressed on VMware. 
It was found out that it could be improved to increase performance by reducing 
extra API calls, as we'll describe later

### Improvement
On WMware, `VmwareResource` manages execution of `StartCommand.` Before sending 
power on command to ESXi hypervisor, vm is configured by calling 
`reconfigVMTask` web method on vSphere's client `VimPortType` web service.
It was found out that we were using this method 2 times when passing vRAM size, 
as it implied creating a new vm config spec only editing video card specs and 
making an extra call to `reconfigVMTask.`

We propose reducing the extra web service call by adjusting vm's config spec. 
This way video card gets properly configured (when passing vRAM size) in the 
same configure call, increasing performance.

### Use case (passing vRAM size)
* Deploy a new VM, let its id be X
* Stop VM
* Execute SQL, where X is vm's id and Z is vRAM size (in kB):
````
INSERT INTO cloud.user_vm_details (vm_id, name, value) VALUES (X, 
'mks.enable3d', 'true');
INSERT INTO cloud.user_vm_details (vm_id, name, value) VALUES (X, 
'mks.use3dRenderer', 'automatic');
INSERT INTO cloud.user_vm_details (vm_id, name, value) VALUES (X, 
'svga.autodetect', 'false');
INSERT INTO cloud.user_vm_details (vm_id, name, value) VALUES (X, 
'svga.vramSize', Z);
````
* Start VM

* pr/1605:
  CLOUDSTACK-9428: Add marvin test
  CLOUDSTACK-9428: Fix for CLOUDSTACK-9211 - Improve performance

Signed-off-by: Rafael Weingärtner <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/744cb2c5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/744cb2c5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/744cb2c5

Branch: refs/heads/4.9-bountycastle-daan
Commit: 744cb2c50249e0be230ffbe55b2cbca5107161d4
Parents: bdb563e 2de5b0d
Author: Rafael Weingärtner <[email protected]>
Authored: Sun Sep 11 08:16:11 2016 -0300
Committer: Rafael Weingärtner <[email protected]>
Committed: Sun Sep 11 08:16:11 2016 -0300

----------------------------------------------------------------------
 api/src/com/cloud/vm/VmDetailConstants.java     |   1 +
 .../vmware/resource/VmwareResource.java         |  46 +++--
 .../vmware/resource/VmwareResourceTest.java     |  68 +++++--
 .../smoke/test_deploy_vgpu_enabled_vm.py        | 180 +++++++++++++++----
 4 files changed, 224 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


Reply via email to