Hello!
We have a vshield LoadBalancer for 2 VMs. Now we should presentate a shared LUN for the 2 VMs.
I know this would be a feature of MS Cluster. If one VM is down the other VM will get the ressources.
Is this possible in vmware?
thx.
hansi
Yes its possible in VMware check below KB's
VMware KB: Microsoft Cluster Service (MSCS) support on ESXi/ESX
thx.
but I need shared storaged without MC Cluster like VMware KB: Disabling simultaneous write protection provided by VMFS using the multi-writer flag
But in my case I don't know that I have one host active and the second standby or 2 hosts active!
So I don't think that this is a solution for me.
thx.
hansi
Its not possible if you use shared RDM mapped to both the VM's as without clustering software there is a high chance of corrupting the disk.
The KB would be valid in case of Virtual Disk, where you share virtual disks between VM's with SCSI Bus sharing as Virtual.
hi use the lun in 2 VMs eventhough you wont get the better though put.
the kb reference is: kb.vmware.com/kb/1002782
NOTE: One viable way to use this safely is to have only one virtual machine use this device in read-write and the others in read only. The downside is that the virtual machines that are read-only still have to unmount and remount the volume before new data written from the read-write host is seen.
We made something familiar in a Linux cluster setup.
The Linux cluster exists of 2 seperate VM's and 2 datastores. Each VM's OS disk exists on one of the two datastores.
The data disk exists of 2 disks, one from each datastore and they are combined in the same volume(group)
So let's say one linux VM is active and the other standby. (Linux clustering handles the failover mechanism which server will be the active one)
All data written to the data volumegroup will be written to both VMDK's.
For your case I guess you can use the same method to present a VMDK to two diffent VM's and use them. In our case it is always a active/passive situation which prevents writing to the same disk from 2 nodes. I also don't know if it's recommended to Read and write simultaneously from 2 VM's on the same disk
To build the data volume group I do this:
- Start by adding a new disk to the first VM
- Remember the SCSI ID of the disk you add!
Choose the options below
- Disk provisioning type = Thick : Eager Zeroed
- Independent mode -> Persistent (Changes are immediately and permanently written to the disk)
After finishing a disk is added, go back to edit settings (or use powercli/SSH) to edit the advanced VMX settings.
vSphere Client:
VM needs to be powered off !
- Choose "Edit settings" -> "Options" -> "General" -> "Configuration Parameters"
As you remember or wrote down the SCSI ID, sort the column by name and search for scsiX:X (whatever you wrote down) for example I now use scsi1:0
Change the setting scsi1:0.ctkenabled from "true" to "false" this disables Change Blocktracking. I noticed that with CBT there could be a problem on the passive node to open or use the disk because the CBT disk is in use on the active node. This prevents the passive node from using it properly.
VMware KB: Enabling Changed Block Tracking (CBT) on virtual machines
On to the next setting:
- Add a new row with the name "scsi1:0.sharing"
- Value = "Multi-writer"
- Press "OK" and submit the changes you made
VMware KB: Disabling simultaneous write protection provided by VMFS using the multi-writer flag
By setting this value it now is possible for 2 "powered-on" VMs to use the same disk.
Now the same disk needs to be added to the 2nd VM
Go to the 2nd VM - "Edit settings" -> add harddisk -> "use an existing virtual disk" -> browse to the disk you created above
Add the disk and repeat the steps above about disabling CTK and enable multi-writer. Also check if the disk is "Independent - Persistent mode"
Powercli
get-vm <VM>|Get-AdvancedSetting -Name scsi1:0.ctkEnabled|Set-AdvancedSetting -Value false –confirm:$false
get-vm <VM>| New-AdvancedSetting -Name "scsi1:0.sharing" -Value "multi-writer" –confirm:$false
Also you best should create a DRS rule so to seperate the both VM's, else if your host crashes and somehow both VM's are on the same host, both your VM's could go down and your load balancing wouldn't help you there
thank you all for informations!
so I have to look for another solution
thx.
hansi