Contributor
Contributor

Shared storage between 2 VMs on VI3?

Jump to solution

Hello,

We are in the midst of migrating our VMs from an ESX2.5 environment to a 3.0.2 environment. We have 2 small Linux VMs set up as redundant web servers, with a shared VMDK file configured on both of them for the content. From what I understand, this is not possible in VI3. I tried setting the same sort of thing up with some test WinXP VMs, but got an error adding the disk to the second VM when the first VM already had the disk active.

Does anyone have this sort of setup, or are there any other suggestion about how to enable this? It's only a 16GB disk, so I don't want to set up anything too exotic for that size of data. The SAN is a Netapp 3050c, but the NFS license is currently tied up on another device. Worst case, I guess I can just clone the disk and have our web person mirror one disk to the other.

Thanks,

Tim

0 Kudos
1 Solution

Accepted Solutions
Virtuoso
Virtuoso

ESX 2.x and 3.x will both allow you to share a VMDK between VMs, provided you set the VMDK up on a separate virtual SCSI controller in the VM (i.e. set the SCSI address to anything other than SCSI0:x) as well as setting the bus sharing type to something other than "None" (if it's a single ESX host, set it to Virtual. If you have more than one ESX host accessing the VMDK, set this to physical.)

Even so: Care should be taken to prevent both VMs from accessing the VMDK unless you have a clustered file system on the VMDK. NTFS and Ext3 are not clustered file systems and will corrupt if multiple hosts have access to them. This is not a limitation of ESX.

View solution in original post

0 Kudos
6 Replies
Immortal
Immortal

make that 16GB disk a part of a 3rd VM, which shares out its contents via NFS....

--Matt

--Matt VCDX #52 blog.cowger.us
Contributor
Contributor

Thanks for your suggestion Matt. That would still leave a single point of failure if that 3rd VM were ever to go down for a reboot, but otherwise I'm sure it would work fine. We are going to try setting up an RDM for both the VMs to access. It's not something we've done before, so we'll see how it goes.

Thanks,

Tim

0 Kudos
Immortal
Immortal

Which clustered filesystem are you planning to use for the RDM?

--Matt

--Matt VCDX #52 blog.cowger.us
0 Kudos
Contributor
Contributor

It's not actually a true cluster setup, more like a warm standby. The

"live" server is switched with some manual intervention.

So far we have migrated one server and set up the RDM on it, and it is

working well. Tomorrow we plan to convert the other and make sure both

servers see the shared RDM.

Tim

0 Kudos
Virtuoso
Virtuoso

ESX 2.x and 3.x will both allow you to share a VMDK between VMs, provided you set the VMDK up on a separate virtual SCSI controller in the VM (i.e. set the SCSI address to anything other than SCSI0:x) as well as setting the bus sharing type to something other than "None" (if it's a single ESX host, set it to Virtual. If you have more than one ESX host accessing the VMDK, set this to physical.)

Even so: Care should be taken to prevent both VMs from accessing the VMDK unless you have a clustered file system on the VMDK. NTFS and Ext3 are not clustered file systems and will corrupt if multiple hosts have access to them. This is not a limitation of ESX.

View solution in original post

0 Kudos
Contributor
Contributor

Hi Jannie,

That is exactly what we did. On each VM, we added the RDM with a different SCSI ID, and it automatically added an additional SCSI adapter. We set the sharing type to Physical, as we have more than one ESX server potentially accessing it. The only thing that tripped us up for a moment was the boot order of the hard disk. For some reason, the shared disk became the first boot device, so we had to change that in teh VM's BIOS.

Thanks,

Tim

0 Kudos