disk-image-create fails when building an image with 'block-device-efi'

Solution In Progress - Updated -

Issue

  • disk-image-create fails when building an image with block-device-efi:
# disk-image-create -a x86_64 -t raw vm rhel7 block-device-efi -p ntp --image-size 40 --min-tmpfs=7 --logfile disk-image.log -o rhel-guest-images-local.qcow2
[...]
2019-11-14 19:16:45.311 | INFO:root:Mapping for bootloader : grub-efi-x86_64
2019-11-14 19:16:45.312 | ERROR:root:bootloader has no valid mapping for package grub-efi-x86_64
2019-11-14 19:16:45.318 | bin/pkg-map error. 
2019-11-14 19:16:46.528 | INFO diskimage_builder.block_device.level3.mount [-] Called for [mount_mkfs_ESP]
2019-11-14 19:16:46.528 | INFO diskimage_builder.block_device.utils [-] Calling [sudo sync]
2019-11-14 19:16:47.600 | INFO diskimage_builder.block_device.utils [-] Calling [sudo umount /tmp/dib_build.47rtrn3x/mnt/boot/efi]
2019-11-14 19:16:47.662 | INFO diskimage_builder.block_device.level3.mount [-] Called for [mount_mkfs_root]
2019-11-14 19:16:47.662 | INFO diskimage_builder.block_device.utils [-] Calling [sudo sync]
2019-11-14 19:16:47.743 | INFO diskimage_builder.block_device.utils [-] Calling [sudo fstrim --verbose /tmp/dib_build.47rtrn3x/mnt/]
2019-11-14 19:16:47.836 | INFO diskimage_builder.block_device.utils [-] Calling [sudo umount /tmp/dib_build.47rtrn3x/mnt/]
2019-11-14 19:16:47.887 | Traceback (most recent call last):
2019-11-14 19:16:47.887 |   File "/bin/dib-block-device", line 10, in <module>
2019-11-14 19:16:47.887 |     sys.exit(main())
2019-11-14 19:16:47.887 |   File "/usr/lib/python2.7/site-packages/diskimage_builder/block_device/cmd.py", line 120, in main
2019-11-14 19:16:47.887 |     return bdc.main()
2019-11-14 19:16:47.887 |   File "/usr/lib/python2.7/site-packages/diskimage_builder/block_device/cmd.py", line 115, in main
2019-11-14 19:16:47.887 |     self.args.func()
2019-11-14 19:16:47.887 |   File "/usr/lib/python2.7/site-packages/diskimage_builder/block_device/cmd.py", line 39, in cmd_umount
2019-11-14 19:16:47.887 |     self.bd.cmd_umount()
2019-11-14 19:16:47.887 |   File "/usr/lib/python2.7/site-packages/diskimage_builder/block_device/blockdevice.py", line 441, in cmd_umount
2019-11-14 19:16:47.888 |     node.umount()
2019-11-14 19:16:47.888 |   File "/usr/lib/python2.7/site-packages/diskimage_builder/block_device/level3/mount.py", line 112, in umount
2019-11-14 19:16:47.888 |     exec_sudo(["umount", self.state['mount'][self.mount_point]['path']])
2019-11-14 19:16:47.888 |   File "/usr/lib/python2.7/site-packages/diskimage_builder/block_device/utils.py", line 143, in exec_sudo
2019-11-14 19:16:47.888 |     raise e
2019-11-14 19:16:47.888 | diskimage_builder.block_device.exception.BlockDeviceSetupException: exec_sudo failed

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In