Ok - By the way, I looked into updating out KVM versions. Since we already have so many KVM servers of this version in production, I can't easily forklift update everything without much testing. exec /usr/libexec/qemu-kvm -s -S "$@" export LIBGUESTFS_HV=/root/work/qemu-wrapper export LIBGUESTFS_BACKEND=direct How do I simulate the setup of devices the test tool perform? Just copy/pasting the qemu-kvm argument list doesn't work. I was hoping that LIBGUESTFS_HV would replace usage of /usr/libexec/qemu-kvm with /root/work/qemu-wrapper, but does not appear to [root@us7-sec-vm-02 work]# ./test.sh + /root/work/qemu-wrapper -global virtio-blk-pci.scsi=off -nodefconfig -nodefaults -nographic -machine accel=kvm:tcg -cpu host,+kvmclock -m 500 -no-reboot -kernel /var/tmp/.guestfs-0/kernel.20700 -initrd /var/tmp/.guestfs-0/initrd.20700 -device virtio-scsi-pci,id=scsi -drive file=/tmp/libguestfs-test-tool-sda-uGZyEt,cache=none,format=raw,id=hd0,if=none -device scsi-hd,drive=hd0 -drive file=/var/tmp/.guestfs-0/root.20700,snapshot=on,id=appliance,if=none,cache=unsafe -device scsi-hd,drive=appliance -device virtio-serial -serial stdio -device sga -chardev socket,path=/tmp/libguestfsG73eA4/guestfsd.sock,id=channel0 -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 -append 'panic=1 console=ttyS0 udevtimeout=600 no_timer_check acpi=off printk.time=1 cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm' qemu-kvm: -chardev socket,path=/tmp/libguestfsG73eA4/guestfsd.sock,id=channel0: socket connect failed: Connection refused qemu-kvm: -chardev socket,path=/tmp/libguestfsG73eA4/guestfsd.sock,id=channel0: chardev: opening backend "socket" failed [root@work]# libguestfs-test-tool ************************************************************ * IMPORTANT NOTICE * * When reporting bugs, include the COMPLETE, UNEDITED * output below in your bug report. * ************************************************************ LIBGUESTFS_HV=/root/work/qemu-wrapper LIBGUESTFS_BACKEND=direct PATH=/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin SELinux: Enforcing library version: 1.20.11rhel=6,release=2.el6 guestfs_get_append: (null) guestfs_get_attach_method: appliance guestfs_get_autosync: 1 guestfs_get_cachedir: /var/tmp guestfs_get_direct: 0 guestfs_get_memsize: 500 guestfs_get_network: 0 guestfs_get_path: /usr/lib64/guestfs guestfs_get_pgroup: 0 guestfs_get_qemu: /usr/libexec/qemu-kvm guestfs_get_recovery_proc: 1 guestfs_get_selinux: 0 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: attach-method=appliance libguestfs: launch: tmpdir=/tmp/libguestfsG73eA4 libguestfs: launch: umask=0077 libguestfs: launch: euid=0 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.39-400.215.6.el6uek.x86_64 is a directory picked vmlinuz-2.6.39-400.215.6.el6uek.x86_64 because modpath /lib/modules/2.6.39-400.215.6.el6uek.x86_64 exists checking modpath /lib/modules/2.6.39-400.215.4.el6uek.x86_64 is a directory picked vmlinuz-2.6.39-400.215.4.el6uek.x86_64 because modpath /lib/modules/2.6.39-400.215.4.el6uek.x86_64 exists checking modpath /lib/modules/2.6.32-431.23.3.el6.x86_64 is a directory picked vmlinuz-2.6.32-431.23.3.el6.x86_64 because modpath /lib/modules/2.6.32-431.23.3.el6.x86_64 exists checking modpath /lib/modules/2.6.32-279.el6.x86_64 is a directory picked vmlinuz-2.6.32-279.el6.x86_64 because modpath /lib/modules/2.6.32-279.el6.x86_64 exists checking modpath /lib/modules/2.6.32-431.20.5.el6.x86_64 is a directory picked vmlinuz-2.6.32-431.20.5.el6.x86_64 because modpath /lib/modules/2.6.32-431.20.5.el6.x86_64 exists checking modpath /lib/modules/2.6.39-200.24.1.el6uek.x86_64 is a directory picked vmlinuz-2.6.39-200.24.1.el6uek.x86_64 because modpath /lib/modules/2.6.39-200.24.1.el6uek.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 [00025ms] visiting /usr/lib64/guestfs/supermin.d/init.img supermin helper [00025ms] visiting /usr/lib64/guestfs/supermin.d/udev-rules.img supermin helper [00025ms] adding kernel modules supermin helper [00057ms] finished creating appliance libguestfs: checksum of existing appliance: 2886a8f3710fce98f495863d78188571ec8d400168688aea3f253d8cf67304b4 libguestfs: [00060ms] 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: [00229ms] finished testing qemu features libguestfs: accept_from_daemon: 0x182fe00 g->state = 1 [00230ms] /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-0/kernel.20700 \ -initrd /var/tmp/.guestfs-0/initrd.20700 \ -device virtio-scsi-pci,id=scsi \ -drive file=/tmp/libguestfs-test-tool-sda-uGZyEt,cache=none,format=raw,id=hd0,if=none \ -device scsi-hd,drive=hd0 \ -drive file=/var/tmp/.guestfs-0/root.20700,snapshot=on,id=appliance,if=none,cache=unsafe \ -device scsi-hd,drive=appliance \ -device virtio-serial \ -serial stdio \ -device sga \ -chardev socket,path=/tmp/libguestfsG73eA4/guestfsd.sock,id=channel0 \ -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \ -append 'panic=1 console=ttyS0 udevtimeout=600 no_timer_check acpi=off printk.time=1 cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm' \x1b[1;256r\x1b[256;256H\x1b[6n Google, Inc. Serial Graphics Adapter 10/14/11 SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $ (mockbuild@ca-build44.us.oracle.com) Fri Oct 14 20:04:36 UTC 2011 Term: 80x24 4 0 SeaBIOS (version seabios-0.6.1.2-28.el6) Probing EDD (edd=off to disable)... ok \x1b[2J On Thu, Jul 31, 2014 at 3:00 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
[Let's keep this on the mailing list]
On Thu, Jul 31, 2014 at 02:48:25PM -0700, Zetan Drableg wrote:
Hi Richard, I created qemu-wrapper: #!/bin/bash -x
exec gdbserver :1234 /usr/libexec/qemu-kvm "$@"
gdbserver will end up debugging the qemu process, not the guest inside. This is not useful.
You need to do something like:
exec /usr/libexec/qemu-kvm -s -S "$@"
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v