You are here

How to Remove CPU Pinning

In this section, we show how to remove CPU pinning. CPU pinning is controled in a virtual machine's vm.cfg file by adding the cpus attribute with a text editor, or with the ovm_vmcontrol utility. Before you can remove a virtual machine's CPU pinning, you must locate its vm.cfg file.
 
To list all of the virtual machines vm.cfg files in an Oracle VM server pool, as root, access one of the Oracle VM pool members and type:
# find /OVS/Repositories -type f -name vm.cfg -exec grep -iH simple_name {} \;
 
To list a specific virtual machine's vm.cfg file, as root, access one of the Oracle VM pool members and type:
# find /OVS/Repositories -type f -name vm.cfg -exec grep -iH simple_name {} \; | grep <VIRTUAL MACHINE NAME>
 
Note: Replace <VIRTUAL MACHINE NAME> with the virtual machines name.
 
Once the vm.cfg file has been located, it can be edited using Vim (vi). Vim is the default text editor for Oracle VM Server.
 
Let’s locate and remove the CPU pinning from a virtual machines named yum-chekov. The virtual machine's vm.cfg file can be located by accessing one of the Oracle VM servers in the pool, and as root, type:
find /OVS/Repositories -type f -name vm.cfg -exec grep -iH simple_name {} \; | grep yum-chekov
/OVS/Repositories/0004fb000003000000c6307a0210108c/VirtualMachines/0004fb0000060000dbf90ab3718822c0/vm.cfg:OVM_simple_name = 'yum-chekov'
 
The bold text above show the path to the vm.cfg file. 
 
The next example shows the vm.cfg file from yum-chekov with the CPU pinning as cpus = '1,2'.  yum-chekov’s CPUs are pinned to the Oracle VM Server’s CPU cores 1 and 2. 
 
# cat /OVS/Repositories/0004fb000003000000c6307a0210108c/VirtualMachines/0004fb0000060000dbf90ab3718822c0/vm.cfg
vif = ['mac=00:21:f6:00:00:52,bridge=0004fb001025f15', 'mac=00:21:f6:00:00:69,bridge=192.168.3.0']
OVM_simple_name = 'yum-chekov'
disk = ['file:/OVS/Repositories/0004fb000003000000c6307a0210108c/VirtualDisks/0004fb00001200001715425de783bb2a.img,xvda,w', 'file:/OVS/Repositories/0004fb000003000000c6307a0210108c/VirtualDisks/0004fb0000120000b400de1a5c40d6dc.img,xvdb,w', 'file:/OVS/Repositories/0004fb000003000000c6307a0210108c/VirtualDisks/0004fb00001200005266f7966823c7c8.img,xvdc,w']
uuid = '0004fb00-0006-0000-dbf9-0ab3718822c0'
on_reboot = 'restart'
boot = 'c'
cpu_weight = 27500
memory = 1024
cpu_cap = 0
maxvcpus = 2
OVM_high_availability = True
maxmem = 1024
timer_mode = 0
OVM_description = ''
on_poweroff = 'destroy'
on_crash = 'restart'
bootloader = '/usr/bin/pygrub'
name = '0004fb0000060000dbf90ab3718822c0'
guest_os_type = 'linux'
vfb = ['type=vnc,vncunused=1,vnclisten=127.0.0.1,keymap=en-us']
vcpus = 2
cpus = '1,2'
OVM_os_type = 'Oracle Linux 5'
OVM_cpu_compat_group = None
OVM_domain_type = 'xen_pvm'
 
To remove the CPU pinning, edit the vm.cfg file directly using vi and remove the cpus = '1,2' line, then reboot the virtual machine. 

Download PDF Now!