Commit 3e6b60f
committed
guestfs: fix virt-resize failure for custom images
The virt-resize command was failing because it requires a pre-allocated
output file with the target size, not an empty temporary file.
Fix by:
1. Pre-allocating the temporary image file with qemu-img create before
running virt-resize
2. Adding -f raw flag to qemu-img resize to avoid format detection
warnings
This ensures the partition expansion works correctly when resizing
custom images like Debian 13 daily builds.
Error was:
virt-resize: error: /tmp/ansible.depq5vk0.raw: file is too small to
be a disk image (0 bytes)
Generated-by: Claude AI
Signed-off-by: Luis Chamberlain <[email protected]>1 parent b02a309 commit 3e6b60f
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
68 | 79 | | |
69 | 80 | | |
70 | 81 | | |
| |||
0 commit comments