VMware

sudarsan

sudarsan's Profile

  • Name: Sudarsan 
  • Email: (Private)
  • Member Since: Sep 20, 2006
  • Last Logged In: Nov 5, 2009 10:11 AM
  • Status Level: Expert Expert (751 points)
  • VMware Employee: VMware Yes

sudarsan's Latest Content

I have attached two simple scripts to show how you can use vmware-mount on Linux to open LVM volumes.

lvmMount.sh is a barebones script to mount lvm disks. Basic idea is simple, vmware-mount on Linux allows you to mount a VMDK in flat mode. Using this, we mount all the disks in an LVM physical group in flat mode. We can then use LVM to scan for volume groups, activate the volume group of interest and mount the volume.

lvmCreate.sh is another barebones script to test the lvmMount.sh. It creates 2 disks, makes a group out of these, creates a volume, mounts it and copies a test file into the volume.

I have hardcoded many parameters and removed any error checking to show the sequence of commands. I don't claim to be a Linux/Scripting expert, please feel free to comment.

2 Comments Permalink


The attached sample code shows off the integration between VIX and VDDK (VixDiskLib and vmware-mount). The sample is fairly complex, showing the usecase of quantining a workstation VM.
Here is what this sample does:

  • Read and analyze the MBR of the primary disk
  • Read boot.ini from the active partition - deterime and mount the boot volume
  • Copy the system hive and determine the mounted drives
  • 'Scan' the drives to 'find' an infected file
  • Quarentine the VM by removing the network device from VMX
  • Power On the VM and Delete the files using VIX api
  • Power off the VM and restore back the original configuration

0 Comments Permalink

More sample code in sudarsan

Posted by sudarsan VMware Jan 21, 2009 2 Comments


The attached sample code shows how to work with VDDK and VIM apis together. It uses C# to call the VI methods to get disk details, mount the system volume and load a registry hive.

Note that the sample only handles basic disk - also it is meant to show the VDDK api's working with VI api's, not meant for use in production code.


2 Comments Permalink

Brainstorm with co-workers, get your questions answered, build status with your responses.

Write your own drafts, invite selected collaborators, or leave it open for all to pitch in.

sudarsan's Blogs

Communities