April 2, 201412 yr Hello, I thought I would ask here before I mess things up! I have a Windows 7 Vm all setup (using SchoolBusDriver's guide) and running fine in unRAID 6b4. I want to increase the disk size (currently 30G). Could I safely use the instructions here: http://amandine.aupetit.info/187/add-disk-space-to-a-img-disk-image-for-use-with-xen-for-example/ If not, is there an easier/better way to do this?
April 2, 201412 yr not sure...if you read through the comments though, this may be your answer: Amandine Says... Hi Rui, Do you use ext2/ext3/ext4 on your image disk? because resize2fs works only with those. Do you have LVM on this image disk? If yes you have to resize the volume group and logical volume before resizing the actuel filesystem. Did you cleanly stop your domU in the beginning? You can use e2fsck to try to make it clean. Hope you backuped your img file in the beginning! Windows uses NTFS typically, so that might be a problem...
April 2, 201412 yr Out of curiosity though, I am going to try a few things with my test Windows VM. I will post feedback shortly...
April 2, 201412 yr would you not use the windows disk/partition tools to expand the ntfs partition in the vm after the vm container is enlarged? Myk
April 2, 201412 yr I attempted this command: dd if=/dev/zero of=disk.img bs=1c seek=10G count=0 The .img of course changed to point to my windows 7 VM that I spun down. After running this command and attempting to restart the image, I get a Windows boot error. Probably just did something wrong. No worries, it was a throwaway VM I can recreate on the fly. Definitely want to solve this conundrum. Alternatively, what if you created a new .img file using the trunc command and modified your xen .cfg file to mount another .img as "d:" and then use Window Disk Manager to join the volumes together? That's my next thought / thing I will attempt.
April 3, 201412 yr Author Thanks eshelon for your efforts. What do you think about this command to increase the disk size by 10G and then using Windows disk management to re-size the partition? truncate -s + 10G Windows.img http://linux.die.net/man/1/truncate
April 3, 201412 yr Thanks eshelon for your efforts. What do you think about this command to increase the disk size by 10G and then using Windows disk management to re-size the partition? truncate -s + 10G Windows.img http://linux.die.net/man/1/truncate No problem. Wish I could have messed around with this more today. If you can give me until tomorrow night, i can test that for you, but that would be my next attempt as well, yes. If that works, that's probably the easiest way to accomplish what you're looking to do...
April 3, 201412 yr I have increased the size of my Windows VM disk successfully, used this procedure: Shutdown the VM truncate -s40G /mnt/disk1/VM/winxp.img where -s40G is the new total size for the disk Then in Windows just use the disk manager to increase the disk size using the new free space
April 3, 201412 yr I have increased the size of my Windows VM disk successfully, used this procedure: Shutdown the VM truncate -s40G /mnt/disk1/VM/winxp.img where -s40G is the new total size for the disk Then in Windows just use the disk manager to increase the disk size using the new free space Verified, this works. -Marcus
Archived
This topic is now archived and is closed to further replies.