So this is not happening always and something is to do with nested virtualization:-
We hold the node as logs were not available in job to see what's in the virt-customize log, below is what we found:- [jenkins@undercloud ~]$ tail -f .__repo_setup.sh.log GS =0000 00000000 0000ffff 00009300 LDT=0000 00000000 0000ffff 00008200 TR =0000 00000000 0000ffff 00008b00 GDT= 00000000 0000ffff IDT= 00000000 0000ffff CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400 EFER=0000000000000000 Code=00 66 89 d8 66 e8 e5 af ff ff 66 83 c4 0c 66 5b 66 5e 66 c3 <ea> 5b e0 00 f0 30 36 2f 32 33 2f 39 39 00 fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^C [jenkins@undercloud ~]$ vi .__repo_setup.sh.log [jenkins@undercloud ~]$ cat .__repo_setup.sh.log [ 0.0] Examining the guest ... libguestfs: trace: set_verbose true libguestfs: trace: set_verbose = 0 libguestfs: trace: set_network true libguestfs: trace: set_network = 0 libguestfs: trace: add_drive "overcloud-full.qcow2" "readonly:false" "protocol:file" "discard:besteffort" libguestfs: trace: add_drive = 0 libguestfs: trace: launch libguestfs: trace: get_tmpdir libguestfs: trace: get_tmpdir = "/tmp" libguestfs: trace: version libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 36, release: 3, extra: rhel=7,release=6.el7_4.3,libvirt, > libguestfs: trace: get_backend libguestfs: trace: get_backend = "direct" libguestfs: launch: program=virt-customize libguestfs: launch: version=1.36.3rhel=7,release=6.el7_4.3,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/libguestfs15JLpA libguestfs: launch: umask=0022 libguestfs: launch: euid=0 libguestfs: trace: get_backend_setting "force_tcg" libguestfs: trace: get_backend_setting = NULL (error) libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" 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: 189 packages, including dependencies supermin: build: 31303 files supermin: build: 7545 files, after matching excludefiles supermin: build: 7554 files, after adding hostfiles supermin: build: 7544 files, after removing unreadable files supermin: build: 7574 files, after munging supermin: kernel: SUPERMIN_KERNEL environment variable /boot/vmlinuz-3.10.0-693.el7.x86_64 supermin: kernel: SUPERMIN_KERNEL_VERSION environment variable 3.10.0-693.el7.x86_64 supermin: kernel: SUPERMIN_KERNEL version 3.10.0-693.el7.x86_64 supermin: kernel: SUPERMIN_MODULES environment variable = /lib/modules/3.10.0-693.el7.x86_64 supermin: kernel: kernel_version 3.10.0-693.el7.x86_64 supermin: kernel: modules /lib/modules/3.10.0-693.el7.x86_64 supermin: ext2: creating empty ext2 filesystem '/var/tmp/.guestfs-0/appliance.d.soljd01f/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.soljd01f/initrd' supermin: ext2: wrote 31 modules to minimal initrd supermin: renaming /var/tmp/.guestfs-0/appliance.d.soljd01f to /var/tmp/.guestfs-0/appliance.d libguestfs: finished building supermin appliance libguestfs: begin testing qemu features libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" libguestfs: checking for previously cached test results of /usr/libexec/qemu-kvm, in /var/tmp/.guestfs-0 libguestfs: command: run: /usr/libexec/qemu-kvm libguestfs: command: run: \ -display none libguestfs: command: run: \ -help libguestfs: qemu version 2.9 libguestfs: command: run: /usr/libexec/qemu-kvm libguestfs: command: run: \ -display none libguestfs: command: run: \ -machine accel=kvm:tcg libguestfs: command: run: \ -device ? libguestfs: saving test results libguestfs: trace: get_sockdir libguestfs: trace: get_sockdir = "/tmp" libguestfs: finished testing qemu features libguestfs: trace: get_backend_setting "gdb" libguestfs: trace: get_backend_setting = NULL (error) [15139ms] /usr/libexec/qemu-kvm \ -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=/home/jenkins/overcloud-full.qcow2,cache=writeback,discard=unmap,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/libguestfs83klHq/guestfsd.sock,id=channel0 \ -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \ -netdev user,id=usernet,net=169.254.0.0/16 \ -device virtio-net-pci,netdev=usernet \ -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 guestfs_network=1 TERM=unknown' KVM: entry failed, hardware error 0x0 EAX=00000000 EBX=00000000 ECX=00000000 EDX=000506e3 ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000 EIP=0000fff0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0000 00000000 0000ffff 00009300 CS =f000 ffff0000 0000ffff 00009b00 SS =0000 00000000 0000ffff 00009300 DS =0000 00000000 0000ffff 00009300 FS =0000 00000000 0000ffff 00009300 GS =0000 00000000 0000ffff 00009300 LDT=0000 00000000 0000ffff 00008200 TR =0000 00000000 0000ffff 00008b00 GDT= 00000000 0000ffff IDT= 00000000 0000ffff CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400 EFER=0000000000000000 Code=00 66 89 d8 66 e8 e5 af ff ff 66 83 c4 0c 66 5b 66 5e 66 c3 <ea> 5b e0 00 f0 30 36 2f 32 33 2f 39 39 00 fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Also, /usr/libexec/qemu-kvm --no-kvm -hdc /dev/null works but /usr/libexec/qemu-kvm -hdc /dev/null Fails
Workaround to get virt-customize run is to force tcg export LIBGUESTFS_BACKEND_SETTINGS=force_tcg
Still it's not clear why it's not happening always.
So this is not happening always and something is to do with nested virtualization:-
We hold the node as logs were not available in job to see what's in the virt-customize log, below is what we found:- setup.sh. log 00000 DR1=00000000000 00000 DR2=00000000000 00000 DR3=00000000000 00000 f0ff0 DR7=00000000000 00400 000000 setup.sh. log setup.sh. log full.qcow2" "readonly:false" "protocol:file" "discard: besteffort" release= 6.el7_4. 3,libvirt, > virt-customize 1.36.3rhel= 7,release= 6.el7_4. 3,libvirt /tmp/libguestfs 15JLpA .guestfs- 0/lock guestfs/ supermin. d .guestfs- 0/appliance. d .guestfs- 0/lock guestfs/ supermin. d guestfs/ supermin. d/base. tar.gz type gzip base image (tar) guestfs/ supermin. d/daemon. tar.gz type gzip base image (tar) guestfs/ supermin. d/excludefiles type uncompressed excludefiles guestfs/ supermin. d/hostfiles type uncompressed hostfiles guestfs/ supermin. d/init. tar.gz type gzip base image (tar) guestfs/ supermin. d/packages type uncompressed packages guestfs/ supermin. d/udev- rules.tar. gz type gzip base image (tar) 3.10.0- 693.el7. x86_64 KERNEL_ VERSION environment variable 3.10.0- 693.el7. x86_64 693.el7. x86_64 3.10.0- 693.el7. x86_64 693.el7. x86_64 3.10.0- 693.el7. x86_64 .guestfs- 0/appliance. d.soljd01f/ root' .guestfs- 0/appliance. d.soljd01f/ initrd' .guestfs- 0/appliance. d.soljd01f to /var/tmp/ .guestfs- 0/appliance. d qemu-kvm, in /var/tmp/.guestfs-0 qemu-kvm qemu-kvm qemu-kvm \ blk-pci. scsi=off \ lost_tick_ policy= discard \ .guestfs- 0/appliance. d/kernel \ .guestfs- 0/appliance. d/initrd \ filename= /dev/urandom, id=rng0 \ rng-pci, rng=rng0 \ scsi-pci, id=scsi \ jenkins/ overcloud- full.qcow2, cache=writeback ,discard= unmap,id= hd0,if= none \ tmp/.guestfs- 0/appliance. d/root, snapshot= on,id=appliance ,cache= unsafe, if=none, format= raw \ drive=appliance \ path=/tmp/ libguestfs83klH q/guestfsd. sock,id= channel0 \ chardev= channel0, name=org. libguestfs. channel. 0 \ usernet, net=169. 254.0.0/ 16 \ net-pci, netdev= usernet \ 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 guestfs_network=1 TERM=unknown' 00000 DR1=00000000000 00000 DR2=00000000000 00000 DR3=00000000000 00000 f0ff0 DR7=00000000000 00400 000000
[jenkins@undercloud ~]$ tail -f .__repo_
GS =0000 00000000 0000ffff 00009300
LDT=0000 00000000 0000ffff 00008200
TR =0000 00000000 0000ffff 00008b00
GDT= 00000000 0000ffff
IDT= 00000000 0000ffff
CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
DR0=00000000000
DR6=00000000fff
EFER=0000000000
Code=00 66 89 d8 66 e8 e5 af ff ff 66 83 c4 0c 66 5b 66 5e 66 c3 <ea> 5b e0 00 f0 30 36 2f 32 33 2f 39 39 00 fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^C
[jenkins@undercloud ~]$ vi .__repo_
[jenkins@undercloud ~]$ cat .__repo_
[ 0.0] Examining the guest ...
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_network true
libguestfs: trace: set_network = 0
libguestfs: trace: add_drive "overcloud-
libguestfs: trace: add_drive = 0
libguestfs: trace: launch
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 36, release: 3, extra: rhel=7,
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
libguestfs: launch: program=
libguestfs: launch: version=
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=
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
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/
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/
libguestfs: command: run: \ -o /var/tmp/
supermin: version: 5.1.16
supermin: rpm: detected RPM version 4.11
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/
supermin: build: /usr/lib64/
supermin: reading the supermin appliance
supermin: build: visiting /usr/lib64/
supermin: build: visiting /usr/lib64/
supermin: build: visiting /usr/lib64/
supermin: build: visiting /usr/lib64/
supermin: build: visiting /usr/lib64/
supermin: build: visiting /usr/lib64/
supermin: build: visiting /usr/lib64/
supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 189 packages, including dependencies
supermin: build: 31303 files
supermin: build: 7545 files, after matching excludefiles
supermin: build: 7554 files, after adding hostfiles
supermin: build: 7544 files, after removing unreadable files
supermin: build: 7574 files, after munging
supermin: kernel: SUPERMIN_KERNEL environment variable /boot/vmlinuz-
supermin: kernel: SUPERMIN_
supermin: kernel: SUPERMIN_KERNEL version 3.10.0-
supermin: kernel: SUPERMIN_MODULES environment variable = /lib/modules/
supermin: kernel: kernel_version 3.10.0-
supermin: kernel: modules /lib/modules/
supermin: ext2: creating empty ext2 filesystem '/var/tmp/
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/
supermin: ext2: wrote 31 modules to minimal initrd
supermin: renaming /var/tmp/
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: checking for previously cached test results of /usr/libexec/
libguestfs: command: run: /usr/libexec/
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -help
libguestfs: qemu version 2.9
libguestfs: command: run: /usr/libexec/
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -machine accel=kvm:tcg
libguestfs: command: run: \ -device ?
libguestfs: saving test results
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/tmp"
libguestfs: finished testing qemu features
libguestfs: trace: get_backend_setting "gdb"
libguestfs: trace: get_backend_setting = NULL (error)
[15139ms] /usr/libexec/
-global virtio-
-nodefconfig \
-enable-fips \
-nodefaults \
-display none \
-machine accel=kvm:tcg \
-cpu host \
-m 500 \
-no-reboot \
-rtc driftfix=slew \
-no-hpet \
-global kvm-pit.
-kernel /var/tmp/
-initrd /var/tmp/
-object rng-random,
-device virtio-
-device virtio-
-drive file=/home/
-device scsi-hd,drive=hd0 \
-drive file=/var/
-device scsi-hd,
-device virtio-serial-pci \
-serial stdio \
-device sga \
-chardev socket,
-device virtserialport,
-netdev user,id=
-device virtio-
-append 'panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-
KVM: entry failed, hardware error 0x0
EAX=00000000 EBX=00000000 ECX=00000000 EDX=000506e3
ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000
EIP=0000fff0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0000 00000000 0000ffff 00009300
CS =f000 ffff0000 0000ffff 00009b00
SS =0000 00000000 0000ffff 00009300
DS =0000 00000000 0000ffff 00009300
FS =0000 00000000 0000ffff 00009300
GS =0000 00000000 0000ffff 00009300
LDT=0000 00000000 0000ffff 00008200
TR =0000 00000000 0000ffff 00008b00
GDT= 00000000 0000ffff
IDT= 00000000 0000ffff
CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
DR0=00000000000
DR6=00000000fff
EFER=0000000000
Code=00 66 89 d8 66 e8 e5 af ff ff 66 83 c4 0c 66 5b 66 5e 66 c3 <ea> 5b e0 00 f0 30 36 2f 32 33 2f 39 39 00 fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Also, /usr/libexec/ qemu-kvm --no-kvm -hdc /dev/null works but /usr/libexec/ qemu-kvm -hdc /dev/null Fails
Workaround to get virt-customize run is to force tcg BACKEND_ SETTINGS= force_tcg
export LIBGUESTFS_
Still it's not clear why it's not happening always.