Highlighted
Contributor
Contributor

Running Virtualdisk mount

1. I am doing file-level backup by mounting virtual disk of a running Windows VM ,which is on NFS datastore by creating a CIFS share on the same file system ,where my NFS export resides .I am doing this by giving /m:n option in vmware-mount command.Where as I am doing the same for running Linux machine also.Are they valid backup methods ? Because the document says that I cannot use the virtual disk that are currently in use.

2.Is there any other way to mount a runnning virtual disk using vmware-mount syntax

Thanks

0 Kudos
8 Replies
Highlighted
Immortal
Immortal

1. Backing up an arbitrary snapshot would only guarantee crash consistent backups. Quiescing the filesystem before taking a backup would be better as it would ensure file system consistency (of course, this needs VMware tools to be on the guest). I am not sure how you backup files, but check BackupRead and BackupWrite functions on MSDN.

2. Linux VMware-mount is not providing the option to do this. Using the mntapi is one alternative.

Thanks

Sudarsan

0 Kudos
Highlighted
Contributor
Contributor

I have a NFS datatore residing on my storage. I am sharing the same datastore using CIFS and mapping that share on to my laptop and trying to mount running VMDK as a local virtual disk with /m:n option. I hope I am clear this time !

0 Kudos
Highlighted
Immortal
Immortal

Are you using vmware-workstation? Also, why do you do file based backup (you can copy the entire virtual disk for example).

-Sudarsan

0 Kudos
Highlighted
Contributor
Contributor

I am using ESX..I dont want to copy my entire VMDK file .I just want to copy only a few files

0 Kudos
Highlighted
Contributor
Contributor

The linux version of vmware-mount does not support mounting VMDK files that are in use by a running VM.

You could either write your own version that supports read-only mounts using DiskLib and MntApi or if the virtual disk is of type vmfs or monolithicFlat and you have no snapshots you can just mount the disk image using the loop device and the partition offset.

I can post more info about the second method if you're interested

0 Kudos
Highlighted
Contributor
Contributor

Thanks for your help ..I knew the second method .

I am able to mount the linux virtualdisk which is in use by vmware-mount command .As I told you ,I am exporting the same NFS datastore where my virtual disk resides and mounting to another linux machine as /mnt . I am using the vmware-mount systax to open the virtualdisk and copying the files

vmware-mount /mnt/myvm/virtualdisk.vmdk /local/mountpoint

In case of windows Virtual disk , I am sharing the same NFS datastore where my virtual disk resides using CIFS and mapping that share on to another windows machine and able to open VMDK which is in use by vmware-mount command .

vmware-mount K: E:\myvm\virtualdisk.vmdk /m:n

I would like to know whether it is a valid method or not ? if not why ? As i am using NFS datastore and my VMDK is directely on the storage,my guess is that my storage is handling the locking issues

0 Kudos
Highlighted
Contributor
Contributor

Sounds like it's working as desired for you, so I'm completely not sure what your question is. If you're asking if mounting images exported via NFS is valid, then yes. It doesn't matter if the files are on local disks or mapped from a remote server.

As long as the filesystem inside the virtual disk can be mounted while the VM is running by the host operating system you can mount the disks of a running VM. For example:

From a Linux machine I can mount a virtual disk that is formatted with ext3 while the VM is running, I can not however mount a disk formatted with NTFS while the VM is running using vmware-mount from that same Linux machine. The VM must be stopped and the disks cleanly shutdown before vmware-mount will mount a running NTFS volume from Linux.

0 Kudos
Highlighted
Contributor
Contributor

Just to clarify, when you're working with local virtual disks (on local storage or nfs/cifs shares) vmware-mount will allow the disk to be mounted (provided to host operating system can mount it) when the VM is running. If you're using the remote capabilities of vmware-mount the VM must not be running.

0 Kudos