Bug 1623021

Summary: [RFE] Add support to oVirt provider to set VM memory and CPU
Product: Red Hat CloudForms Management Engine Reporter: Fabien Dupont <fdupont>
Component: ProvidersAssignee: Bronagh Sorota <bsorota>
Status: CLOSED CURRENTRELEASE QA Contact: Kedar Kulkarni <kkulkarn>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.9.5CC: dmetzger, fdupont, gblomqui, istein, jfrey, jhardy, kkulkarn, obarenbo, simaishi
Target Milestone: GAKeywords: FutureFeature, TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.14 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1629126 (view as bug list) Environment:
Last Closed: 2019-02-12 16:51:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: RHEVM Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1623072, 1629126    

Description Fabien Dupont 2018-08-28 11:53:57 UTC
VMware provider has support to set VM memory and number of CPUs. This BZ requests the same same methods to oVirt provider.

Comment 6 Fabien Dupont 2018-09-18 08:46:37 UTC
To check this feature is working as expected, one can use Rails console:

# vmdb
# rails c
irb> $evm = MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new)

For example, you want to change the CPU and memory of a VM named 'test_vm'. Here are the command to execute in Rails console:

irb> vm = $evm.vmdb(:vm).find_by(:name => 'test_vm')
irb> vm.set_number_of_cpus(2)
irb> vm.set_memory(4096)

Then, you should see in your RHV environment that VM named 'test_vm' has 2 vCPUs and 4 GB of memory.

Comment 7 Kedar Kulkarni 2018-09-18 22:34:41 UTC
I followed steps in Comment 6 and  I was able to change the VM memory and number of cpus.