LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 02-06-2013, 01:49 PM   #1
Vanyel
Member
 
Registered: Jul 2007
Location: NY, NY
Distribution: RHEL, CentOS, MacOS X
Posts: 158

Rep: Reputation: 29
Cannot resize VirtualBox .vdi file when created from physical disk


I am creating a disk for a Windows 7 VM on a Linux (CentOS 6.3) host.

If I create a .vdi file in VirtualBox (Linux version 4.2.6) and attach it to my Windows 7 VM, I can format it as NTFS, mount, and use the disk fine.
Then I can shut down the vm and use
Quote:
VBoxManage modifyhd <diskname>.vdi --resize <new size in mb>
and when booted, see a second. larger disk in Windows 7 that I have to extend the NTFS partion to cover so the extra space is used. That's norrmal.

HOWEVER, if I create my .vdi file from an existing NTFS hard disk using the
Quote:
dd if=$WinDevice | VBoxManage convertfromraw stdin $Bytes windows.vdi
technique mentioned in the comments here http://superuser.com/questions/25066...ical-partition (as well as a couple of other places I found), the resulting .vdi disk can be used, but NOT successfully resized! (Note, the author mentions being usure if you should suck up the disk i.e. /dev/sda, or your desired source partiion, i.e. /dev/sda1 . I tried it both ways).

I get varying results.

After resizing, booting the VM in gparted, it always sees the second disk as one, larger NTFS volume that it cannot work with. Windows sometimes sees the original, smaller disk in Explorer, while seeing a larger NTFS volume in Disk Management, the size of which cannot be changed, larger or smaller. So at best I lose the extra space.

If I resize the .vdi really large (I tried 1.9TB), Windows 7 doesn't see any disk in Explorer at all, and Disk Management sees multiple, unusable partitions. Again, gparted just sees one larger NTFS partition that it cannot work with.

What I need to do is convert a 1TB physical disk with over 600gb of small data files and folders into a .vdi file, then resize that to 1.9TB (we forsee filling up 1TB all too soon), then convert that into a Split2G .vmdk file (since you can't resize a .vmdk format file directly) for easier backup of the Windows disk from the Linux host.

Copying the data any standard way takes so incredibly long that making a same size .vdi first, then copying the data inside the VM to a second, exisiting, larger .vmdk is highly impractical. That's why I need to get resizing of the converted .vdi working, but I can't see how.

Any ideas for how to get resizing a .vdi made from a physical disk to work?
 
Old 02-16-2013, 10:53 PM   #2
Vanyel
Member
 
Registered: Jul 2007
Location: NY, NY
Distribution: RHEL, CentOS, MacOS X
Posts: 158

Original Poster
Rep: Reputation: 29
Point became moot.

Looks like nobody had any solutions. I never found an answer either, but the need to resize went away and just converting straight from physical disk to Split2G .vmdk file was good enough.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Install GRUB2 to a virtualbox vdi image kara85 Linux - Newbie 3 07-19-2012 04:17 AM
Is there a way to increase the VDI size in VirtualBox on Fedora 9? Mr. Rey Linux - Software 10 05-24-2010 08:05 AM
VirtualBox virtual disk image backup? .vdi .sav brianpbarnes Linux - Software 3 07-17-2009 02:12 PM
copy hard disk from xp to vdi file for virtualbox[zenwalk] deathalele Linux - Software 3 06-23-2009 06:26 PM
Migrating a VirtualBox .vdi Image to CoLinux MetalSubstance Linux - Software 2 02-25-2008 07:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 09:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration