virsh memtune fails with LXC guests (lxcDomainGetMemoryParameters)

Bug #1348672 reported by Brian Candler on 2014-07-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Low
Unassigned

Bug Description

[ubuntu 14.04 amd64 on Mac Mini, fully up to date]

The "virsh memtune" function (see ftp://libvirt.org/libvirt/virshcmdref/html/sect-memtune.html) completely fails with LXC guests; it looks to be some sort of protocol/ABI problem.

--------------------------------
$ virsh -c lxc:
...
virsh # memtune gold-lxc-20140717
error: Unable to get number of memory parameters
error: unsupported flags (0x4) in function lxcDomainGetMemoryParameters
--------------------------------

Here is the XML for this guest:

virsh # dumpxml gold-lxc-20140717
<domain type='lxc' id='6265'>
  <name>gold-lxc-20140717</name>
  <uuid>b2a02d49-bb1e-4aec-81d1-58910892780e</uuid>
  <memory unit='KiB'>327680</memory>
  <currentMemory unit='KiB'>327680</currentMemory>
  <vcpu placement='static'>1</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='/data1/lxc/gold-20140717/rootfs'/>
      <target dir='/'/>
    </filesystem>
    <interface type='bridge'>
      <mac address='52:54:5d:00:0a:88'/>
      <source bridge='br-lan'/>
      <target dev='vnet0'/>
    </interface>
    <console type='pty' tty='/dev/pts/1'>
      <source path='/dev/pts/1'/>
      <target type='lxc' port='0'/>
      <alias name='console0'/>
    </console>
  </devices>
  <seclabel type='none'/>
</domain>

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: libvirt-bin 1.2.2-0ubuntu13.1.1
ProcVersionSignature: Ubuntu 3.13.0-32.57-generic 3.13.11.4
Uname: Linux 3.13.0-32-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
Date: Fri Jul 25 14:25:11 2014
InstallationDate: Installed on 2014-07-16 (8 days ago)
InstallationMedia: Ubuntu-Server 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.2)
SourcePackage: libvirt
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.libvirt.qemu.conf: [inaccessible: [Errno 13] Permission denied: '/etc/libvirt/qemu.conf']

Brian Candler (b-candler) wrote :
Serge Hallyn (serge-hallyn) wrote :

Thanks for submitting this bug. Note that until we get proper apparmor support (which may be coming with the next upstream release) lxc containers under libvirt are not deemed safe.

Given the error message, I don't believe this is fixed upstream:

    /* We don't return strings, and thus trivially support this flag. */;
    flags &= ~VIR_TYPED_PARAM_STRING_OKAY;

(VIR_TYPED_PARAM_STRING_OKAY is 4)

Changed in libvirt (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers