VMware Cloud Community
Zoid
Contributor
Contributor

How to Format a VMDK (without running a virtual os) ?

Ok we can make offline via cli a vmdk disk, and do more besides.

But how to format the vmdk that has just been made offline. Without the need to boot into a virtual machine, to format the disk ?

Reply
0 Kudos
6 Replies
lamw
Community Manager
Community Manager

You might be able to use VMware VDDK since you're able to mount VMDK from a remote system and you maybe able to format it the contents of the VMDK ...

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
Zoid
Contributor
Contributor

VDDK v1.1 has mostly same tools as in vmware workstation (win32 xp). I have tried with the vddk tools and get exact same results.

I can easily make a new vmdk file with example as below. Although then cannot format or mount that file. Not able to mount the file or able to format it. I can load the same vmdk file into workstation. Formatting it in an virtual os, but i'm needing to do this without running a virtual os. I was expecting vdiskmanager or mount tool to have control for formatting and partioning etc, since it does the rest.

I agree if file was able tomount then in windows disk manager i could make it dynamic with single partition and fastformat it. Here's another thing incase my examples below are incorrect. If i do this in workstation extra disk for a virtual os. Then try to mount the vmdk, still will not mount using any method, even quitting vmware an using any other tool. Maybe i'm missing something, maybe vmware is missing the ability to pre format, partition etc before vmdk mount. Or mounting a vmdk that has not been partitioned or formatted etc.

Needed is to be able to format a vmdk file. Well partition and format (dynamic disk). Here the commands i'm using to make a vmdk file as an example. Incase something is missing, although they will partition and format in workstation as normal when load in the vmdk file.

vdiskmanager.exe -c -a IDE -s 10GB -t 0 "d:\Any Name.vmdk"

or without spacing works the same

vdiskmanager.exe -c -aIDE -s10GB -t0 "d:\Any Name.vmdk"

What's is meant by Offline is how to do what should be a simple task. Without having to run a virtual os just to format a new vmdk disk. Has vdiskmanager a hidden option to format and partition so the vmdk can be used as a disk ?

What other tools that i can use do this (away from running any virtual os) ?

(not using remote as yet, need to get the basics working before networking)

-


update

-


It's not dynamic disks i need to create it is Basic - Extended - Logical Disks that i need. And maybe an active bootable one from time to time.

Having spent the whole day, creating dynamic disks of correct size. Then in virtual os finding need to select use for v6.5 workstation. So silly requester stops popping up each time. I made them all dynamic and formatted them. Only to find it's basic disks i needed, so had to redo all.

Not much fun at all, add four disks to ide ad i don't want them to be scsi disks. Enter a virtual os, diskmanager convert to basic. Next to extended and logical with quick format without disk name for all disks. After which need to close down the virtual os. Removing those fresh formatted disks and repeating the process over and over. This is one reason alone, for the need to do this outside (away) from vm workstation.

Next will try the linked post suggestions, that vmroyale has posted below this post.

Reply
0 Kudos
vmroyale
Immortal
Immortal

Hello.

See if this discussion helps.

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
Reply
0 Kudos
Zoid
Contributor
Contributor

Of the suggestions so far none have worked and is still not possible. Anyone else have ideas for this to work.

VMWARE please fix the vdiskmanager.exe cli tool, so it can initilzation and format vmdk disks. Also making the disks that the vDiskManager.exe makes are compatible with windows xp. So they can be mounted and initalized and then formated. Also be able to be used away from vmware and in vmware as and when needed.

Reply
0 Kudos
Zoid
Contributor
Contributor

As VMWare is FLAWED i'm looking to VHD instead for this, or other such virual disk that can work on win32. From initail making of to writing to as a disk, without using some bloatware to do it. Sure vmware has its tools but these tools do not work for the users. Unless boot into a VMware os each time to do a simple didk initialization and format.

In order i will try this, vmware converter to see if it can convert a basic vmdk to a basic vmdk that can be initialized on xp. If not VHD and have converter to convert VHDisks to basic vmdk disks.

Does anyone else see a flaw in vmware design as i have pointed out here. Maybe its a license problem, maybe as it will use microsoft code. Though i doubt it as the whole vmware interface is using and operating on microsoft code and more.

Bottom line is vmware developers must know of this problem, know its flawed or would have the options in its cli tools now. Maybe the problem is so well know they hope someone will never make an issue of it, erm... Well there you have it, vmware is the best there is, and most likely will never be the best.

I write this because i'm likely not to return, even if have the answer. Possibly same path that others have trodden in the past. There's a problem try get around it. If not dump vmware forever and use something better that does work.

Then since vmware has not ackowledge this post either, i take it they know of it and would rather it go away. Well here you go it is, until someone else needs this option. If it is you and your reading this. Don't reply here and join onto this thread, start your own, more threads more pain for vmware so they might go fix it.

Reply
0 Kudos
continuum
Immortal
Immortal

do you know the difference between a disk and a partition ?

vmware-vdiskmanager creates blank disks - if you mount such a disk with mount-tools like vddk or vdk or whatever and format it you change the disk image into a partition image which has no MBR and can not be used by other VMs.

To do what you want you need tools like those created by jaclaz - i guess you have not read the post that vmroyale has linked to - otherwise you would have found it already.

>

Bottom line is vmware developers must know of this problem

Everybody who knows just a little bit about disks and MBRs and stuff like that is aware of this ...

___________________________________

VMX-parameters- VMware-liveCD - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos