0% found this document useful (0 votes)
2K views7 pages

VMKFSTOOLS Examples - Working With Virtual Disks

VMKFSTOOLS is a vSphere CLI tool for managing VMFS volumes and virtual disks. It allows creating, modifying, cloning, inflating, extending, renaming, and deleting virtual disks. The document demonstrates using VMKFSTOOLS to create thick and thin virtual disks, extend an existing disk, clone a disk changing its format, and delete a disk. VMKFSTOOLS provides advantages over other tools by handling both the disk descriptor and file.

Uploaded by

zanyah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views7 pages

VMKFSTOOLS Examples - Working With Virtual Disks

VMKFSTOOLS is a vSphere CLI tool for managing VMFS volumes and virtual disks. It allows creating, modifying, cloning, inflating, extending, renaming, and deleting virtual disks. The document demonstrates using VMKFSTOOLS to create thick and thin virtual disks, extend an existing disk, clone a disk changing its format, and delete a disk. VMKFSTOOLS provides advantages over other tools by handling both the disk descriptor and file.

Uploaded by

zanyah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

5/31/2017 VMKFSTOOLSExamplesWorkingWithVirtualDisks

Home
Citrix
Networks
VMware
Windows

buildVirtual

VMKFSTOOLSExamplesWorkingWithVirtual
Disks
byadmin

VMFSTOOLSissomethingIperhapsdontuseasregularlyasIdlikeandasaresultfindmyselfhavingto
refertothedocumentationprettymuchanytimeIdoanythingwithit.WiththatinmindIthoughtIddocument
someexamplesofwhatvmkfstoolscandohere,soIllhavesomethingtoreferbackto.

Simplyput,vmkfstoolsisavSphereclitoolformanagingVMFSvolumes.Itwillallowyoutoperform
operationsagainstboththefilesystemandthevirtualdiskfiles.HereIllbeconcentratingonlookingatwhat
wecandowithvirtualdisks.

VMKFSTOOLSVirtualDiskOptions
Runningvmkfstoolsattheclipromptwilldisplaytheoptionsavailabletous:

http://buildvirtual.net/vmkfstoolsexamplesworkingwithvirtualdisks/ 1/7
5/31/2017 VMKFSTOOLSExamplesWorkingWithVirtualDisks

CreateaVirtualDiskwithvmkfstools
Tocreateavirtualdiskwecanrunvmkfstoolsc2048mtestdisk1.vmdk

Asaresult,weendupwith2filesthevirtualdiskdescriptorfile,andthevirtualdiskitself:

BydefaultthiswillcreateathickdiskusingaBusLogicvirtualadapter.Tocreateathinprovisionedvirtualdisk
weneedtousethediskformatoption,vmkfstoolsc5Gdiskformatthintestdisk2.vmdk.

Runninglslacanbemisleadingasitreportsthenewdiskssizeasbeingitsmaximumpossiblesize,inthiscase
5GB:

Butwecanconfirmthefilesactualsizeondisk,andthereforeconfirmthatitisthinprovisionedbyrunningdu
ah.

http://buildvirtual.net/vmkfstoolsexamplesworkingwithvirtualdisks/ 2/7
5/31/2017 VMKFSTOOLSExamplesWorkingWithVirtualDisks

Thisshowsthefilesizetobezero,whichiswhatwewereexpectingfroman,asyetunused,thinprovisioned
disk.

Toconvert,orinflate,thevirtualdiskfilesothatitischangedtotheeagerzeroedthickformatwecanusethe
inflatediskoption.Thisactionpreservesanyexistingdataonthevirtualdisk.Dependingonthesizeofthedisk,
thismaytakesometime.

Oncecomplete,runningduahnowshowsthefiletobeusingthe5GBthatwasoriginallyconfiguredasits
maximumsize:

ExtendingaVirtualDiskwithvmkfstools
Ifthe5GBwespecifiedisntenough,wecanincreasethesizeofthevirtualdiskbyrunningvmkfstoolsX6GB
test.vmdk.Wecanconfirmthechangebyagainrunningduah.

CloneaVirtualDiskwithvmkfstools

Wecanalsousevmdkfstoolstocloneavirtualdisk.Thisisusefulifwejustneedacopy,orinthiscaseifwe
wishtoconvertthediskbacktobeingthinprovisioned.Wecandothisbyrunningvmkfstoolsitest2.vmdk
test2clone.vmdkdthin

Thethinprovisionedcloneofthediskrevertsto5GBasthisisthesizewehadpreviouslysettobeingeager
zeroed:

DeleteaVirtualDiskusingvmkfstools

http://buildvirtual.net/vmkfstoolsexamplesworkingwithvirtualdisks/ 3/7
5/31/2017 VMKFSTOOLSExamplesWorkingWithVirtualDisks

Nowwehavethethinprovisionedclone,wemaywanttodeletetheoriginalvirtualdisk.Thisisdoneby
runningvmkfstoolsUtest2.vmdk.

Whendeletingvirtualdisksfromthecliitisrecommendedtousevmkfstoolsratherthanthelinuxrmcommand
purelybecausevmkfstoolsdeletesboththevirtualdiskfileanditsdescriptor,withoutyouhavingtolistboth
filesinyourrmcommand.

