Skip to content

Instantly share code, notes, and snippets.

@TonyLovesDevOps
Created May 5, 2015 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TonyLovesDevOps/92f03bb52fdfca60325e to your computer and use it in GitHub Desktop.
Save TonyLovesDevOps/92f03bb52fdfca60325e to your computer and use it in GitHub Desktop.
virt-copy-in as user with unset LIBGUESTFS_QEMU (failure)
Environment details:
Host OS: CentOS 6.6
Packages:
libguestfs-tools-1.20.11-11.el6.x86_64
libguestfs-1.20.11-11.el6.x86_64
libguestfs-tools-c-1.20.11-11.el6.x86_64
qemu-kvm version: QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2-2.448.el6_6), Copyright (c) 2003-2008 Fabrice Bellard
# Output from command: unset LIBGUESTFS_QEMU && LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=0 virt-copy-in -a vmbuilder2.sea1.qcow2 hosts /etc/ &>/tmp/virt-copy-as-user-unset
libguestfs: create: flags = 0, handle = 0x1e766f0
libguestfs: launch: attach-method=appliance
libguestfs: launch: tmpdir=/tmp/libguestfsblveEp
libguestfs: launch: umask=0022
libguestfs: launch: euid=3143
libguestfs: command: run: febootstrap-supermin-helper
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ -f checksum
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ x86_64
supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64, kernel = (null), initrd = (null), appliance = (null)
supermin helper [00000ms] inputs[0] = /usr/lib64/guestfs/supermin.d
checking modpath /lib/modules/2.6.32-431.el6.x86_64 is a directory
picked vmlinuz-2.6.32-431.el6.x86_64 because modpath /lib/modules/2.6.32-431.el6.x86_64 exists
checking modpath /lib/modules/2.6.32-431.20.3.el6.x86_64 is a directory
picked vmlinuz-2.6.32-431.20.3.el6.x86_64 because modpath /lib/modules/2.6.32-431.20.3.el6.x86_64 exists
checking modpath /lib/modules/2.6.32-504.8.1.el6.x86_64 is a directory
picked vmlinuz-2.6.32-504.8.1.el6.x86_64 because modpath /lib/modules/2.6.32-504.8.1.el6.x86_64 exists
supermin helper [00000ms] finished creating kernel
supermin helper [00000ms] visiting /usr/lib64/guestfs/supermin.d
supermin helper [00000ms] visiting /usr/lib64/guestfs/supermin.d/base.img
supermin helper [00000ms] visiting /usr/lib64/guestfs/supermin.d/daemon.img
supermin helper [00000ms] visiting /usr/lib64/guestfs/supermin.d/hostfiles
supermin helper [00013ms] visiting /usr/lib64/guestfs/supermin.d/init.img
supermin helper [00013ms] visiting /usr/lib64/guestfs/supermin.d/udev-rules.img
supermin helper [00013ms] adding kernel modules
supermin helper [00035ms] finished creating appliance
libguestfs: checksum of existing appliance: b8f1cae981de88b5ccecc017d17ef6dc15f68ae25d254fed1157f60517de547c
libguestfs: [00037ms] begin testing qemu features
libguestfs: command: run: /usr/libexec/qemu-kvm
libguestfs: command: run: \ -nographic
libguestfs: command: run: \ -help
libguestfs: command: run: /usr/libexec/qemu-kvm
libguestfs: command: run: \ -nographic
libguestfs: command: run: \ -version
libguestfs: qemu version 0.12
libguestfs: command: run: /usr/libexec/qemu-kvm
libguestfs: command: run: \ -nographic
libguestfs: command: run: \ -machine accel=kvm:tcg
libguestfs: command: run: \ -device ?
libguestfs: [00148ms] finished testing qemu features
libguestfs: accept_from_daemon: 0x1e766f0 g->state = 1
[00148ms] /usr/libexec/qemu-kvm \
-global virtio-blk-pci.scsi=off \
-nodefconfig \
-nodefaults \
-nographic \
-machine accel=kvm:tcg \
-cpu host,+kvmclock \
-m 500 \
-no-reboot \
-kernel /var/tmp/.guestfs-3143/kernel.846 \
-initrd /var/tmp/.guestfs-3143/initrd.846 \
-device virtio-scsi-pci,id=scsi \
-drive file=vmbuilder2.sea1.qcow2,cache=none,id=hd0,if=none \
-device scsi-hd,drive=hd0 \
-drive file=/var/tmp/.guestfs-3143/root.846,snapshot=on,id=appliance,if=none,cache=unsafe \
-device scsi-hd,drive=appliance \
-device virtio-serial \
-serial stdio \
-device sga \
-chardev socket,path=/tmp/libguestfsblveEp/guestfsd.sock,id=channel0 \
-device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
-append 'panic=1 console=ttyS0 udevtimeout=6000 no_timer_check acpi=off printk.time=1 cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=screen'
qemu-kvm: -drive file=vmbuilder2.sea1.qcow2,cache=none,id=hd0,if=none: could not open disk image vmbuilder2.sea1.qcow2: Invalid argument
libguestfs: child_cleanup: 0x1e766f0: child process died
libguestfs: sending SIGTERM to process 860
libguestfs: error: /usr/libexec/qemu-kvm exited with error status 1, see debug messages above
libguestfs: error: guestfs_launch failed, see earlier error messages
libguestfs: closing guestfs handle 0x1e766f0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsblveEp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment