VMware {code} Community
ghiotto86
Contributor
Contributor

Access vmdk file of a VM1 from VM2

Hi, I wonder whether it is possible to access (read/write) a vmdk file of a specific running virtual machine from another running virtual machine, using Storage API. It exist a method to avoid the file locking?

Thanks in advance.

0 Kudos
5 Replies
virtualirfan
Contributor
Contributor

This sounds like a question for a different forum.

fwiw: I don't know of a way to use vprobes to provide this access. Vprobes is a facility for binary instrumentation of guest, vmm, vmx and vmkernel functions.

CTO | Co-founder CloudPhysics, Inc. http://www.cloudphysics.com http://virtualirfan.com
0 Kudos
ghiotto86
Contributor
Contributor

Hi virtualirfan, maybe you're right. BTW i can instrument the vmm in order to intercept every file lock and change, for example, the flag value of the lock structure?

0 Kudos
virtualirfan
Contributor
Contributor

Is this on hosted or ESX?

CTO | Co-founder CloudPhysics, Inc. http://www.cloudphysics.com http://virtualirfan.com
0 Kudos
ghiotto86
Contributor
Contributor

On ESX(i).

0 Kudos
virtualirfan
Contributor
Contributor

Vprobes is not yet supported on ESX. Please let VMware know if you'd like to see the support for ESX. I certainly would but they need to hear request for official support from more customers.

Hacking around, I couldn't find a good way to use vProbes for the use case you described. You could use HV-Exit to look for in/outs to the SCSI controller in the VMM (see https://github.com/vmware/vprobe-toolkit/blob/master/cookbook/vt-exit.emt)

Otherwise, if you know the vmkernel function or system call for opening a new virtual disk, you could just do:

$ vprobe -t FUNCTION_NAME

and you'll get a trace of all entries and exits to that function.

Not sure if this helps. Can you share more about the use case?

CTO | Co-founder CloudPhysics, Inc. http://www.cloudphysics.com http://virtualirfan.com
0 Kudos