RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1404287 - qemu-kvm cannot boot RHEL 7 kernel with TCG, hangs at "Probing EDD (edd=off to disable)..."
Summary: qemu-kvm cannot boot RHEL 7 kernel with TCG, hangs at "Probing EDD (edd=off t...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1359086
Blocks: 1406393
TreeView+ depends on / blocked
 
Reported: 2016-12-13 14:31 UTC by Lubos Kocman
Modified: 2017-08-01 22:11 UTC (History)
11 users (show)

Fixed In Version: libguestfs-1.36.1-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1406393 (view as bug list)
Environment:
Last Closed: 2017-08-01 22:11:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2023 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2017-08-01 19:32:01 UTC

Description Lubos Kocman 2016-12-13 14:31:35 UTC
Description of problem:

rel-eng is using guestmount to mount bootimage without root permissions as part of compose process. This is forcing us to diverge from upstream ...

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. cd /tmp
2. mkdir -p /tmp/whatever
3. curl -L -O http://download.lab.bos.redhat.com/devel/lkocman/efiboot.img
4. LIBGUESTFS_BACKEND=direct guestmount -a efiboot.img -m /dev/sda /tmp/whatever -v


Actual results:

-bash-4.2$ LIBGUESTFS_BACKEND=direct guestmount -a efiboot.img -m /dev/sda /tmp/whatever -v
libguestfs: launch: program=guestmount
libguestfs: launch: version=1.32.7rhel=7,release=3.el7,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfsFRpDuH
libguestfs: launch: umask=0002
libguestfs: launch: euid=15196
libguestfs: is_openable: /dev/kvm: No such file or directory
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin5
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-15196/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-15196/appliance.d
supermin: version: 5.1.16
supermin: rpm: detected RPM version 4.11
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-15196/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: command: run: /usr/libexec/qemu-kvm
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -help
libguestfs: qemu version 1.5
libguestfs: command: run: /usr/libexec/qemu-kvm
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -machine accel=kvm:tcg
libguestfs: command: run: \ -device ?
libguestfs: finished testing qemu features
libguestfs: command: run: dmesg | grep -Eoh 'lpj=[[:digit:]]+'
libguestfs: read_lpj_from_dmesg: calculated lpj=2499998
[07327ms] /usr/libexec/qemu-kvm \
    -global virtio-blk-pci.scsi=off \
    -nodefconfig \
    -enable-fips \
    -nodefaults \
    -display none \
    -machine accel=kvm:tcg \
    -m 500 \
    -no-reboot \
    -rtc driftfix=slew \
    -no-hpet \
    -global kvm-pit.lost_tick_policy=discard \
    -kernel /var/tmp/.guestfs-15196/appliance.d/kernel \
    -initrd /var/tmp/.guestfs-15196/appliance.d/initrd \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-scsi-pci,id=scsi \
    -drive file=/tmp/efiboot.img,cache=writeback,id=hd0,if=none \
    -device scsi-hd,drive=hd0 \
    -drive file=/var/tmp/.guestfs-15196/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none,format=raw \
    -device scsi-hd,drive=appliance \
    -device virtio-serial-pci \
    -serial stdio \
    -device sga \
    -chardev socket,path=/tmp/libguestfsFRpDuH/guestfsd.sock,id=channel0 \
    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
    -append 'panic=1 console=ttyS0 udevtimeout=6000 udev.event-timeout=6000 no_timer_check lpj=2499998 printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color'
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
Back to tcg accelerator.
libguestfs: responding to serial console Device Status Report
\x1b[1;256r\x1b[256;256H\x1b[6n
Google, Inc.
Serial Graphics Adapter 12/29/13
SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $ (mockbuild@) Sun Dec 29 03:43:06 UTC 2013
Term: 80x24
4 0
SeaBIOS (version 1.9.1-5.el7)
Booting from ROM...
Probing EDD (edd=off to disable)... 

Expected results:

would mount the actual image ... works on fedora with same efiboot.img!

Comment 1 Richard W.M. Jones 2016-12-13 14:54:37 UTC
The "Probing EDD" message comes from the kernel, but very early on.
FWIW the next message (also from the kernel) should be:

\x1b[2J[    0.000000] Initializing cgroup subsys cpuset

So, this is a kernel bug.  Which kernel is this?
I tested kernel-3.10.0-514.el7.x86_64 and that WFM.

You can also rm -rf /var/tmp/.guestfs-* which will cause
libguestfs to rebuild the appliance cache using the latest
(highest version) kernel in /boot.

If you have a weird kernel installed as the latest kernel in
/boot then you can change how supermin picks the kernel by
setting the SUPERMIN_KERNEL and SUPERMIN_MODULES environment
variables (http://libguestfs.org/supermin.1.html).

Comment 3 Xianghua Chen 2016-12-15 11:53:58 UTC
Can't reproduce it either using kernel-3.10.0-327.el7.x86_64 & libguestfs-1.32.7-3.el7.x86_64.

Comment 4 Red Hat Bugzilla Rules Engine 2016-12-15 11:54:05 UTC
Quality Engineering Management has reviewed and declined this request. You may appeal this decision by reopening this request.

Comment 5 Lubos Kocman 2016-12-15 12:08:04 UTC
[root@rcm-compose-nightly-01 lkocman]# uname -r
3.10.0-514.el7.x86_64

Comment 6 Lubos Kocman 2016-12-15 12:11:01 UTC
[root@rcm-compose-nightly-01 tmp]# mkdir /tmp/whatever 
mkdir: cannot create directory '/tmp/whatever': File exists
[root@rcm-compose-nightly-01 tmp]# rm -rf /tmp/whatever 
[root@rcm-compose-nightly-01 tmp]# mkdir /tmp/whatever
[root@rcm-compose-nightly-01 tmp]# curl -L -O http://download.lab.bos.redhat.com/devel/lkocman/efiboot.img
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   252    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 5396k  100 5396k    0     0  11.1M      0 --:--:-- --:--:-- --:--:-- 17.5M
[root@rcm-compose-nightly-01 tmp]# LIBGUESTFS_BACKEND=direct guestmount -a efiboot.img -m /dev/sda /tmp/whatever -v
libguestfs: launch: program=guestmount
libguestfs: launch: version=1.32.7rhel=7,release=3.el7,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfs7hiTun
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: is_openable: /dev/kvm: No such file or directory
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin5
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.1.16
supermin: rpm: detected RPM version 4.11
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: build: /usr/lib64/guestfs/supermin.d
supermin: reading the supermin appliance
supermin: build: visiting /usr/lib64/guestfs/supermin.d/base.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/daemon.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/excludefiles type uncompressed excludefiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/hostfiles type uncompressed hostfiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/init.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/packages type uncompressed packages
supermin: build: visiting /usr/lib64/guestfs/supermin.d/udev-rules.tar.gz type gzip base image (tar)
supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 198 packages, including dependencies
supermin: build: 31785 files
supermin: build: 8306 files, after matching excludefiles
supermin: build: 8312 files, after adding hostfiles
supermin: build: 8306 files, after removing unreadable files
supermin: build: 8346 files, after munging
supermin: kernel: picked kernel vmlinuz-3.10.0-514.el7.x86_64
supermin: kernel: picked modules path /lib/modules/3.10.0-514.el7.x86_64
supermin: kernel: kernel_version 3.10.0-514.el7.x86_64
supermin: kernel: modules /lib/modules/3.10.0-514.el7.x86_64
supermin: ext2: creating empty ext2 filesystem '/var/tmp/.guestfs-0/appliance.d.mf3nkaj9/root'
supermin: ext2: populating from base image
supermin: ext2: copying files from host filesystem
supermin: ext2: copying kernel modules
supermin: ext2: creating minimal initrd '/var/tmp/.guestfs-0/appliance.d.mf3nkaj9/initrd'
supermin: ext2: wrote 31 modules to minimal initrd
supermin: renaming /var/tmp/.guestfs-0/appliance.d.mf3nkaj9 to /var/tmp/.guestfs-0/appliance.d
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: command: run: /usr/libexec/qemu-kvm
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -help
libguestfs: qemu version 1.5
libguestfs: command: run: /usr/libexec/qemu-kvm
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -machine accel=kvm:tcg
libguestfs: command: run: \ -device ?
libguestfs: finished testing qemu features
libguestfs: command: run: dmesg | grep -Eoh 'lpj=[[:digit:]]+'
libguestfs: read_lpj_from_dmesg: calculated lpj=2499998
[28106ms] /usr/libexec/qemu-kvm \
    -global virtio-blk-pci.scsi=off \
    -nodefconfig \
    -enable-fips \
    -nodefaults \
    -display none \
    -machine accel=kvm:tcg \
    -m 500 \
    -no-reboot \
    -rtc driftfix=slew \
    -no-hpet \
    -global kvm-pit.lost_tick_policy=discard \
    -kernel /var/tmp/.guestfs-0/appliance.d/kernel \
    -initrd /var/tmp/.guestfs-0/appliance.d/initrd \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-scsi-pci,id=scsi \
    -drive file=/tmp/efiboot.img,cache=writeback,id=hd0,if=none \
    -device scsi-hd,drive=hd0 \
    -drive file=/var/tmp/.guestfs-0/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none,format=raw \
    -device scsi-hd,drive=appliance \
    -device virtio-serial-pci \
    -serial stdio \
    -device sga \
    -chardev socket,path=/tmp/libguestfs7hiTun/guestfsd.sock,id=channel0 \
    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
    -append 'panic=1 console=ttyS0 udevtimeout=6000 udev.event-timeout=6000 no_timer_check lpj=2499998 printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color'
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
Back to tcg accelerator.
libguestfs: responding to serial console Device Status Report
\x1b[1;256r\x1b[256;256H\x1b[6n
Google, Inc.
Serial Graphics Adapter 12/29/13
SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $ (mockbuild@) Sun Dec 29 03:43:06 UTC 2013
Term: 80x24
4 0
SeaBIOS (version 1.9.1-5.el7)
Booting from ROM...
Probing EDD (edd=off to disable)...

Comment 7 Richard W.M. Jones 2016-12-15 12:55:00 UTC
In fact I *can* reproduce it.  However it only happens inside a nested
guest on an Intel host (not on an AMD host as I was using before).
So it's either TCG or a kernel bug.

kernel-3.10.0-514.el7.x86_64
qemu-kvm-1.5.3-126.el7.x86_64

I notice that both of us are using qemu-kvm 1.5 (ie. the ancient
version).  I didn't try qemu-kvm-rhev yet, but that has a different
TCG implementation so it might be worth trying.

Comment 8 Richard W.M. Jones 2016-12-15 13:01:13 UTC
Yes it works fine with qemu-kvm-rhev-2.6.0-28.el7_3.2.x86_64

So it's a qemu-kvm TCG bug.  Note that we don't really support
TCG at all, but I'll try to see if it's something obvious.

Comment 9 Richard W.M. Jones 2016-12-15 13:13:58 UTC
Weirdly this only happens when you attach a virtio-scsi device.

This command works:

# /usr/libexec/qemu-kvm -nodefconfig -nodefaults -display none -m 500 -no-reboot -machine accel=kvm:tcg -kernel /boot/vmlinuz-3.10.0-514.el7.x86_64 -append "panic=1 console=ttyS0" -device sga -serial stdio

This command fails (the reproducer):

# truncate -s 1G /var/tmp/empty
# /usr/libexec/qemu-kvm -nodefconfig -nodefaults -display none -m 500 -no-reboot -machine accel=kvm:tcg -kernel /boot/vmlinuz-3.10.0-514.el7.x86_64 -append "panic=1 console=ttyS0" -device virtio-scsi-pci,id=scsi -drive file=/var/tmp/empty,cache=writeback,id=hd0,if=none -device scsi-hd,drive=hd0 -device sga -serial stdio

Comment 10 Richard W.M. Jones 2016-12-15 13:16:43 UTC
Another workaround is to disable EDD (as indeed it says in the
kernel message).

  export LIBGUESTFS_APPEND="edd=off"

This works even with qemu-kvm 1.5.3.

Comment 11 Nadav Goldin 2016-12-18 12:55:02 UTC
Here too on a centos 7.3 VM:

[root@localhost ~]# guestfish get-backend
direct
[root@localhost ~]# rpm -qa | grep qemu
qemu-kvm-common-1.5.3-126.el7.x86_64
qemu-kvm-1.5.3-126.el7.x86_64
qemu-img-1.5.3-126.el7.x86_64
libvirt-daemon-driver-qemu-2.0.0-10.el7_3.2.x86_64
ipxe-roms-qemu-20160127-5.git6366fa7a.el7.noarch
[root@localhost ~]# uname -r
3.10.0-514.el7.x86_64
[root@localhost ~]# cat /etc/*release*
CentOS Linux release 7.3.1611 (Core) 
Derived from Red Hat Enterprise Linux 7.3 (Source)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.3.1611 (Core) 
CentOS Linux release 7.3.1611 (Core) 
cpe:/o:centos:centos:7
[root@localhost ~]# libguestfs-test-tool 
     ************************************************************
     *                    IMPORTANT NOTICE
     *
     * When reporting bugs, include the COMPLETE, UNEDITED
     * output below in your bug report.
     *
     ************************************************************
LIBGUESTFS_BACKEND=direct
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
SELinux: Enforcing
guestfs_get_append: (null)
guestfs_get_autosync: 1
guestfs_get_backend: direct
guestfs_get_backend_settings: []
guestfs_get_cachedir: /var/tmp
guestfs_get_direct: 0
guestfs_get_hv: /usr/libexec/qemu-kvm
guestfs_get_memsize: 500
guestfs_get_network: 0
guestfs_get_path: /usr/lib64/guestfs
guestfs_get_pgroup: 0
guestfs_get_program: libguestfs-test-tool
guestfs_get_recovery_proc: 1
guestfs_get_smp: 1
guestfs_get_tmpdir: /tmp
guestfs_get_trace: 0
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.32.7rhel=7,release=3.el7.centos,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfsXEVTPF
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: is_openable: /dev/kvm: No such file or directory
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin5
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.1.16
supermin: rpm: detected RPM version 4.11
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: command: run: /usr/libexec/qemu-kvm
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -help
libguestfs: qemu version 1.5
libguestfs: command: run: /usr/libexec/qemu-kvm
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -machine accel=kvm:tcg
libguestfs: command: run: \ -device ?
libguestfs: finished testing qemu features
libguestfs: command: run: dmesg | grep -Eoh 'lpj=[[:digit:]]+'
libguestfs: read_lpj_from_dmesg: calculated lpj=2808018
[00174ms] /usr/libexec/qemu-kvm \
    -global virtio-blk-pci.scsi=off \
    -nodefconfig \
    -enable-fips \
    -nodefaults \
    -display none \
    -machine accel=kvm:tcg \
    -m 500 \
    -no-reboot \
    -rtc driftfix=slew \
    -no-hpet \
    -global kvm-pit.lost_tick_policy=discard \
    -kernel /var/tmp/.guestfs-0/appliance.d/kernel \
    -initrd /var/tmp/.guestfs-0/appliance.d/initrd \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-scsi-pci,id=scsi \
    -drive file=/tmp/libguestfsXEVTPF/scratch.1,cache=unsafe,format=raw,id=hd0,if=none \
    -device scsi-hd,drive=hd0 \
    -drive file=/var/tmp/.guestfs-0/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none,format=raw \
    -device scsi-hd,drive=appliance \
    -device virtio-serial-pci \
    -serial stdio \
    -device sga \
    -chardev socket,path=/tmp/libguestfsXEVTPF/guestfsd.sock,id=channel0 \
    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
    -append 'panic=1 console=ttyS0 udevtimeout=6000 udev.event-timeout=6000 no_timer_check lpj=2808018 printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color'
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
Back to tcg accelerator.
libguestfs: responding to serial console Device Status Report
\x1b[1;256r\x1b[256;256H\x1b[6n
Google, Inc.
Serial Graphics Adapter 06/09/14
SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $ (mockbuild@) Mon Jun  9 21:33:48 UTC 2014
Term: 80x24
4 0
SeaBIOS (version 1.9.1-5.el7)
Booting from ROM...
Probing EDD (edd=off to disable)...

Comment 12 Richard W.M. Jones 2016-12-18 19:33:58 UTC
Patch posted:

https://www.redhat.com/archives/libguestfs/2016-December/msg00147.html

Jarda, this bug is also a candidate for RHEL 7.3 z-stream.  Could
you please add the flag for us?

Comment 13 Richard W.M. Jones 2016-12-18 19:35:07 UTC
NB: This is a bug in qemu-kvm, but as it is easily worked around
in libguestfs I am moving the bug back to libguestfs.

Comment 14 Xianghua Chen 2016-12-20 06:48:23 UTC
I can reproduce it now with the following pacakges:
libguestfs-1.32.7-3.el7.x86_64
qemu-kvm-1.5.3-126.el7.x86_64

Steps:
1. Prepare an rhel7 guest image on an Intel host (not on an AMD host),boot it.
2. In the guest vm:
Update the qemu-kvm version to :
qemu-kvm-1.5.3-126.el7.x86_64
Install libguestfs:
libguestfs-1.32.7-3.el7.x86_64
3. 
# mkdir /tmp/whatever 
# cd /tmp
# curl -L -O http://download.lab.bos.redhat.com/devel/lkocman/efiboot.img
# LIBGUESTFS_BACKEND=direct guestmount -a efiboot.img -m /dev/sda /tmp/whatever -v
libguestfs: launch: program=guestmount
libguestfs: launch: version=1.32.7rhel=7,release=3.el7,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfs34su5t
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: is_openable: /dev/kvm: No such file or directory
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin5
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.1.16
supermin: rpm: detected RPM version 4.11
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: build: /usr/lib64/guestfs/supermin.d
supermin: reading the supermin appliance
supermin: build: visiting /usr/lib64/guestfs/supermin.d/base.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/daemon.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/excludefiles type uncompressed excludefiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/hostfiles type uncompressed hostfiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/init.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/packages type uncompressed packages
supermin: build: visiting /usr/lib64/guestfs/supermin.d/udev-rules.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/zz-packages-xfs type uncompressed packages
supermin: build: visiting /usr/lib64/guestfs/supermin.d/zz-winsupport.tar.gz type gzip base image (tar)
supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 204 packages, including dependencies
supermin: build: 31367 files
supermin: build: 8331 files, after matching excludefiles
supermin: build: 8340 files, after adding hostfiles
supermin: build: 8334 files, after removing unreadable files
supermin: build: 8375 files, after munging
supermin: kernel: picked kernel vmlinuz-3.10.0-327.el7.x86_64
supermin: kernel: picked modules path /lib/modules/3.10.0-327.el7.x86_64
supermin: kernel: kernel_version 3.10.0-327.el7.x86_64
supermin: kernel: modules /lib/modules/3.10.0-327.el7.x86_64
supermin: ext2: creating empty ext2 filesystem '/var/tmp/.guestfs-0/appliance.d.85hibdfj/root'
supermin: ext2: populating from base image
supermin: ext2: copying files from host filesystem
supermin: ext2: copying kernel modules
supermin: ext2: creating minimal initrd '/var/tmp/.guestfs-0/appliance.d.85hibdfj/initrd'
supermin: ext2: wrote 27 modules to minimal initrd
supermin: renaming /var/tmp/.guestfs-0/appliance.d.85hibdfj to /var/tmp/.guestfs-0/appliance.d
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: command: run: /usr/libexec/qemu-kvm
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -help
libguestfs: qemu version 1.5
libguestfs: command: run: /usr/libexec/qemu-kvm
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -machine accel=kvm:tcg
libguestfs: command: run: \ -device ?
libguestfs: finished testing qemu features
libguestfs: command: run: dmesg | grep -Eoh 'lpj=[[:digit:]]+'
libguestfs: read_lpj_from_dmesg: calculated lpj=2666664
[33163ms] /usr/libexec/qemu-kvm \
    -global virtio-blk-pci.scsi=off \
    -nodefconfig \
    -enable-fips \
    -nodefaults \
    -display none \
    -machine accel=kvm:tcg \
    -m 500 \
    -no-reboot \
    -rtc driftfix=slew \
    -no-hpet \
    -global kvm-pit.lost_tick_policy=discard \
    -kernel /var/tmp/.guestfs-0/appliance.d/kernel \
    -initrd /var/tmp/.guestfs-0/appliance.d/initrd \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-scsi-pci,id=scsi \
    -drive file=/tmp/efiboot.img,cache=writeback,id=hd0,if=none \
    -device scsi-hd,drive=hd0 \
    -drive file=/var/tmp/.guestfs-0/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none,format=raw \
    -device scsi-hd,drive=appliance \
    -device virtio-serial-pci \
    -serial stdio \
    -device sga \
    -chardev socket,path=/tmp/libguestfs34su5t/guestfsd.sock,id=channel0 \
    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
    -append 'panic=1 console=ttyS0 udevtimeout=6000 udev.event-timeout=6000 no_timer_check lpj=2666664 printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color'
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
Back to tcg accelerator.
libguestfs: responding to serial console Device Status Report
\x1b[1;256r\x1b[256;256H\x1b[6n
Google, Inc.
Serial Graphics Adapter 12/29/13
SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $ (mockbuild@) Sun Dec 29 03:43:06 UTC 2013
Term: 80x24
4 0
SeaBIOS (version seabios-1.7.5-11.el7)
Booting from ROM...
Probing EDD (edd=off to disable)... ok

Comment 17 YongkuiGuo 2017-03-29 09:34:41 UTC
Verified with packages:
libguestfs-1.36.3-1.el7.x86_64
qemu-kvm-1.5.3-126.el7.x86_64 (and qemu-kvm-1.5.3-134.el7.x86_64)

Steps:
1. cd /tmp
2. mkdir -p /tmp/whatever
3. curl -L -O http://download.lab.bos.redhat.com/devel/lkocman/efiboot.img
4. LIBGUESTFS_BACKEND=direct guestmount -a efiboot.img -m /dev/sda /tmp/whatever 

Actual results:
The last command can be executed successfully.  So verified.

Comment 18 errata-xmlrpc 2017-08-01 22:11:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2023


Note You need to log in before you can comment on or make changes to this bug.