Unable to enable the vCPU

Issues related to applications and software problems
Post Reply
murarisaranvikas
Posts: 1
Joined: 2018/09/22 07:22:07

Unable to enable the vCPU

Post by murarisaranvikas » 2018/09/22 07:46:20

Hello Intelligence,

I have a server with the kernel version 2.6.32-754.3.5.el6.x86_64 and I am not able to enable the cores which are in offline status. I am facing "Operation not permitted" error while I am trying to enable it. Any suggestions or workaround are much appreciated. Please let me know if you require any other details.

Note- I am executing commands with root user.

$ uname -r
2.6.32-754.3.5.el6.x86_64

I could see that 2 cores are offline.

$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0,1
Off-line CPU(s) list: 2,3
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 2
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 62
Model name: Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
Stepping: 4
CPU MHz: 2500.054
BogoMIPS: 5000.10
Hypervisor vendor: Xen
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 25600K
NUMA node0 CPU(s): 0,1


[root@murarisaranvikas ~]# chcpu -e 2
CPU 2 enable failed (Operation not permitted)

[root@murarisaranvikas ~]# strace chcpu -e 2
execve("/sbin/chcpu", ["chcpu", "-e", "2"], [/* 21 vars */]) = 0
brk(0) = 0x9d9000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd75fda8000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=38507, ...}) = 0
mmap(NULL, 38507, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd75fd9e000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\356!\3544\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1930416, ...}) = 0
mmap(0x34ec200000, 3750184, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x34ec200000
mprotect(0x34ec38a000, 2097152, PROT_NONE) = 0
mmap(0x34ec58a000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18a000) = 0x34ec58a000
mmap(0x34ec590000, 14632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x34ec590000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd75fd9d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd75fd9c000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd75fd9b000
arch_prctl(ARCH_SET_FS, 0x7fd75fd9c700) = 0
mprotect(0x34ec58a000, 16384, PROT_READ) = 0
mprotect(0x34ebc20000, 4096, PROT_READ) = 0
munmap(0x7fd75fd9e000, 38507) = 0
brk(0) = 0x9d9000
brk(0x9fa000) = 0x9fa000
open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=99174448, ...}) = 0
mmap(NULL, 99174448, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd759f06000
close(3) = 0
sched_getaffinity(0, 256, {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}) = 256
access("/sys/devices/system/cpu/online", F_OK) = 0
open("/sys/devices/system/cpu/online", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd75fda7000
read(3, "0-1\n", 4096) = 4
close(3) = 0
munmap(0x7fd75fda7000, 4096) = 0
access("/sys/devices/system/cpu/cpu2", F_OK) = 0
access("/sys/devices/system/cpu/cpu2/online", F_OK) = 0
open("/sys/devices/system/cpu/cpu2/online", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd75fda7000
read(3, "0\n", 4096) = 2
close(3) = 0
munmap(0x7fd75fda7000, 4096) = 0
access("/sys/devices/system/cpu/cpu2/configure", F_OK) = -1 ENOENT (No such file or directory)
open("/sys/devices/system/cpu/cpu2/online", O_WRONLY|O_CLOEXEC) = 3
write(3, "1", 1) = -1 EPERM (Operation not permitted)
close(3) = 0
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2512, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd75fda7000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2512
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7fd75fda7000, 4096) = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/util-linux-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/util-linux-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/util-linux-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/util-linux-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/util-linux-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/util-linux-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd75fda7000
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(1, "CPU 2 enable failed (Operation n"..., 46CPU 2 enable failed (Operation not permitted)
) = 46
exit_group(0) = ?
+++ exited with 0 +++

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Unable to enable the vCPU

Post by TrevorH » 2018/09/22 11:41:45

Hypervisor vendor: Xen
Is this on a bare metal machine because that looks like you're in a xen VM? In which case, are you sure those cpus are really there and i not some xen thing where you've told it that the guest has 2 cpus and may be increased to 4 on command?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply