-
Notifications
You must be signed in to change notification settings - Fork 24
Description
- Install virt-bootstrap on Ubuntu20.04
- Run virt-manager to create a system container
- Under source URI section type 'virt-builder://ubuntu-20.04'
It fails with error :
`Unable to complete install: 'virt-bootstrap did not complete successfully'
[Errno 2] No such file or directory: '/tmp/bootstrap_3vq6oy8c'
All extracted files will be owned by the current unprivileged user.
Building image`
Debugging further at the command prompt:
`$ virt-bootstrap -d virt-builder://ubuntu-20.04 /home/rorviksam/.local/share/libvirt/filesystems/dev.ubuntu20
WARNING : All extracted files will be owned by the current unprivileged user.
INFO : Building image
[ 5.2] Downloading: http://builder.libguestfs.org/ubuntu-20.04.xz
[ 6.4] Planning how to build this image
[ 6.4] Uncompressing
[ 16.5] Opening the new disk
virt-builder: error: libguestfs error: /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:
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.
If reporting bugs, run virt-builder with debugging enabled and include the
complete output:
virt-builder -v -x [...]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/virtBootstrap/sources/virt_builder_source.py", line 96, in unpack
self.build_image(tmp_file.name)
File "/usr/local/lib/python3.8/dist-packages/virtBootstrap/sources/virt_builder_source.py", line 78, in build_image
self.run_builder(cmd)
File "/usr/local/lib/python3.8/dist-packages/virtBootstrap/sources/virt_builder_source.py", line 84, in run_builder
subprocess.check_call(cmd)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['virt-builder', 'ubuntu-20.04', '-o', '/tmp/bootstrap_31pr5c7p', '--no-network', '--delete', '/dev/', '--delete', '/boot/', '--edit', '/etc/fstab:s/^/#/']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/virt-bootstrap", line 11, in
load_entry_point('virt-bootstrap==1.1.1', 'console_scripts', 'virt-bootstrap')()
File "/usr/local/lib/python3.8/dist-packages/virtBootstrap/virt_bootstrap.py", line 349, in main
bootstrap(uri=args.URI,
File "/usr/local/lib/python3.8/dist-packages/virtBootstrap/virt_bootstrap.py", line 164, in bootstrap
source(uri=uri,
File "/usr/local/lib/python3.8/dist-packages/virtBootstrap/sources/virt_builder_source.py", line 154, in unpack
raise Exception("Unknown format:" + self.output_format)
File "/usr/lib/python3.8/tempfile.py", line 632, in exit
self.close()
File "/usr/lib/python3.8/tempfile.py", line 639, in close
self._closer.close()
File "/usr/lib/python3.8/tempfile.py", line 576, in close
unlink(self.name)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/bootstrap_31pr5c7p'
**Debugging further by running libguestfs-test-tool** libguestfs-test-tool
************************************************************
* IMPORTANT NOTICE
*
* When reporting bugs, include the COMPLETE, UNEDITED
* output below in your bug report.
*
************************************************************
LIBVIRT_DEFAULT_URI=qemu:///system
PATH=/home/rorviksam/bin:/home/rorviksam/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
XDG_RUNTIME_DIR=/run/user/1000
SELinux: sh: 1: getenforce: not found
guestfs_get_append: (null)
guestfs_get_autosync: 1
guestfs_get_backend: direct
guestfs_get_backend_settings: []
guestfs_get_cachedir: /var/tmp
guestfs_get_hv: /usr/bin/qemu-system-x86_64
guestfs_get_memsize: 768
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: /run/user/1000
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.40.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/libguestfsqXqDwC
libguestfs: launch: umask=0002
libguestfs: launch: euid=1000
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-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.20
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: 237 packages, including dependencies
supermin: build: 12290 files
supermin: build: 8865 files, after matching excludefiles
supermin: build: 8875 files, after adding hostfiles
supermin: build: 8871 files, after removing unreadable files
supermin: build: 8874 files, after munging
supermin: kernel: looking for kernel using environment variables ...
supermin: kernel: looking for kernels in /lib/modules/*/vmlinuz ...
supermin: kernel: looking for kernels in /boot ...
supermin: kernel: kernel version of /boot/vmlinuz-5.4.0-70-generic = 5.4.0-70-generic (from filename)
supermin: kernel: picked modules path /lib/modules/5.4.0-70-generic
supermin: kernel: kernel version of /boot/vmlinuz-5.4.0-66-generic = 5.4.0-66-generic (from filename)
supermin: kernel: picked modules path /lib/modules/5.4.0-66-generic
supermin: kernel: kernel version of /boot/vmlinuz-5.4.0-65-generic = 5.4.0-65-generic (from filename)
supermin: kernel: picked modules path /lib/modules/5.4.0-65-generic
supermin: kernel: picked vmlinuz /boot/vmlinuz-5.4.0-70-generic
supermin: kernel: kernel_version 5.4.0-70-generic
supermin: kernel: modpath /lib/modules/5.4.0-70-generic
cp: cannot open '/boot/vmlinuz-5.4.0-70-generic' for reading: Permission denied
supermin: cp -p '/boot/vmlinuz-5.4.0-70-generic' '/var/tmp/.guestfs-1000/appliance.d.6qwzpo6h/kernel': command failed, see earlier errors
libguestfs: error: /usr/bin/supermin exited with error status 1, see debug messages above
libguestfs: closing guestfs handle 0x56380e3f0040 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsqXqDwC
`