I hope I can word this question right. Here goes. I have two seperate VMs with two seperate VMX files that are connected to the same VMDK. Can both VMs run at the same time? Or if one VM runs and is shutdown, And the other VM runs will the VMX files change the VMDK????
I believe it depends on how the vmdk is connected to the VM. If it is just a standard added hard drive added then I think only one VM can have it activated at a time (file lock happens). I think the only way you can have multiple connections to a virtual disk is using raw device mappings (rdm). I'm not 100% sure but I think the file lock system will only allow you to power on one VM with that vmdk.
Kyle
On a VM powered on the vmdk files are locked...
You cannot write or read them.
But you can follow the MS cluster configuration to create a vmdk that is shared between two VMs.
Note that you must use a cluster configuration to have sigle access to the shared resource or you have to use a filesystem cluster aware (like GFS on Linux).
Andre
So you've got 2 vm's accessing the same virtual disk, if your running Windows as the guest then no - you'll corupt the machine. I'm not too sure as to other OS's but I'm pretty sure that this is not a good idea (Not sure about the filesystems that allow multiple hosts to mount concurently). Are you really short of disk space that you can't clone the vm?
Thanks,
Neil
No this is not possible, once one of the VMs are powered on, a lock will be placed on the VMDK. You will not be able to power on the other virtual machine, you will need to clone the VM and then you'll be able to power on both VMs. If you're looking to share a common base image, you can do this with a method logy called Linked Cloning which is a feature that is available in either Lab Manager, VMware View or using the vSphere API to write your own script to do so.
This document is slightly out of date but the concepts between full clones and link clones still apply: http://www.vmware.com/support/ws55/doc/ws_clone_overview.html
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".