qemu-kvm-init script called with undefined $KVM_HUGEPAGES

Bug #1531191 reported by Simon Déziel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
Fix Released
Medium
Serge Hallyn

Bug Description

$ grep qemu-kvm /var/log/syslog
Jan 5 10:23:24 simon-laptop qemu-kvm[497]: * Configuring kvm qemu-kvm
Jan 5 10:23:24 simon-laptop qemu-kvm[497]: /usr/share/qemu/init/qemu-kvm-init: 82: [: Illegal number:
Jan 5 10:23:24 simon-laptop qemu-kvm[497]: ...done.

Line 82 of /usr/share/qemu/init/qemu-kvm-init is:

 if [ "$KVM_HUGEPAGES" -eq "1" ]; then

This script sources /etc/default/qemu-kvm which is where the huge page variable was set in prior releases. With Xenial, the default file is not shipped by any package.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: qemu-system-common 1:2.4+dfsg-5ubuntu3
ProcVersionSignature: Ubuntu 4.3.0-5.16-generic 4.3.3
Uname: Linux 4.3.0-5-generic x86_64
ApportVersion: 2.19.3-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
CurrentDmesg: Error: command ['dmesg'] failed with exit code 1: dmesg: read kernel buffer failed: Operation not permitted
Date: Tue Jan 5 10:34:58 2016
KvmCmdLine:
 COMMAND STAT EUID RUID PID PPID %CPU COMMAND
 kvm-irqfd-clean S< 0 0 641 2 0.0 [kvm-irqfd-clean]
MachineType: LENOVO 2516CTO
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.3.0-5-generic root=/dev/mapper/crypt-xroot ro quiet splash cryptopts=target=crypt,source=/dev/sda1,lvm=crypt-xroot possible_cpus=4 nmi_watchdog=0 vt.handoff=7
SourcePackage: qemu
UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev'
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 02/14/2013
dmi.bios.vendor: LENOVO
dmi.bios.version: 6IET85WW (1.45 )
dmi.board.name: 2516CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr6IET85WW(1.45):bd02/14/2013:svnLENOVO:pn2516CTO:pvrThinkPadT410:rvnLENOVO:rn2516CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 2516CTO
dmi.product.version: ThinkPad T410
dmi.sys.vendor: LENOVO

Revision history for this message
Simon Déziel (sdeziel) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks. I'm fixing this during the 2.5 qemu merge.

Changed in qemu (Ubuntu):
status: New → In Progress
assignee: nobody → Serge Hallyn (serge-hallyn)
importance: Undecided → Medium
Revision history for this message
Simon Déziel (sdeziel) wrote : Re: [Bug 1531191] Re: qemu-kvm-init script called with undefined $KVM_HUGEPAGES

On 2016-01-05 06:51 PM, Serge Hallyn wrote:
> Thanks. I'm fixing this during the 2.5 qemu merge.

I just saw your new update, thanks! The comparison operator needs to be
changed for the fix to work (see patch).

Lastly, the changelog mentions the default file should be installed but
I don't see any.

Regards,
Simon

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "qemu-kvm-init-fix-comparison.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Gah. Thank you.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

> Lastly, the changelog mentions the default file should be installed but
> I don't see any.

Fwiw this is because when the init files were momved to qemu-system-common, but
the defaults file were accidentally left behind.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu - 1:2.5+dfsg-1ubuntu2

---------------
qemu (1:2.5+dfsg-1ubuntu2) xenial; urgency=medium

  * Place qemu-kvm.defaults file in qemu-system-common, next to the init
    scripts. Fix the comparison operator when checking KVM_HUGEPAGES.
    Thanks Simon. (LP: #1531191)

 -- Serge Hallyn <email address hidden> Wed, 06 Jan 2016 09:45:37 -0800

Changed in qemu (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.