VMware Communities > VMTN > VMware Infrastructure™ > VI: ESX 3.5 > Discussions

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
6 Replies Last post: Jul 3, 2008 10:58 AM by kjb007
Reply

Mount an ESX VMDK file from Other system?

Jun 30, 2008 5:09 PM

Click to view ABailward's profile Lurker ABailward 3 posts since
Jun 30, 2008
I'm really desparate to be able to mount a ESX 3.5 vmdk file on a local system, linux or windows. Currently the round trip time to make minor changes to an ESX image I'm sending to the QA department is hours long when it should be minutes, mostly due to having to make changes to the image on a running ESX machine, do various cleanup bits (ie: remove .bash_history), then download from the ESX server to my workstation, zip it up, then sending it to QA.

I'd love to be able to mount the disk image on my desktop machine, edit / add/remove any needed files, and simply send that straight to QA, instead of the much longer procedure of upload to ESX, edit, clean, download, etc.

I know that the vmware-mount.pl is gone for the workstation disk type, but I saw someone here got esx images to mount using the VCB framework.... is that the way to go? If so, is VCB a free download or something that I can evaluate and use with just a VI3.5 ESX install?


Alternatively, is there a way to speed up the untarring of a 15G image from a local machine to a vmfs partition? Or is that best left to another discussion?


Many thanks.

Alan

Reply Re: Mount an ESX VMDK file from Other system? Jun 30, 2008 7:45 PM
Click to view hkrishnan's profile Novice hkrishnan 19 posts since
Feb 19, 2008
VMware
Hi Alan-

You may want to check out vmware virtual disk development kit (VDDK). it includes a tool called diskmount that can be used to mount virtual disks. you can mount virtual disks (VMDK) and edit them if they VMs are offline (not powered on). Here is the link for download
http://www.vmware.com/download/sdk/virtualdisk.html

VDDK is a free download.

Hari
Reply Re: Mount an ESX VMDK file from Other system? Jun 30, 2008 11:46 PM
Click to view anilksh's profile Lurker anilksh 4 posts since
Feb 8, 2006
HI
Reply Re: Mount an ESX VMDK file from Other system? Jun 30, 2008 11:50 PM
Click to view sumitgad's profile Novice sumitgad 20 posts since
Sep 26, 2007
Yes, You can use Mountvm utility included in VCB to mount a VMDK file on the Windows system but for this, first you need to take the backup of your vmdk file using VCB as the Mountvm utility can only mount the vmdk file that has been backed up using VCB.

I have implemented the same thing in my environment in which the backup of the VMs gets stored in the NFS partition attached to the ESX server using the vcbMounter utility and then the same NFS volume is attached to the widows server through which i can mount the vmdk file on the widows server.


Do let me know if you need more information about this.


Regards,


Sumit


Vmware Certified Professional

Reply Re: Mount an ESX VMDK file from Other system? Jul 1, 2008 5:49 AM
Click to view kjb007's profile Guru kjb007 5,303 posts since
Sep 18, 2006

Ok, please clarify a bit. Do you have the vm's on an ESX host, and are having trouble editing the vmdk from another vm, or is the vmdk on your machine?

Generally, the tar/untar is faster on a non-vmfs filesystem. To save a step, you can run the tar as a stream, and scp the stream at the same time. So as the stream is tarring, you start to copy it over to where you really need it. It is still scp, of course, but it may be somewhat faster.

The below is what I do, when I've had to move an entire vm to another system.

tar cf - <vm_folder_name> | scp root@esx_host_name "cd /vmfs/volumes/datastore/ ; tar xf - "

Good luck,

-KjB

Reply Re: Mount an ESX VMDK file from Other system? Jul 3, 2008 10:48 AM
in response to: kjb007
Click to view ABailward's profile Lurker ABailward 3 posts since
Jun 30, 2008

Hi there....

This is moving a vmdk off the esx server for distribution out to the field. If (when) tweaks to the image are needed we need to run some cleanup steps (removing session history and the like).

Thanks all for the pointers, however I can't get vmware-mount (windows or linux version) to mount an image :( The closest I get is on linux where I get:

# vmware-mount filename.vmdk 5 /mnt/test/
mount: you must specify the filesystem type
Failed to mount partition 5 of disk 'filename.vmdk' on '/mnt/test/'

It will mount the first partition just fine though. According to -p I see:

# vmware-mount -p filename.vmdk
Nr Start Size Type Id Sytem
--


                    • ---- --
1 63 208782 BIOS 83 Linux
2 208845 10490445 BIOS 83 Linux
3 10699290 4192965 BIOS 82 Linux swap
4 14892255 16563015 BIOS 5 Extended
5 14892318 16562952 BIOS 83 Linux


Any thoughts?

Reply Re: Mount an ESX VMDK file from Other system? Jul 3, 2008 10:58 AM
in response to: ABailward
Click to view kjb007's profile Guru kjb007 5,303 posts since
Sep 18, 2006
Actions