Thursday, 18 August 2016

How to resize Memory and CPU of Exadata Virtual Machines

The OEDA tool used to create Virtual Machines on Exadata will limit your VM type
selection to a set template. As such the VMs that come up will carry a fixed amount of cpu and memory as per the template selected.

Sometimes to match the license requirement or performance requirement you may need to
increase or decrease the CPU core count. The licensing cost is based on CPU cores.
The rule of thumb is that 1 Core = 2 VCPUs


## Find the name of the VM whose memory or VCPU you need to modify ##

Remember - 1 core = 2vcpu

[root@tdbadm02 cellos]# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0 16384     4     r----- 324182.0
tadm02vm01           1 65536     6     -b---- 160676.0
tadm02vm02           2 16384     2     -b---- 189596.6



## GOTO THE VM CONFIGURATION FILE OF VM02 ##

cd /EXAVMIMAGES/GuestImages/tadm02vm02/vm.cfg

#### contents of vm.cfg ####

memory = '16384'
maxmem = '16384'
OVM_simple_name = 'Exadata VM'
name = 'tadm02vm02'
OVM_os_type = 'Oracle Linux 6'
vcpus = 2
maxvcpus = 2
uuid = '499c4f55c33242e9b71318e4457f46b76'
on_crash = 'restart'
on_reboot = 'restart'

Modify the memory and vcpus count as required and save the vm.cfg file


## Now to restart the VM ##

a. Make sure you shut down the databases riding in it first.

b. from root # xm shutdown -w tadm02vm02
 (This will stop the VM and prompt will be returned once operation is over)

c. from root # xm create /EXAVMIMAGES/GuestImages/tadm02vm02/vm.cfg
   (This will start the VM. Here create=start)

d. login to VM and ensure db and other services are up.

1 comment: