Professional Documents
Culture Documents
Vmware Disk Mount User'S Guide: Virtual Disk Development Kit
Vmware Disk Mount User'S Guide: Virtual Disk Development Kit
You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: docfeedback@vmware.com
2008 VMware, Inc. All rights reserved. Protected by one or more U.S. Patent Nos. 6,397,242, 6,496,847, 6,704,925, 6,711,672, 6,725,289, 6,735,601, 6,785,886, 6,789,156, 6,795,966, 6,880,022, 6,944,699, 6,961,806, 6,961,941, 7,069,413, 7,082,598, 7,089,377, 7,111,086, 7,111,145, 7,117,481, 7,149,843, 7,155,558, 7,222,221, 7,260,815, 7,260,820, 7,269,683, 7,275,136, 7,277,998, 7,277,999, 7,278,030, 7,281,102, 7,290,253, 7,356,679, 7,409,487, 7,412,492, 7,412,702, 7,424,710, and 7,428,636; patents pending. VMware, the VMware boxes logo and design, Virtual SMP, and VMotion are registered trademarks or trademarks of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
VMware, Inc.
Contents
AboutThisBook
5 7
UsingVMwareDiskMount
VMware, Inc.
VMware, Inc.
ThisVMwaremanual,theVMwareDiskMountUsersGuide,providesanintroductiontousingthe vmware-mountcommandlineutility.
Revision History
Thisbookisrevisedwitheachreleaseoftheproductorwhennecessary.Arevisedversioncancontainminor ormajorchanges.Table P1summarizesthesignificantchangesineachversionofthisguide. Table P-1. Revision History
Revision 20050408 20070607 20080122 20080625 20080717 20080915 Description FirstversionoftheVMwareDiskMountUsersGuide. UpdatewithsupportforLinuxhostsandremotevirtualdisks. Newoptionforinventorypathofthevirtualmachine. UpdatedsupportinformationandFusemount. Correctedinformationaboutsnapshotsand/poption. AddedinformationaboutWindowsandLinuxlogfiles.
Intended Audience
ThisbookisintendedforanyonewhousesVMwareDiskMount.Userstypicallyincludepeoplewhodo softwaredevelopmentandtestingorworkwithmultipleoperatingsystemsorcomputingenvironments: systemadministrators,applicationdevelopers,QAengineers,andanyonewhowantstocreate,manage,and modifyvirtualdiskfilesfromscriptsoratthecommandline.
Documentation Resources
ToaccessthecurrentversionsofVMwareAPIandSDKdocumentation,goto: http://www.vmware.com/support/pubs/sdk_pubs.html ToaccessthecurrentversionsofotherVMwaremanuals,goto: http://www.vmware.com/support/pubs
Documentation Feedback
VMwarewelcomesyoursuggestionsforimprovingourdocumentation.Sendyourfeedbackto: docfeedback@vmware.com
VMware, Inc.
Online Support
YoucansubmitquestionsorpostcommentstotheDeveloperCommunitySDKsandAPIsforum,whichis monitoredbyVMwaretechnicalsupportandproductteams.Toaccesstheforum,goto: http://communities.vmware.com/community/developer
Support Offerings
TofindouthowVMwaresupportofferingscanhelpmeetyourbusinessneeds,goto: http://www.vmware.com/support/services
VMware, Inc.
VMwareDiskMountisautilityforWindowsandLinuxhoststhatallowsyoutomountanunusedvirtualdisk asaseparatedriveorpartitionwithoutneedingtoconnecttothevirtualdiskfromwithinavirtualmachine. Youcanmountspecificvolumesofavirtualdiskifthevirtualdiskispartitioned. Afteryoumountavirtualdisk,youcanreadfromandwritetothemountedvirtualdiskasifitwereaseparate filesystemwithitsowndriveletterormountpointonyourcomputer.Forexample,youcouldscanthedisk forvirusesortransferfilesbetweenthehostsystemandapoweredoffvirtualmachine.Whenyouarefinished usingamountedvirtualdisk,youshouldunmountitsothevirtualmachinecanuseitsvirtualdiskagain. Thischaptercontainsthefollowingsections: LimitationsonMountingVirtualDisksonpage 7. RunningVMwareDiskMountonaWindowsHostonpage 8. RunningVMwareDiskMountonaLinuxHostonpage 10.
VMware, Inc.
/p /L /m:w /m:n /?
Theoptionsforremotevirtualdisksare:
Option /i:InventoryPath /h:HostName /u:UserName /s:Password /P:Port Definition SpecifiesinventorypathontheVirtualCenterthatmanagesthisvirtualdisk. SpecifiesthenameorIPaddressoftheESXServertoaccessthemanagedvirtualdisk. SpecifiesusernamefortheESXServer. SpecifiesthepasswordfortheESXServer. SpecifiesthePortnumberusedtocommunicatewiththeserver.Thisisoptionaland defaultsto902.
Log Files
OnWindowsthediagnosticlogfilesforeach<user>whoranvmware-mountarelocatedhere:
C:\Documents and Settings\<user>\Local Settings\Temp\vmware-<user>-<nnnn>/vmount.log C:\Documents and Settings\<user>\Local Settings\Temp\vmware-<user>-<nnnn>/vmount-client.log
VMware, Inc.
Herearetwoexamples,connectingthroughESXServerandVirtualCenter:
vmware-mount K: [storage1] WinXP/WinXP.vmdk /i:ha-datacenter/vm/WinXP /h:esx3 /u:root /s:secret vmware-mount K: [storage1] WinXP/WinXP.vmdk /i:Datacenter/vm/WinXP /h:vc2 /u:admin /s:secretv
OnVirtualCenterwiththe/ioption,specifyInventoryPathas:
/i:<Path to your datacenter>/vm/<VMpathname as read from inventory tree in VC client UI>
ThepathtoyourdatacenterisasreadfromthetreedisplayintheVirtualCenterUI.
VMware, Inc.
Youcanmountaflatfilerepresentationofanentirevirtualdisk. Thecommandsyntaxformountingaflatfilerepresentationis:
vmware-mount -f /path/to/disk /mount/point
DiskMountincludesanumberofotheroptionstousewithvirtualdisksandmountpoints.Thecommand syntaxformostoptionsiseitherofthefollowing:
vmware-mount [option] [/path/to/disk] vmware-mount [option] [/mount/point]
Theoptionsforremotevirtualdisksare:
Option -v InventoryPath -h HostName -u UserName -F PasswordFile -P Port Definition SpecifiesinventorypathontheVirtualCenterthatmanagesthisvirtualdisk SpecifiesthenameorIPaddressoftheESXServertoaccessthemanagedvirtualdisk. SpecifiesusernamefortheESXServer. SpecifiesthepathnametoaplaintextfilecontainingthepasswordfortheESXServer. SpecifiesthePortnumberusedtocommunicatewiththeserver.Thisisoptionaland defaultsto902.
Log File
OnLinuxthediagnosticlogfilesforeach<user>whoranvmware-mountarelocatedhere:
/tmp/vmware-<user>/fuseMount.log
10
VMware, Inc.
Herearetwoexamples,connectingthroughESXServerandVirtualCenter:
vmware-mount -i ha-datacenter/vm/RH5 -h esx3 -u root -F pwf "[storage1] RH5/RH5.vmdk" /mnt/rh5 vmware-mount -i Datacenter/vm/RH5 -h vc2 -u admin -F pwf "[storage1] RH5/RH5.vmdk" /mnt/rh5
Youcanalsousethe-koptionandsupplyadiskID:
vmware-mount -k root@esx3.example.com:[storage1]RHEL5/RHEL5.vmdk
OnVirtualCenterwiththe/ioption,specifyInventoryPathas:
/i:<Path to your datacenter>/vm/<VMpathname as read from inventory tree in VC client UI>
ThepathtoyourdatacenterisasreadfromthetreedisplayintheVirtualCenterUI.
VMware, Inc. 11
Configurethemakefileforyoursystemandrunmaketocompileit:
./configure make
Assuperuser,installthepackage(thisputsitin/usr/local/lib):
sudo make install
If/usr/local/libisnotlistedin/etc/ld.so.conforanincludedfile,insertalineforitandrunthe ldconfigcommand.Alternatively,modifyyourLD_LIBRARY_PATHenvironment.
sudo edit /etc/ld.so.conf sudo ldconfig
RunthemodprobecommandtoinsertFusemoduleintothekernel:
sudo modprobe fuse
Nowyoucanrunthevmware-mountcommandasdescribedinthismanual.
12
VMware, Inc.