Space for large files



A while ago I blogged about successfully expanding my Windows-in-a-box drive, like this:

cd ~/.local/share/libvirt/images
mv Win7.qcow2 Win7.backup
qemu-img create -f qcow2 Win7.qcow2 100G
virt-df -h ./Win7.backup
virt-resize ./Win7.backup ./Win7.qcow2 --expand /dev/sda2


Recently I've needed to do it again to accommodate more and bigger files. I've attempted it three times, but each time the last command failed like this:

Summary of changes:
/dev/sda1: This partition will be left alone.
/dev/sda2: This partition will be resized from 99.9G to 199.9G.  The
filesystem ntfs on /dev/sda2 will be expanded using the ‘ntfsresize’
method.
**********
[ 364.1] Setting up initial partition table on ./Win7.qcow2
[ 367.7] Copying /dev/sda1
 100%  --:--
[ 375.7] Copying /dev/sda2
◐ 82% 12:20
virt-resize: error: libguestfs error: appliance closed the connection
unexpectedly.
This usually means the libguestfs appliance crashed.


A Windows-expert friend of mine said Oh yeah, just start up the vm and run (some Windows command) and it will expand to fit the space. I launched the vm and Windows only knew about the original size, and there were issues like Explorer taking ages to open and Chrome not finding its cache. I couldn't find such a command on the internet.

Is there a different way to go about this?

Mike



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]