[Solved] How to make a virtual disk bigger?
For some reason when I boot in to the new disk I get "A disk read error occured Press Ctrl+Alt+Del to restart". In gparted the new disk looks identical to the original (except its size), I even tried formatting as ntfs before doing the copy (prob. not needed but...) and I made sure to set the flag to boot.
Any ideas?
If I boot using the original disk and have the new disk as the secondary drive i can see it has copied okay, all the files are there and it is readable...
Any ideas?
If I boot using the original disk and have the new disk as the secondary drive i can see it has copied okay, all the files are there and it is readable...
So it's definitely an issue with the disk and not the windows copy.
I guess in your shoes my next step would be trying installing a fresh copy of windows / linux on the disk you've created to make sure the disk created ok.
If that works you know the problem is during the partition copy. I'd then re-copy the partition over but without resizing and try then, you can then resize it later.
If none of that works, try a new disk either using virtual disk manager or vditool.
I guess in your shoes my next step would be trying installing a fresh copy of windows / linux on the disk you've created to make sure the disk created ok.
If that works you know the problem is during the partition copy. I'd then re-copy the partition over but without resizing and try then, you can then resize it later.
If none of that works, try a new disk either using virtual disk manager or vditool.
--
Gushy
Gushy
Hi,
it coulkd be linked to the disk MBR ("fdisk /mbr" with a win98 system disk for example, it may be have others way to do so). As I guess by reading your posts, copy have been done at a filesystem point of view (copy files one by one from A to B), so disk structure has not been copied too.
Regards.
it coulkd be linked to the disk MBR ("fdisk /mbr" with a win98 system disk for example, it may be have others way to do so). As I guess by reading your posts, copy have been done at a filesystem point of view (copy files one by one from A to B), so disk structure has not been copied too.
Regards.
Okay so I did I a fresh install of Windows on the new (big) partition and this worked fine. Secondly as suggested I tried to copy my orignal (small) copy of Windows over the new installed one... The first time I tried the VM aborted! I tried again and it copied, but on reboot to the big drive I got the exact same error: "A disk read error occured". Not sure what to make of it... At least I kept a backup of the big VDI with a fresh Windows. I'll just have to re-install the programs I need on that and ditch the original Windows!
I'm having the exact same problem when I try to copy to a larger .vdi. Does anyone have any idea why that might be happening?chamstar wrote:For some reason when I boot in to the new disk I get "A disk read error occured Press Ctrl+Alt+Del to restart". In gparted the new disk looks identical to the original (except its size), I even tried formatting as ntfs before doing the copy (prob. not needed but...) and I made sure to set the flag to boot.
Any ideas?
If I boot using the original disk and have the new disk as the secondary drive i can see it has copied okay, all the files are there and it is readable...
Woo hoo! Actually I just did get it to work. Problem seems to be that I was trying to increase the disk size too much. I tried increasing a 2GB first to 10GB and then to 5GB, but it kept getting the disk read error. Finally I tried 3GB, and that seemed to work.darose wrote:I'm having the exact same problem when I try to copy to a larger .vdi. Does anyone have any idea why that might be happening?chamstar wrote:For some reason when I boot in to the new disk I get "A disk read error occured Press Ctrl+Alt+Del to restart". In gparted the new disk looks identical to the original (except its size), I even tried formatting as ntfs before doing the copy (prob. not needed but...) and I made sure to set the flag to boot.
Any ideas?
If I boot using the original disk and have the new disk as the secondary drive i can see it has copied okay, all the files are there and it is readable...
Hope this helps someone.
I don't read the whole thread but if you only want to make a virtual disk bigger I have made some suggestions here:
http://forums.virtualbox.org/viewtopic.php?t=1966
http://forums.virtualbox.org/viewtopic.php?t=1966
here is another working way to copy your VM to any arbitrary size:
1. create a new empty disk of the desired size, attach it as secondary drive to your VM
2. download HDClone (freeware 4mb), mount the ISO as cd-rom and boot up
3. follow the steps on screen to clone your original drive to the new one
4. when finished, shutdown the VM, mount the rescueCD (or any disk with gparted) mentioned earlier in this topic
5. in gparted, resize the partition to the full harddisk size
6. shutdown again, unmount cd-rom, boot into windows
that's it.
in case you run into boot problems after completing the steps above, start windows in safe mode and let windows detect the new drive. your installation should run fine after that.
1. create a new empty disk of the desired size, attach it as secondary drive to your VM
2. download HDClone (freeware 4mb), mount the ISO as cd-rom and boot up
3. follow the steps on screen to clone your original drive to the new one
4. when finished, shutdown the VM, mount the rescueCD (or any disk with gparted) mentioned earlier in this topic
5. in gparted, resize the partition to the full harddisk size
6. shutdown again, unmount cd-rom, boot into windows
that's it.
in case you run into boot problems after completing the steps above, start windows in safe mode and let windows detect the new drive. your installation should run fine after that.
Can you simply delete the old virtual drive when finished? Is there an easy way to do that (or just navigate to the directory?gushy wrote:JusTiCe8 is right, I've just done this by creating a bigger disk and then copying the contents.I don't think I've missed any steps out....
- Create a new disk using Virtual Disk Manager (in VirtualBox goto File -> Virtual Disk Manager)
- download System Rescue CD
- set your current VM to have the new disk image as it's second hard disk and the System Rescue CD iso file as it's CD
- boot the vm from the CD
- at the command prompt type startx
- when X Windows starts, type gparted in the terminal that is open on screen
- in gparted select the windows partition and choose copy
- select the second hard disk
- right click on the representation of the disk and click paste
- gparted will prompt you for the size of the disk, drag the slider to the max size
- click apply
- wait .......
- when it's done right click on the disk and choose Manage Flags, and select Boot
- exit gparted and power off the VM
- change the VM settings to only have one disk (the new bigger disk) and deselect the iso as the CD.
- boot the VM into your windows install on it's new bigger disk!
Thanks for the step by step instructions, that looks pretty good. I have to say with something like Virtual box running XP (for MS exchange + outlook), I might dump Windows completely (as a primary OS).
-
- Posts: 1
- Joined: 14. Nov 2007, 14:14
How to make a virtual disk bigger/smaller
Nice thread!
Today I realized I need to make my VDI smaller. The procedure follows:
1. Make new VDI
2. Attach it as primary slave HDD
3. Boot the virtual machine
4. Create and format the new HDD using windows "Disk management"
NOTE: Do NOT assign drive letter to the new drive!!!
5. Shut-down the virtual machine
6. Mount Slax live CD ISO-image.
NOTE: I suppose any kind of live-CD will be ok. I used Slax because I have it.
7. Boot from that CD-image
8. Copy all files from existing windows VDI to the empty VDI (/mnt/hda1 to /mnt/hdb1 in my case)
9. Shut-down the virtual machine
10. Unmount the live CD image
11. Set the new VDI as primary master HDD
12. Boot and enjoy :)
------
P.S.
(a) The only disadvantage I saw was that all the copied files were with cleared "hidden" attributes and all "desktop.ini"-s appeared to be visible everywhere. Personally, this doesn't bother me much, but probably using one of Windows-Rescueing-Live-CDs will copy the files better than a regular Linux distribution.
(b) If you boot but Windows doesn't show you your user to logon => most likely you've assigned a drive letter to the new partition after formatting it (read 4. again). In such a case - run your VM with the original VDI as primary and the new VDI as slave, remove that drive letter and copy the files again (I have no idea where exactly Windows keeps assigned letters).
EDIT:
Sorry, forgot to mention that I made the new partition bootable. In the slax shell:
1. cfdisk /dev/hdb
2. mark the "Bootable", then "Write", then "Quit"
Today I realized I need to make my VDI smaller. The procedure follows:
1. Make new VDI
2. Attach it as primary slave HDD
3. Boot the virtual machine
4. Create and format the new HDD using windows "Disk management"
NOTE: Do NOT assign drive letter to the new drive!!!
5. Shut-down the virtual machine
6. Mount Slax live CD ISO-image.
NOTE: I suppose any kind of live-CD will be ok. I used Slax because I have it.
7. Boot from that CD-image
8. Copy all files from existing windows VDI to the empty VDI (/mnt/hda1 to /mnt/hdb1 in my case)
9. Shut-down the virtual machine
10. Unmount the live CD image
11. Set the new VDI as primary master HDD
12. Boot and enjoy :)
------
P.S.
(a) The only disadvantage I saw was that all the copied files were with cleared "hidden" attributes and all "desktop.ini"-s appeared to be visible everywhere. Personally, this doesn't bother me much, but probably using one of Windows-Rescueing-Live-CDs will copy the files better than a regular Linux distribution.
(b) If you boot but Windows doesn't show you your user to logon => most likely you've assigned a drive letter to the new partition after formatting it (read 4. again). In such a case - run your VM with the original VDI as primary and the new VDI as slave, remove that drive letter and copy the files again (I have no idea where exactly Windows keeps assigned letters).
EDIT:
Sorry, forgot to mention that I made the new partition bootable. In the slax shell:
1. cfdisk /dev/hdb
2. mark the "Bootable", then "Write", then "Quit"
Re: How to make a virtual disk bigger/smaller
There is an easier way to only make it smaler:spirospirov wrote:Today I realized I need to make my VDI smaller.
http://forums.virtualbox.org/viewtopic.php?t=2507
Might be easier to use gparted-live cd. It is a bit more automated with "booting." Nice job though!gushy wrote:JusTiCe8 is right, I've just done this by creating a bigger disk and then copying the contents.I don't think I've missed any steps out....
- Create a new disk using Virtual Disk Manager (in VirtualBox goto File -> Virtual Disk Manager)
- download System Rescue CD
- set your current VM to have the new disk image as it's second hard disk and the System Rescue CD iso file as it's CD
- boot the vm from the CD
- at the command prompt type startx
- when X Windows starts, type gparted in the terminal that is open on screen
- in gparted select the windows partition and choose copy
- select the second hard disk
- right click on the representation of the disk and click paste
- gparted will prompt you for the size of the disk, drag the slider to the max size
- click apply
- wait .......
- when it's done right click on the disk and choose Manage Flags, and select Boot
- exit gparted and power off the VM
- change the VM settings to only have one disk (the new bigger disk) and deselect the iso as the CD.
- boot the VM into your windows install on it's new bigger disk!