[Libguestfs] Fwd: [Qemu-devel] debugging qemu-nbd.c

Skippy VonDrake skippyvondrake at gmail.com
Tue Apr 9 18:25:28 UTC 2013


>> libguestfs: qemu version 1.4
>> libguestfs: command: run:
>> /home/skippy/Downloads/qemu/latest-build/install_dir/bin/qemu-system-x86_64
>> libguestfs: command: run: \ -nographic
>> libguestfs: command: run: \ -machine accel=kvm:tcg
>> libguestfs: command: run: \ -device ?
>> libguestfs: [00025ms] finished testing qemu features
>> libguestfs: [00025ms] r from fork: 13658 \n
>>  \ libguestfs: error: appliance closed the connection unexpectedly,
>> see earlier error messages
>
> Either some output is missing, or something very strange is happening
> in the appliance back end.  Would advise adding lots more debugging to
> the code that starts at this comment:
>
>   if (r == 0) {                 /* Child (qemu). */
>
> I don't think the error has anything to do with qemu-nbd.  It doesn't
> even get to the point where libguestfs prints the qemu command line.

Maybe I mucked up libguestfs logging with my own logging... don't see
how but it's possible.

Here are the log statements I put in for the qemu-child.
I ended with listing the args in g->app.cmdline just before
this statement:
   execv (g->qemu, g->app.cmdline); /* Run qemu. */

in guestfs forked child - pid for qemu process: 29439
qemu child - before if (has_appliance_drive)
qemu child - before Set up virtio-serial
qemu child - before Dump the command line (after setting up stderr)
qemu child - before * Put qemu in a new process group. *
/usr/local/bin/qemu-system-x86_64
  -global
  virtio-blk-pci.scsi=off
  -nodefconfig
  -nodefaults
  -nographic
  -device
  virtio-scsi-pci,id=scsi
  -drive
  file=nbd:localhost:3000,format=raw,id=hd0,if=none
  -device
  scsi-hd,drive=hd0
  -drive
  file=../appliance/root,snapshot=on,id=appliance,if=none,cache=unsafe
  -device
  scsi-hd,drive=appliance
  -machine
  accel=kvm:tcg
  -m
  500
  -no-reboot
  -no-hpet
  -device
  virtio-serial
  -serial
  stdio
  -device
  sga
  -chardev
  socket,path=/tmp/libguestfsdeuFRl/guestfsd.sock,id=channel0
  -device
  virtserialport,chardev=channel0,name=org.libguestfs.channel.0
  -kernel
  ../appliance/kernel
  -initrd
  ../appliance/initrd
  -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

-Skippy




More information about the Libguestfs mailing list