Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virt-bootstrap not working on Ubuntu20.04 #9

Open
rorviksam opened this issue Apr 12, 2021 · 4 comments
Open

virt-bootstrap not working on Ubuntu20.04 #9

rorviksam opened this issue Apr 12, 2021 · 4 comments

Comments

@rorviksam
Copy link

rorviksam commented Apr 12, 2021

  • 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
`

@rorviksam rorviksam changed the title virt-bootstrap fails for non-root user and cannot be used automatically by virt-manager ran by normal user. virt-bootstrap not working on Ubuntu20.04 Apr 12, 2021
@phughk
Copy link

phughk commented Aug 28, 2021

Same for me. Host is Ubuntu Server, image is ubuntu-21.04-minimal-cloudimg-amd64.img downloaded from today

ubuntu@debussy:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.04
Release:        21.04
Codename:       hirsute
ubuntu@debussy:~$ virt-customize --version 
virt-customize 1.44.1
ubuntu@debussy:~$ virt-customize -v -x -a ubuntu-21.04-minimal-cloudimg-amd64.img --root-password password:mySimplePassword123
[   0.0] Examining the guest ...
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x564adbba9da0, program = virt-customize
libguestfs: trace: set_trace true
libguestfs: trace: set_trace = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_network true
libguestfs: trace: set_network = 0
libguestfs: trace: add_drive "ubuntu-21.04-minimal-cloudimg-amd64.img" "readonly:false" "protocol:file" "discard:besteffort"
libguestfs: trace: add_drive = 0
libguestfs: trace: launch
libguestfs: trace: max_disks
libguestfs: trace: max_disks = 255
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 44, release: 1, extra: , >
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
libguestfs: launch: program=virt-customize
libguestfs: launch: version=1.44.1
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/libguestfs4DiW0D
libguestfs: launch: umask=0002
libguestfs: launch: euid=1000
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
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.2.1
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: 279 packages, including dependencies
supermin: build: 10840 files
supermin: build: 5666 files, after matching excludefiles
supermin: build: 5675 files, after adding hostfiles
supermin: build: 5672 files, after removing unreadable files
supermin: build: 5678 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.11.0-31-generic = 5.11.0-31-generic (from filename)
supermin: kernel: picked modules path /lib/modules/5.11.0-31-generic
supermin: kernel: kernel version of /boot/vmlinuz-5.11.0-25-generic = 5.11.0-25-generic (from filename)
supermin: kernel: picked modules path /lib/modules/5.11.0-25-generic
supermin: kernel: picked vmlinuz /boot/vmlinuz-5.11.0-31-generic
supermin: kernel: kernel_version 5.11.0-31-generic
supermin: kernel: modpath /lib/modules/5.11.0-31-generic
cp: cannot open '/boot/vmlinuz-5.11.0-31-generic' for reading: Permission denied
supermin: cp -p '/boot/vmlinuz-5.11.0-31-generic' '/var/tmp/.guestfs-1000/appliance.d.ns30ol6c/kernel': command failed, see earlier errors
libguestfs: trace: launch = -1 (error)
virt-customize: error: libguestfs error: /usr/bin/supermin exited with
error status 1, see debug messages above
libguestfs: trace: close
libguestfs: closing guestfs handle 0x564adbba9da0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfs4DiW0D

@phughk
Copy link

phughk commented Aug 28, 2021

Same goes for 18

ubuntu@debussy:~$ wget http://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.img
--2021-08-28 21:38:41--  http://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.img
Resolving cloud-images.ubuntu.com (cloud-images.ubuntu.com)... 2001:67c:1562::28, 2001:67c:1562::25, 91.189.91.123, ...
Connecting to cloud-images.ubuntu.com (cloud-images.ubuntu.com)|2001:67c:1562::28|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 186777600 (178M)
Saving to: ‘ubuntu-18.04-minimal-cloudimg-amd64.img’

ubuntu-18.04-minimal-cloudimg-amd64.img                                  100%[=================================================================================================================================================================================>] 178.12M  35.7MB/s    in 5.6s

2021-08-28 21:38:47 (32.0 MB/s) - ‘ubuntu-18.04-minimal-cloudimg-amd64.img’ saved [186777600/186777600]

ubuntu@debussy:~$ virt-customize -v -x -a ubuntu-18.04-minimal-cloudimg-amd64.img --root-password password:mySimplePassword123
[   0.0] Examining the guest ...
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x5636c7f4cda0, program = virt-customize
libguestfs: trace: set_trace true
libguestfs: trace: set_trace = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_network true
libguestfs: trace: set_network = 0
libguestfs: trace: add_drive "ubuntu-18.04-minimal-cloudimg-amd64.img" "readonly:false" "protocol:file" "discard:besteffort"
libguestfs: trace: add_drive = 0
libguestfs: trace: launch
libguestfs: trace: max_disks
libguestfs: trace: max_disks = 255
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 44, release: 1, extra: , >
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
libguestfs: launch: program=virt-customize
libguestfs: launch: version=1.44.1
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/libguestfsO0pq4w
libguestfs: launch: umask=0002
libguestfs: launch: euid=1000
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
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.2.1
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: 279 packages, including dependencies
supermin: build: 10840 files
supermin: build: 5666 files, after matching excludefiles
supermin: build: 5675 files, after adding hostfiles
supermin: build: 5672 files, after removing unreadable files
supermin: build: 5678 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.11.0-31-generic = 5.11.0-31-generic (from filename)
supermin: kernel: picked modules path /lib/modules/5.11.0-31-generic
supermin: kernel: kernel version of /boot/vmlinuz-5.11.0-25-generic = 5.11.0-25-generic (from filename)
supermin: kernel: picked modules path /lib/modules/5.11.0-25-generic
supermin: kernel: picked vmlinuz /boot/vmlinuz-5.11.0-31-generic
supermin: kernel: kernel_version 5.11.0-31-generic
supermin: kernel: modpath /lib/modules/5.11.0-31-generic
cp: cannot open '/boot/vmlinuz-5.11.0-31-generic' for reading: Permission denied
supermin: cp -p '/boot/vmlinuz-5.11.0-31-generic' '/var/tmp/.guestfs-1000/appliance.d.frfuakr2/kernel': command failed, see earlier errors
libguestfs: trace: launch = -1 (error)
virt-customize: error: libguestfs error: /usr/bin/supermin exited with
error status 1, see debug messages above
libguestfs: trace: close
libguestfs: closing guestfs handle 0x5636c7f4cda0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsO0pq4w

Edit after installing libvirt-daemon-system

ubuntu@debussy:~$ libguestfs-test-tool
     ************************************************************
     *                    IMPORTANT NOTICE
     *
     * When reporting bugs, include the COMPLETE, UNEDITED
     * output below in your bug report.
     *
     ************************************************************
LIBVIRT_DEFAULT_URI=qemu:///system
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/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: 1280
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.44.1
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/libguestfsy8zAD6
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.2.1
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: 279 packages, including dependencies
supermin: build: 10840 files
supermin: build: 5666 files, after matching excludefiles
supermin: build: 5675 files, after adding hostfiles
supermin: build: 5672 files, after removing unreadable files
supermin: build: 5678 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.11.0-31-generic = 5.11.0-31-generic (from filename)
supermin: kernel: picked modules path /lib/modules/5.11.0-31-generic
supermin: kernel: kernel version of /boot/vmlinuz-5.11.0-25-generic = 5.11.0-25-generic (from filename)
supermin: kernel: picked modules path /lib/modules/5.11.0-25-generic
supermin: kernel: picked vmlinuz /boot/vmlinuz-5.11.0-31-generic
supermin: kernel: kernel_version 5.11.0-31-generic
supermin: kernel: modpath /lib/modules/5.11.0-31-generic
cp: cannot open '/boot/vmlinuz-5.11.0-31-generic' for reading: Permission denied
supermin: cp -p '/boot/vmlinuz-5.11.0-31-generic' '/var/tmp/.guestfs-1000/appliance.d.ymitqo6w/kernel': command failed, see earlier errors
libguestfs: error: /usr/bin/supermin exited with error status 1, see debug messages above
libguestfs: closing guestfs handle 0x55a78963a680 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsy8zAD6

@phughk
Copy link

phughk commented Aug 28, 2021

Ah ignore this issue - this has nothing at all to do with this repo or maintainer. Keeping the logs here in case someone else stumbles.

@phughk
Copy link

phughk commented Aug 28, 2021

Solved: turns out the /boot/ is not on the image, but native to the host. Baffled why that is required, but it is owned by root. Running the commands with sudo solves it

sudo virt-builder debian-10 --root-password password:mypass12
sudo virt-customize -v -x -a ubuntu-21.04-minimal-cloudimg-amd64.img --root-password password:mySimplePassword123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants