VMware Communities
admin
Immortal
Immortal

vdiskmanager GUI

For users who don't want to mess with the command line, I wrote a quick-n-dirty GUI wrapper for vmware-vdiskmanager in the spirit of RDPetruska's VMware DiskManager GUI.

This program allows you to create a new virtual disk, expand an existing virtual disk, or defragment an existing virtual disk.

0 Kudos
94 Replies
modular747
Enthusiast
Enthusiast

This snapshot system which creates an active non-configureable child virtual disc seems to have significant limitations. It's suitable only if the snapshot is created to temporarily test a new configuration and then be incorporated or deleted, discarding the child vd. It also seems to make it impractical to have multiple snapshots with a snapshot manager as in Parallels.

0 Kudos
dcpc
Contributor
Contributor

Hi:

I am trying to expand my virtual hard disk using the GUI tool. I found vmdk files in this directory: /Users/david/Documents/Virtual Machines/Windows XP Home Edition.vmwarevm/

There are five files of this type. Four have names such as 'VMWare Windows-000001-s001.vmdk' and one is named 'VMWare Windows-000001.vmdk'. If I choose the latter file, the result is as follows:

>Using log file /var/tmp//vmware-david/vdiskmanager.log

>Failed to get geometry: The called function cannot be performed on partial chains. Please open the parent virtual disk (5).

If I choose any of the first four, the result is as follows:

>Using log file /var/tmp//vmware-david/vdiskmanager.log

>The file '/Users/david/Documents/Virtual Machines/Windows XP Home Edition.vmwarevm/VMWare Windows-000001-s002.vmdk' appears to be a sub-component of a virtual disk.

>Did you mean '/Users/david/Documents/Virtual Machines/Windows XP Home Edition.vmwarevm/VMWare Windows-000001.vmdk'?

>Failed to open disk '/Users/david/Documents/Virtual Machines/Windows XP Home Edition.vmwarevm/VMWare Windows-000001-s002.vmdk' : The file specified is not a virtual disk (16).

Could you please point me in the right direction here? How do I expand my disk? Thanks.

0 Kudos
modular747
Enthusiast
Enthusiast

You probably have an active snapshot of your VM. You can't expand a vhd if there's a snapshot - you have to revert to or discard it first.

0 Kudos
dcpc
Contributor
Contributor

Thanks. So, discarding the snapshot from within Fusion should allow me to expand the hard disk?

0 Kudos
modular747
Enthusiast
Enthusiast

Yes, as long as it was created as expandable and not fixed size to begin with.

0 Kudos
dcpc
Contributor
Contributor

Thank you. I discarded the snapshot and expanded the disk from 7.9 GB to 17 GB without problems. In settings, the new size is shown as 17 GB. I note that I now have 5 new 'vmdk' files within my 'VMWare Windows' folder. Trouble is when I run Windows it complains that my disk space is critically low. Disk Defragmenter shows that I have just 5 MB of free space and that capacity is 7.8 GB. Is there something extra that I should have done? I am still a bit puzzled here.

0 Kudos
admin
Immortal
Immortal

I discarded the snapshot and expanded the disk from 7.9 GB to 17 GB without problems.

Disk Defragmenter shows that I have just 5 MB of free space and that capacity is 7.8 GB. Is there something extra that I should have done?

Expanding a disk is a two-step process. You've made the virtual disk bigger, but the partition is still the old size. You also need to resize the partition, which can be done a variety of ways. I'd suggest the second part of Pat Lee's guide:

0 Kudos
dcpc
Contributor
Contributor

Thanks a lot. Completed without problems. My only comment here is that the procedure, with links to all necessary software, should be displayed with much more prominence on the VMware site. This is not an uncommon problem and it should not be necessary to look into forum postings for the solution. That said, the guide by Pat Lee is excellent and easy to follow.

0 Kudos
Sandy_Rosenberg
Contributor
Contributor

For the less than technical...

I need to expand my 20G virtual disk. Program is so good (Using Fusion 1.1) I added a bunch of windows games that now fill up 17G of the 20.

If I run this "program" I understand I can make my virtual disk 50G (or whatever)

So...

I run this in the host OS (mac)??

Any prep for the guest os??

Should virtual machine (win xp) be suspended? Off completely?? Does it matter??

Any other info needed??

Thanks.

0 Kudos
admin
Immortal
Immortal

If I run this "program" I understand I can make my virtual disk 50G (or whatever)

Right. Remember this program is the first of two steps, you'll also have to resize the partition as outlined in Pat's guide.

I run this in the host OS (mac)??

Yes.

Any prep for the guest os??

I doubt it will work if you have a snapshot (discard or revert as appropriate).

Should virtual machine (win xp) be suspended? Off completely?? Does it matter??

Off completely, and yes, it matters.

Any other info needed??

It's generally a bad idea to over-commit the host (e.g. if you have 10 GB free, don't make the new virtual disk size 100 GB) - even though you can do this with a sparse disk, you shouldn't. If you do, you will probably have problems later when you run out of space and can't shrink the disk (because shrinking requires free space).

0 Kudos
blanger
Contributor
Contributor

I have an existing VM that is about 43GB in size, and was saved with 2GB disk chunks.

When I brought this image onto my MAC and tried to open it with Fusion, I kept getting an error:

