Dear  Remi Duraffort,

Also, I tried to run libguestfs-test-tool as below:
The log has shown  ===== TEST FINISHED OK =====. But, the QEMU job stills fail again like the same   RuntimeError: guestfs_launch failed

root@lava-docker:/# libguestfs-test-tool
....
....
trying to open virtio-serial channel '/dev/virtio-ports/org.libguestfs.channel.0'
udevadm --debug settle
calling: settle
libguestfs: recv_from_daemon: received GUESTFS_LAUNCH_FLAG
libguestfs: appliance is up
Guest launched OK.
guestfsd: main_loop: new request, len 0x3c
udevadm --debug settle
calling: settle
commandrvf: stdout=e stderr=y flags=0x10000
commandrvf: parted -s -- /dev/sda mklabel msdos mkpart primary 128s -128s
[   19.195739]  sda: unknown partition table
Warning: The resulting partition is not properly aligned for best performance.
[   20.019720]  sda: sda1
udevadm --debug settle
calling: settle
guestfsd: main_loop: proc 210 (part_disk) took 1.54 seconds
guestfsd: main_loop: new request, len 0x54
commandrvf: stdout=y stderr=y flags=0x0
commandrvf: wipefs --help
commandrvf: stdout=n stderr=n flags=0x0
commandrvf: wipefs -a --force /dev/sda1
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: mke2fs -t ext2 -F /dev/sda1
mke2fs 1.43.4 (31-Jan-2017)
guestfsd: main_loop: proc 278 (mkfs) took 0.96 seconds
guestfsd: main_loop: new request, len 0x40
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: mount -o  /dev/sda1 /sysroot/
[   21.736017] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[   21.773796] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
guestfsd: main_loop: proc 1 (mount) took 0.25 seconds
guestfsd: main_loop: new request, len 0x34
guestfsd: main_loop: proc 3 (touch) took 0.19 seconds
guestfsd: main_loop: new request, len 0x28
umount-all: /proc/mounts: fsname=rootfs dir=/ type=rootfs opts=rw freq=0 passno=0
umount-all: /proc/mounts: fsname=proc dir=/proc type=proc opts=rw,relatime freq=0 passno=0
umount-all: /proc/mounts: fsname=/dev/root dir=/ type=ext2 opts=rw,noatime freq=0 passno=0
umount-all: /proc/mounts: fsname=/proc dir=/proc type=proc opts=rw,relatime freq=0 passno=0
umount-all: /proc/mounts: fsname=/sys dir=/sys type=sysfs opts=rw,relatime freq=0 passno=0
umount-all: /proc/mounts: fsname=tmpfs dir=/run type=tmpfs opts=rw,nosuid,relatime,size=97868k,mode=755 freq=0 passno=0
umount-all: /proc/mounts: fsname=/dev dir=/dev type=devtmpfs opts=rw,relatime,size=243220k,nr_inodes=60805,mode=755 freq=0 passno=0
umount-all: /proc/mounts: fsname=/dev/pts dir=/dev/pts type=devpts opts=rw,relatime,mode=600,ptmxmode=000 freq=0 passno=0
umount-all: /proc/mounts: fsname=/dev/sda1 dir=/sysroot type=ext2 opts=rw,relatime freq=0 passno=0
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: umount /sysroot
fsync /dev/sda
libguestfs: sending SIGTERM to process 649
libguestfs: qemu maxrss 291760K
libguestfs: closing guestfs handle 0x7f7f4bdf0170 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsSvoJTS
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsXf1vkq
===== TEST FINISHED OK =====

Best regards,
Canh Nguyen

2018-05-05 13:57 GMT+07:00 Nguyễn Phong Cảnh <phongcanhit@gmail.com>:
Dear  Remi Duraffort,

I have tried run this command libguestfs-test-tool on LAVA container.
Then, I run QEMU job again. It is failed again.
The log has shown as below:

