Вы находитесь на странице: 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

Оценить