RenamingaVirtualDiskusingvmkfstools
Finally,andtocompletethispost,Iwillrenametheclonedvmdkfilesothatitreflectstheoriginalname.Weuse
vmkfstoolsEtodothis:

Again,likewithdeletingvmdkfiles,whenrenamingitisbettertousevmkfstoolsratherthanthemvcommand,
asthisrenamesbothoftherelevant.vmdkfiles.

Theresquiteabitmoretothistoolthanwhatscoveredhere,includingworkingwithRDMsandtheVMFS
filesystemitself,whichIllbeputtinginafuturepost.

Follow@buildvirtual
KeepuptodatewithnewpostsonBuildvirtual.netFollowusonTwitter:
BeSociable,Share!

Tweet 0 Share
StumbleUpon

RelatedPosts:
1.ReclaimUsedSpacewithVMKFSTOOLSPunchzero
2.UnderstandingtheInteractionsBetweenVirtualStorageProvisioningandPhysicalStorage
Provisioning
3.ProvisionandManageStorageResourcesAccordingtoVirtualMachineRequirements
4.vmwarecmdExamplesWorkingwithvMAandVirtualMachines

Taggedas:esx,esxi,vmkfstools

{1commentreaditbeloworaddone}

georgeharrisJanuary5,2016at5:43am

Verynicearticle.ManythankstoGabrielle.Lfordirectingmehere.

aquestionIhavebeenabletosuccessfullycreatetheVMFS5virtualdiskanditshowsupinthe
datastore(6TBdisc=5.46TBavailable).Howeverthevspheredesktopclientwillnotaddanythingover
4TBtotheVM.

whatisthevmkfstoolscommandtodothissuccessfully?Examplebelow:

vmkfstoolsc6144G/vmfs/volumes/my6TBdrive/gmedia/gmedia.vmdk

http://buildvirtual.net/vmkfstoolsexamplesworkingwithvirtualdisks/ 4/7
5/31/2017 VMKFSTOOLSExamplesWorkingWithVirtualDisks

thisyieldstheerrorFailedtocreatevirtualdisk:Thereisnotenoughspaceonthefilesystemforthe
selectedoperation(13)

shouldIchooseadifferentsizewithan~10%overheadfactor?Ifso,whatcapacitydoIapplythe
overheadfactorto?

a)10%offullcapacity6144GB=5529GB

or

b)10%ofavailablecapacity5.46TBor4.91TB

Reply

LeaveaComment

Name*

Email*

Website

CAPTCHACode*

Submit

Previouspost:ALookatESXCLITheVMNamespace

Nextpost:QuickTip#2ExportVMInformationFromList

RecentPosts
vSphere6.5UploadlogbundlestoVMwaredirectfromthevSphereWebClient
ReplacingvRealizeOperationsManagerCertificates
VCSA6.0/storage/core100%Usage
AWSVPCLimitsFlashcards
VCAP6DCVDesignStoragePoliciesandStorageDRS
VCAP6DCVDesignStorageIOControl
http://buildvirtual.net/vmkfstoolsexamplesworkingwithvirtualdisks/ 5/7
5/31/2017 VMKFSTOOLSExamplesWorkingWithVirtualDisks

UpgradingVCSAto6.5
IncreasingAllocatedDiskSpaceforanExternalPlatformServicesController
UpdatingVCSA6.0to6.0U2
CloningVCSA6.0
VCP6CMACreateandManageBusinessGroups
VCP6CMACreateandManageReservationsandReservationPolicies
VCP6CMACreateandManageFabricGroups
VCP6CMAAddingavCenterEndpoint
PowercliOneLinertoListESXiHostUUID

Search

Tosearch,typeandhitenter

UsefulPages

VCAPDCA5Objectives
AdvertiseWithUs
VCAPDCAStudyGuide
VCPNVObjectivesStudyGuide
VCPNVPracticeExams
VCP6CMAStudyGuide

Tags

2008R2citrixDCUIEMCesxesxcfginfoesxcli esxi linuxnetworkingnfsnlbpartedutilpartitionspktcapuw


ESXi4.1esxi5.5

powercliPowerPathpowershellprovisioningserverPSAPSProotSATPsiterecoverymanager6srm6SSHTSM
vCloudDirector vdivMAvmdkvmkfstoolsVMwarevmwarevspheremultihtpervisormanager vspherevSphere5vsphere6vsphere

clientdownloadvSphereWebClient windowswindows2008r2xendesktopxenserver

ArchivedPosts

ArchivedPosts SelectMonth

Disclaimer

Theinformationinthisweblogisprovidedasiswithnowarranties,andconfersnorights.Thisweblog
doesnotrepresentthethoughts,intentions,plansorstrategiesofmyemployer.Itissolelymyopinion.

http://buildvirtual.net/vmkfstoolsexamplesworkingwithvirtualdisks/ 6/7
5/31/2017 VMKFSTOOLSExamplesWorkingWithVirtualDisks

2013

BuiltonThesis.SkinbyThesisSkins.net

http://buildvirtual.net/vmkfstoolsexamplesworkingwithvirtualdisks/ 7/7

You might also like