Hello,
iam currently trying to run LXC Containers with libvirt
but the memory limit doesn't want to work
in the container i see the full 32GB from the Host OS
iam pretty sure that iam missing a configline in the xml
lxc-template ~ # free -m
total used free shared buff/cache
available
Mem: 32108 626 31396 249 85
31396
Swap: 0 0 0
lxc-template ~ #
the host is running debian 9 with default repos
hv1 ~ # dpkg -l | grep virt
ii libgovirt-common 0.3.4-2
all GObject-based library to access oVirt REST API
(common files)
ii libgovirt2:amd64 0.3.4-2
amd64 GObject-based library to access oVirt REST API
ii libvirt-clients 3.0.0-4+deb9u3
amd64 Programs for the libvirt library
ii libvirt-daemon 3.0.0-4+deb9u3
amd64 Virtualization daemon
ii libvirt-daemon-system 3.0.0-4+deb9u3
amd64 Libvirt daemon configuration files
ii libvirt-glib-1.0-0:amd64 1.0.0-1
amd64 libvirt GLib and GObject mapping library
ii libvirt0 3.0.0-4+deb9u3
amd64 library for interfacing with different
virtualization systems
ii python-libvirt 3.0.0-2
amd64 libvirt Python bindings
ii qemu-kvm 1:2.8+dfsg-6+deb9u4
amd64 QEMU Full virtualization on x86 hardware
ii virt-viewer 5.0-1
amd64 Displaying the graphical console of a virtual
machine
ii virtinst 1:1.4.0-5
all Programs to create and clone virtual machines
--
Mit freundlichen Grüßen / best regards
Markus Raps
<domain type='lxc' id='31672'>
<name>deb4</name>
<uuid>b1981e50-3bbc-40bf-b145-4a50e927eb7d</uuid>
<memory unit='KiB'>4000000</memory>
<currentMemory unit='KiB'>4000000</currentMemory>
<vcpu placement='static' cpuset='0-1'>2</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64'>exe</type>
<init>/sbin/init</init>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/lib/libvirt/libvirt_lxc</emulator>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/mnt/vms/hdd1/lxc/deb3'/>
<target dir='/'/>
</filesystem>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/var/lib/lxcfs/proc/cpuinfo'/>
<target dir='/proc/cpuinfo'/>
</filesystem>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/var/lib/lxcfs/proc/diskstats'/>
<target dir='/proc/diskstats'/>
</filesystem>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/var/lib/lxcfs/proc/meminfo'/>
<target dir='/proc/meminfo'/>
</filesystem>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/var/lib/lxcfs/proc/stat'/>
<target dir='/proc/stat'/>
</filesystem>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/var/lib/lxcfs/proc/swaps'/>
<target dir='/proc/swaps'/>
</filesystem>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/var/lib/lxcfs/proc/uptime'/>
<target dir='/proc/uptime'/>
</filesystem>
<interface type='bridge'>
<mac address='52:54:00:34:28:f3'/>
<source bridge='br0'/>
<target dev='vnet0'/>
<guest dev='eth0'/>
</interface>
<console type='pty' tty='/dev/pts/2'>
<source path='/dev/pts/2'/>
<target type='lxc' port='0'/>
<alias name='console0'/>
</console>
</devices>
<seclabel type='none' model='none'/>
</domain>