Hi folks!
i created a server with this XML file:
<domain type='lxc'>
<name>lxctest1</name>
<uuid>227bd347-dd1d-4bfd-81e1-01052e91ffe2</uuid>
<metadata>
<libosinfo:libosinfo
xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"...
<libosinfo:os
id="http://centos.org/centos/6.9"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>1024000</memory>
<currentMemory unit='KiB'>1024000</currentMemory>
<vcpu>2</vcpu>
<numatune>
<memory mode='strict' placement='auto'/>
</numatune>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64'>exe</type>
<init>/sbin/init</init>
</os>
<idmap>
<uid start='0' target='200000' count='65535'/>
<gid start='0' target='200000' count='65535'/>
</idmap>
<features>
<privnet/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/libvirt_lxc</emulator>
<filesystem type='mount' accessmode='mapped'>
<source dir='/mnt'/>
<target dir='/'/>
</filesystem>
<interface type='network'>
<mac address='00:16:3e:3e:3e:bb'/>
<source network='Public Network'/>
</interface>
<console type='pty'>
<target type='lxc' port='0'/>
</console>
</devices>
</domain>
I would expect it to have 2 cpu cores and 1 GB RAM.
The RAM config works.
The CPU config does not:
[root@lxctest1 ~]# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 24
On-line CPU(s) list: 0-23
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 62
Model name: Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz
Stepping: 4
CPU MHz: 2399.950
BogoMIPS: 4205.88
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 15360K
NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22
NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23
It gives me all CPU's from the host.
I also tried it with
<cpu>
<topology sockets='1' cores='2' threads='1'/>
</cpu>
That didnt help too.
I tried to modify the vcpus through virsh:
#virsh -c lxc:/// setvcpus lxctest1 2
error: this function is not supported by the connection driver:
virDomainSetVcpus
Which didnt work too.
This happens on:
Centos 7
Kernel: 5.1.15-1.el7.elrepo.x86_64
#virsh -V
Virsh command line tool of libvirt 4.5.0
See web site at
https://libvirt.org/
Compiled with support for:
Hypervisors: QEMU/KVM LXC ESX Test
Networking: Remote Network Bridging Interface netcf Nwfilter VirtualPort
Storage: Dir Disk Filesystem SCSI Multipath iSCSI LVM RBD Gluster ZFS
Miscellaneous: Daemon Nodedev SELinux Secrets Debug DTrace Readline
and also on
Fedora 30
Kernel: 5.2.9-200.fc30.x86_64
# virsh -V
Virsh command line tool of libvirt 5.1.0
See web site at
https://libvirt.org/
Compiled with support for:
Hypervisors: QEMU/KVM LXC LibXL OpenVZ VMware PHYP VirtualBox ESX
Hyper-V Test
Networking: Remote Network Bridging Interface netcf Nwfilter VirtualPort
Storage: Dir Disk Filesystem SCSI Multipath iSCSI LVM RBD Sheepdog
Gluster ZFS
Miscellaneous: Daemon Nodedev SELinux Secrets Debug DTrace Readline
-----------
Can anyone please tell me what i am doing wrong here ?
Thank you !
Greetings
Oliver