Jan 18 09:20:37.191: vmfusion| DISKLIB-LIB : Failed to open '/Users/artesia/Documents/Virtual Machines/SalesDemo with Media Portal 092607/Windows Server 2003 Standard Edition.vmdk' with flags 0x17 (Reached the host's limit for open files).

I tried to consolidate the chunks into a single image, but also got an error from vdiskmanager:

Using log file /var/tmp//vmware-artesia/vdiskmanager.log

Failed to open the disk '/Users/artesia/Documents/Virtual Machines/SalesDemo with Media Portal 092607/Windows Server 2003 Standard Edition.vmdk' : Reached the host's limit for open files (42).

Failed to open disk '/Users/artesia/Documents/Virtual Machines/SalesDemo with Media Portal 092607/Windows Server 2003 Standard Edition.vmdk' : Reached the host's limit for open files (42).

How can I try to make this work?

thanks

0 Kudos
admin
Immortal
Immortal

A 43GB VM should only have 22 chunks, so I don't think it's vmware-vdiskmanager that's using them all up - it could be some other process. You could try quitting other programs, or in the worst case, restart OS X.

0 Kudos
blanger
Contributor
Contributor

That's what I thought too - but after I looked at the files in the VM directory (file list attached to my original post) - I found that there were only about 20 2GB files, and about 230 smaller files, each 320k in size. I'm not sure if the original Workstation that created this VM messed up as I didnt create it.

The second workaround given to me by Fusion support was to lift the maximum limit of files that can be open simultaneously.

To do that:

1) In the /etc hidden folder, create a text file called launchd.conf

2) In the file, put a line:

limit maxfiles 2048 4096

3) Reboot.

This worked for me.

0 Kudos
admin
Immortal
Immortal

Ah, so it was 43 GB on-disk, not 43 GB max. Then what support suggested is indeed the necessary solution.

0 Kudos
John_Christoph1
Contributor
Contributor

Dear ETung,

I'm having trouble resizing my virtual disk. I'm kind of new to all this so I apologize in advance for my ignorance.

I believe that my virtual disk is in my Documents folder (see attached file). There are two possible options when I go to this folder. The first log entry shows what happens when I try what looks like the main disk:

I'm trying to expand my Using log file /var/folders/v3/v3KPrLbQFoCUJzAFLfjHZ++++TI/-Tmp-//vmware-JCC/vdiskmanager.log

This disk is part of a snapshot chain in '/Users/JCC/Documents/Virtual Machines.localized/Windows Vista x64 Edition.vmwarevm/Windows Vista x64 Edition.vmx'.

The selected operation can only be executed on a disk with no snapshots.

Then I tried the disk that has the same name followed by five 0's and a 1 and got this message:

Using log file /var/folders/v3/v3KPrLbQFoCUJzAFLfjHZ++++TI/-Tmp-//vmware-JCC/vdiskmanager.log

Failed to get geometry: The called function cannot be performed on partial chains. Please open the parent virtual disk (5).

0 Kudos
WoodyZ
Immortal
Immortal

I'm having trouble resizing my virtual disk. I'm kind of new to all this so I apologize in advance for my ignorance.

The selected operation can only be executed on a disk with no snapshots.

If the Virtual Machine's Virtual Hard Drive has a Snapshot in place then you have to first use the VMware Fusion menu bar > Virtual Machine > Discard Snapshot command before trying to resize the Virtual Hard Drive.

NOTE: Do not use the Discard Snapshot command unless you fully understand that in doing so any an all changes that you've made since taking the Snapshot will be written into the original Virtual Hard Drive. If you do not want the changes that have been made then use the Revert to Snapshot command first and the the Discard Snapshot command.

NOTE: Using the Revert to Snapshot command DELETES any an all changes including Data that you may not have backed up off system since the Snapshot was take and if you're not backed up there is no easy way to recover once you've clicked the Revert to Snapshot command! You have been warned!

0 Kudos
John_Christoph1
Contributor
Contributor

Thanks! That got me started. However, when I was 20% into it vDiskmanager crashed.

When I tried to run it again this is the logged response

Using log file /var/folders/v3/v3KPrLbQFoCUJzAFLfjHZ++++TI/-Tmp-//vmware-JCC/vdiskmanager.log

Failed to expand the disk '/Users/JCC/Documents/Virtual Machines.localized/Windows Vista x64 Edition.vmwarevm/Windows Vista x64 Edition.vmdk': The file already exists (41).

Any thoughts?

Thanks,

John

0 Kudos
WoodyZ
Immortal
Immortal

Copy and Paste the following command line in a Terminal window (/Applications/Utilities/Terminal) then press Enter.

ls -lt "/Users/JCC/Documents/Virtual Machines.localized/Windows Vista x64 Edition.vmwarevm" > ~/Desktop/dirlist.txt

The above command will create a file named dirlist.txt on your Desktop. Attach the dirlist.txt file to a reply post.

0 Kudos
John_Christoph1
Contributor
Contributor

Thanks for helping WoodyZ

0 Kudos
WoodyZ
Immortal
Immortal

From the output of the ls command it looks like the target Virtual Machine is not closed and was suspended and not shutdown from within the OS.

The Virtual Machine needs to be properly shutdown from within the Guest OS and not suspended and the Virtual Machine window should be closed and although absolutely not necessary non-the-less the Fusion application should also be closed whenever your going to manipulate the files comprising a Virtual Machine. That said I would do the following in an attempt to accomplish what your doing.

I always, without fail, backup the Virtual Machine Bundle Package before I preform a operation that is going to modify the virtual disk in a case such as this as well as other processes I might invoke so if you didn't backup the Virtual Machine Bundle Package first then you may want to do that now just in case (and it may already be to late).

Next I'd close vdiskmanager GUI and then delete the "Windows Vista x64 Edition.vmdk.dfgshkgrw-tmp" file from the target Virtual Machine Bundle Package.

Then I would start the Virtual Machine and boot to the OSes Desktop and then using the controls from within the OS itself properly shutdown, not suspend, the OS and then close Fusion.

Now I would try to expand the virtual hard drive again.

0 Kudos