Description of problem: Attempting to run virt-sysprep in the Windows 10 Subsystem for Linux (Ubuntu). This maybe a bit optimistic! However fails to run and happy to help diagnose if possible. Version-Release number of selected component (if applicable): Windows 10 Enterprise Version 1709 Build 16299.192 Windows 10 Subsystem for linux: uname -a Linux TORL-RBEAUCHA 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial guestfish 1.32.2 virt-sysprep 1.32.2 How reproducible: Always Steps to Reproduce: 1. updated Ubuntu 2. sudo apt-get install libguestfs-tools 3. run virt-sysprep on image Actual results: virt-sysprep -v -x --hostname rich-test --format qcow2 -a /tmp/image.qcow2 [ 0.0] Examining the guest ... libguestfs: trace: set_verbose true libguestfs: trace: set_verbose = 0 libguestfs: create: flags = 0, handle = 0x18b3600, program = virt-sysprep libguestfs: trace: set_trace true libguestfs: trace: set_trace = 0 libguestfs: trace: set_verbose true libguestfs: trace: set_verbose = 0 libguestfs: trace: add_drive "/tmp/image.qcow2" "readonly:false" "format:qcow2" "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 *> libguestfs: trace: get_backend libguestfs: trace: get_backend = "direct" libguestfs: launch: program=virt-sysprep libguestfs: launch: version=1.32.2 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/libguestfstzHe7Z libguestfs: launch: umask=0000 libguestfs: launch: euid=1000 libguestfs: is_openable: /dev/kvm: No such file or directory 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: [00004ms] begin building supermin appliance libguestfs: [00004ms] 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-1000/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-1000/appliance.d supermin: version: 5.1.14 supermin: package handler: debian/dpkg supermin: acquiring lock on /var/tmp/.guestfs-1000/lock supermin: build: /usr/lib/x86_64-linux-gnu/guestfs/supermin.d supermin: reading the supermin appliance supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/base.tar.gz type gzip base image (tar) supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/daemon.tar.gz type gzip base image (tar) supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/excludefiles type uncompressed excludefiles supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/hostfiles type uncompressed hostfiles supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/init.tar.gz type gzip base image (tar) supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages type uncompressed packages supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-hfsplus type uncompressed packages supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-reiserfs type uncompressed packages supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-xfs type uncompressed packages supermin: build: visiting /usr/lib/x86_64-linux-gnu/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: 195 packages, including dependencies supermin: build: 6862 files supermin: build: 3791 files, after matching excludefiles supermin: build: 3793 files, after adding hostfiles supermin: build: 3793 files, after removing unreadable files supermin: build: 3797 files, after munging supermin: failed to find a suitable kernel (host_cpu=x86_64). I looked for kernels in /boot and modules in /lib/modules. If this is a Xen guest, and you only have Xen domU kernels installed, try installing a fullvirt kernel (only for supermin use, you shouldn't boot the Xen guest with it). libguestfs: trace: launch = -1 (error) virt-sysprep: error: libguestfs error: /usr/bin/supermin exited with error status 1, see debug messages above libguestfs: trace: close libguestfs: closing guestfs handle 0x18b3600 (state 0) libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfstzHe7Z Expected results: virtsys-prep runs Additional info:
Do you have any kernels under /boot and are they readable by non-root users?
Hi - Thanks for the comment. Embarrassingly no kernels under /boot. I think I was a bit bemused as to how the Windows subsystem is working. I installed a kernel (sudo apt-get install linux-image-generic) Didn't let it install grub or change config. Virtualisation tools virt-sysprep, virt-sparsify now working! Thanks. Will close this.
Configuration problems in the Windows Subsystem for Linux