Author Topic: Tips on how to enable cgroup support for libvirt KVM on Fedora  (Read 12954 times)

tle

  • Sr. Member
  • ****
  • Posts: 463
  • Karma: +53/-0
    • View Profile
    • Trung's Personal Website
So if you are running into following warnings when running:

Code: [Select]
$ virt-host-validate
  QEMU: Checking for hardware virtualization                                 : PASS
  QEMU: Checking if device /dev/kvm exists                                   : PASS
  QEMU: Checking if device /dev/kvm is accessible                            : PASS
  QEMU: Checking for PowerPC KVM module loaded                               : PASS
  QEMU: Checking if device /dev/vhost-net exists                             : PASS
  QEMU: Checking if device /dev/net/tun exists                               : PASS
  QEMU: Checking for cgroup 'cpu' controller support                         : WARN (Enable 'cpu' in kernel Kconfig file or mount/enable cgroup controller in your system)
  QEMU: Checking for cgroup 'cpuacct' controller support                     : PASS
  QEMU: Checking for cgroup 'cpuset' controller support                      : WARN (Enable 'cpuset' in kernel Kconfig file or mount/enable cgroup controller in your system)
  QEMU: Checking for cgroup 'memory' controller support                      : PASS
  QEMU: Checking for cgroup 'devices' controller support                     : WARN (Enable 'devices' in kernel Kconfig file or mount/enable cgroup controller in your system)
  QEMU: Checking for cgroup 'blkio' controller support                       : WARN (Enable 'blkio' in kernel Kconfig file or mount/enable cgroup controller in your system)
  QEMU: Checking if IOMMU is enabled by kernel                               : PASS
  QEMU: Checking for secure guest support                                    : WARN (Unknown if this platform has Secure Guest support)
   LXC: Checking for Linux >= 2.6.26                                         : PASS
   LXC: Checking for namespace ipc                                           : PASS
   LXC: Checking for namespace mnt                                           : PASS
   LXC: Checking for namespace pid                                           : PASS
   LXC: Checking for namespace uts                                           : PASS
   LXC: Checking for namespace net                                           : PASS
   LXC: Checking for namespace user                                          : PASS
   LXC: Checking for cgroup 'cpu' controller support                         : FAIL (Enable 'cpu' in kernel Kconfig file or mount/enable cgroup controller in your system)
   LXC: Checking for cgroup 'cpuacct' controller support                     : PASS
   LXC: Checking for cgroup 'cpuset' controller support                      : FAIL (Enable 'cpuset' in kernel Kconfig file or mount/enable cgroup controller in your system)
   LXC: Checking for cgroup 'memory' controller support                      : PASS
   LXC: Checking for cgroup 'devices' controller support                     : FAIL (Enable 'devices' in kernel Kconfig file or mount/enable cgroup controller in your system)
   LXC: Checking for cgroup 'freezer' controller support                     : FAIL (Enable 'freezer' in kernel Kconfig file or mount/enable cgroup controller in your system)
   LXC: Checking for cgroup 'blkio' controller support                       : FAIL (Enable 'blkio' in kernel Kconfig file or mount/enable cgroup controller in your system)
   LXC: Checking if device /sys/fs/fuse/connections exists                   : PASS

You can enable them by setting GRUB boot params:

Code: [Select]
sudo grubby --update-kernel=ALL --args="cgroup_enable=cpuset cgroup_enable=cpu cgroup_enable=devices cgroup_enable=freezer cgroup_enable=blkio"

Make sure you restart your PC
Faithful Linux enthusiast

My Raptor Blackbird