[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
howtos:general_admin:resize_a_qemu_raw_image_with_an_ntfs_filesytem [2013/12/15 00:59 (UTC)] – created allend | howtos:general_admin:resize_a_qemu_raw_image_with_an_ntfs_filesytem [2013/12/15 05:18 (UTC)] – [Update the partition table] allend | ||
---|---|---|---|
Line 8: | Line 8: | ||
===== Use qemu-img to resize the QEMU raw disk image ===== | ===== Use qemu-img to resize the QEMU raw disk image ===== | ||
- | This command increases the size of the disk image in the file Windows_XP_Professional_SP_3.img by 1GB | + | This command increases the size of the disk image in the file Windows_XP_Professional_SP_3.img by 1GB. |
< | < | ||
- | After this command, if you boot your virtual machine, you will see that there is an additional | + | After this command, if you boot your virtual machine, you will see that there is an additional 1GB of free disk space available. |
===== Find the offset into the image ===== | ===== Find the offset into the image ===== | ||
Line 20: | Line 20: | ||
< | < | ||
- | Inspect the partition table (here parted is used but fdisk or cfdisk can also be used) | + | Inspect the partition table (here parted is used but fdisk or cfdisk can also be used). |
< | < | ||
- | Within parted set the units to sectors and print the current partition table | + | Within parted set the units to sectors and print the current partition table. |
< | < | ||
(parted) print </ | (parted) print </ | ||
- | The output will look something like this | + | The output will look something like this: |
< | < | ||
Disk /dev/loop0: 12582912s | Disk /dev/loop0: 12582912s | ||
Line 40: | Line 40: | ||
</ | </ | ||
- | Note the Sector size and Start sector numbers. | + | Note the Sector size and Start sector numbers |
- | Now quit parted | + | Now quit parted. |
< | < | ||
- | Delete the loop device | + | Delete the loop device. |
< | < | ||
Line 56: | Line 56: | ||
< | < | ||
- | First do a dry run | + | First do a dry run. |
< | < | ||
- | If all is OK, do it for real | + | If all is OK, do it for real. |
< | < | ||
- | Delete the loop device | + | Delete the loop device. |
< | < | ||
Line 70: | Line 70: | ||
===== Update the partition table ===== | ===== Update the partition table ===== | ||
- | Loop mount the image | + | Loop mount the image. |
< | < | ||
- | Update the partition table using parted (both fdisk and cfdisk appear to fail here) | + | Update the partition table using parted (both fdisk and cfdisk appear to fail here). |
< | < | ||
Line 97: | Line 97: | ||
< | < | ||
- | Delete the loop device | + | Delete the loop device. |
< | < |