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 fails on virt-builder delete /boot/efi #10

Open
stephen322 opened this issue Nov 29, 2021 · 0 comments
Open

virt-bootstrap fails on virt-builder delete /boot/efi #10

stephen322 opened this issue Nov 29, 2021 · 0 comments

Comments

@stephen322
Copy link

After getting around issue #9 by adding read permissions for the kernel, it still fails on Ubuntu 20.04:

$ virt-bootstrap -d virt-builder://ubuntu-20.04 /somedest/
WARNING : All extracted files will be owned by the current unprivileged user.
INFO : Building image
[ 2.9] Downloading: http://builder.libguestfs.org/ubuntu-20.04.xz
[ 3.8] Planning how to build this image
[ 3.8] Uncompressing
[ 7.1] Opening the new disk
[ 9.6] Setting a random seed
virt-builder: warning: random seed could not be set for this type of guest
[ 9.7] Deleting: /dev/*
[ 9.7] Deleting: /boot/*
virt-builder: error: libguestfs error: rm_rf: /boot/efi: rm: cannot remove
'/sysroot/boot/efi': Device or resource busy

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__wv95dio', '--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 631, in exit
self.close()
File "/usr/lib/python3.8/tempfile.py", line 638, in close
self._closer.close()
File "/usr/lib/python3.8/tempfile.py", line 575, in close
unlink(self.name)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/bootstrap__wv95dio'

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

1 participant