root@lava-docker:/# sudo libguestfs-test-tool
     ************************************************************
     *                    IMPORTANT NOTICE
     *
     * When reporting bugs, include the COMPLETE, UNEDITED
     * output below in your bug report.
     *
     ************************************************************
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SELinux: Disabled
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/bin/qemu-system-x86_64
guestfs_get_memsize: 500
guestfs_get_network: 0
guestfs_get_path: /usr/lib/x86_64-linux-gnu/guestfs
guestfs_get_pgroup: 0
guestfs_get_program: libguestfs-test-tool
guestfs_get_recovery_proc: 1
guestfs_get_smp: 1
guestfs_get_sockdir: /tmp
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.34.6
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/libguestfsaWvizY
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin
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/lib/x86_64-linux-gnu/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.1.17
supermin: package handler: debian/dpkg
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: checking for previously cached test results of /usr/bin/qemu-system-x86_64, in /var/tmp/.guestfs-0
libguestfs: loading previously cached test results
libguestfs: qemu version 2.8
libguestfs: finished testing qemu features
[00096ms] /usr/bin/qemu-system-x86_64 \
    -global virtio-blk-pci.scsi=off \
    -nodefconfig \
    -enable-fips \
    -nodefaults \
    -display none \
    -machine accel=kvm:tcg \
    -cpu host \
    -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/libguestfsaWvizY/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/libguestfsLDfGe0/guestfsd.sock,id=channel0 \
    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
    -append 'panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm'
qemu-system-x86_64: /build/qemu-DqynNa/qemu-2.8+dfsg/target-i386/kvm.c:1805: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages
libguestfs: child_cleanup: 0x7f682bbab170: child process died
libguestfs: sending SIGTERM to process 621
libguestfs: error: /usr/bin/qemu-system-x86_64 killed by signal 6 (Aborted), see debug messages above
libguestfs: error: guestfs_launch failed, see earlier error messages
libguestfs: closing guestfs handle 0x7f682bbab170 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsaWvizY
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsLDfGe0


2018-05-03 12:58 GMT+07:00 Remi Duraffort <remi.duraffort@linaro.org>:
Hello,

then can you try to run "libguestfs-test-tool" as asked in the log message?

2018-05-02 19:17 GMT+02:00 Nguyễn Phong Cảnh <phongcanhit@gmail.com>:
Dear Remi Duraffort,

I already have mounted /boot, /lib/modules and --priviledged mode to run docker.
I submit QEMU job again. It still failed.

Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/lava_dispatcher/action.py", line 298, in run_actions action_max_end_time, args) File "/usr/lib/python2.7/dist-packages/lava_dispatcher/actions/deploy/apply_overlay.py", line 89, in run self.job.device['actions']['deploy']['methods']['image']['parameters']['guest']['size']) File "/usr/lib/python2.7/dist-packages/lava_dispatcher/utils/filesystem.py", line 131, in prepare_guestfs guest.launch() File "/usr/lib/python2.7/dist-packages/guestfs.py", line 5705, in launch r = libguestfsmod.launch(self._o) RuntimeError: guestfs_launch failed. This usually means the libguestfs appliance failed to start or crashed. Do: export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 and run the command again. For further information, read: http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs You can also run 'libguestfs-test-tool' and post the *complete* output into a bug report or message to the libguestfs mailing list.

Could you have a check my log?

Best regards,
Canh Nguyen

2018-05-02 22:49 GMT+07:00 Remi Duraffort <remi.duraffort@linaro.org>:
Hello,

if you want to run qemu jobs inside a docker container, you need to bind /boot and /lib/modules.
You then have to run the docker in privileged mode or with --device /dev/kvm:/dev/kvm:rw


Regards

2018-05-02 17:22 GMT+02:00 Nguyễn Phong Cảnh <phongcanhit@gmail.com>:
Dear all,

I'm testing QEMU on LAVA with my first job.

I have taken a sample here:

But, it's failed at "apply-overlay-guest" action:

Overlay: /var/lib/lava/dispatcher/slave/tmp/15/overlay-1.3.4.tar.gz
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/lava_dispatcher/pipeline/action.py", line 290, in run_actions
    new_connection = action.run(connection, args)
  File "/usr/lib/python2.7/dist-packages/lava_dispatcher/pipeline/actions/deploy/apply_overlay.py", line 83, in run
    self.job.device['actions']['deploy']['methods']['image']['parameters']['guest']['size'])
  File "/usr/lib/python2.7/dist-packages/lava_dispatcher/pipeline/utils/filesystem.py", line 128, in prepare_guestfs
    guest.launch()
  File "/usr/lib/python2.7/dist-packages/guestfs.py", line 5705, in launch
    r = libguestfsmod.launch(self._o)
RuntimeError: /usr/bin/supermin exited with error status 1.
To see full error messages you may need to enable debugging.
Do:
  export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
and run the command again.  For further information, read:


I'm using docker LAVA version 2017.11. And, attached is my log.

Do you have idea for this issue?. Thanks in advance

Best regards,
Canh Nguyen

My contact email:

_______________________________________________
Lava-users mailing list
Lava-users@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lava-users




--
Rémi Duraffort
LAVA Team




--
Rémi Duraffort
LAVA Team