- add DAG repo
- yum install libguestfs-tools
- virt-filesystems –long –parts –blkdevs -h -a w2k8.img (the Windows C: is usually /dev/sda2)
- dd if=/dev/zero of=w2k8new.img seek=20000 bs=1M count=1
- virt-resize –expand /dev/sda2 w2k8.img w2k8new.img
You should see a progress bar and message like
Summary of changes:
/dev/sda1: This partition will be left alone.
/dev/sda2: This partition will be resized from 9.7G to 19.4G. The filesystem ntfs on /dev/sda2 will be expanded using the ‘ntfsresize’ method.
- virsh edit w2k8, wait for chkdsk to finish in the guest before deleting the original disk image