VMware Cloud Community
fletch8527
Contributor
Contributor
Jump to solution

ESXi 6.5 Shared Storage between 2 Guests

I have an ESXi 6.5 host with 2 guests (Windows 10 and Ubuntu). This is my first time using ESXi. The host has 2 storage devices (an SSD and a HDD), datastore1 is the SSD and datastore2 is the HDD. The guests are running on datastore1 and datastore2 is currently empty. Is it possible to setup something on datastore2 so that both guests can access it simultaneously?

I know I could create a vmdk and attach it to one of the guests then set up a network share on that guest so that the other guest could access it. But I was hoping to avoid that in case there is a time where the source of the share is offline.

I found a few guides that said to add a new SCSI controller to both (LSI Logic SAS) then create a new hard disk on one guest and set up Multi-Writer sharing. When I followed the steps I was able to get the drive to show up in both guests but they are not synced. If I add a file in one guest its not there in the other. They are using the same vmdk file.

Reply
0 Kudos
1 Solution

Accepted Solutions
daphnissov
Immortal
Immortal
Jump to solution

What you're wanting to do here is a dangerous proposition that should probably be avoided. When you attempt to share the same disk device between two systems, you welcome the real possibility of data corruption as changes made from one may not be seen or acknowledged by the other. This is especially true when you start mixing OS types. Generally, using multi-writer on a shared disk is only supposed to be used for cluster-aware applications or filesystems (of which VMFS is a type). In your case, this isn't something you should be doing but instead either using an external NAS or some third system which can provide a file-level abstraction to both systems.

View solution in original post

Reply
0 Kudos
5 Replies
daphnissov
Immortal
Immortal
Jump to solution

What you're wanting to do here is a dangerous proposition that should probably be avoided. When you attempt to share the same disk device between two systems, you welcome the real possibility of data corruption as changes made from one may not be seen or acknowledged by the other. This is especially true when you start mixing OS types. Generally, using multi-writer on a shared disk is only supposed to be used for cluster-aware applications or filesystems (of which VMFS is a type). In your case, this isn't something you should be doing but instead either using an external NAS or some third system which can provide a file-level abstraction to both systems.

Reply
0 Kudos
dadowistef
Contributor
Contributor
Jump to solution

Hi, first let me ask what is it that you are trying to accomplish? I want to have a little more background on the problem we are trying to solve. Second, let me know if I understand you are trying to do. You are trying to mount a VMDK to both the Windows and the Ubuntu from datastore 2 at the same time (as a shared drive). I've only seen that when the two operating systems are the same, like in a cluster. What I would do is what you are describing, Mount it on Windows and create a CIFS share, then use something like Samba in the Linux, or mount it in the Ubuntu and create an NFS share, then mount that in the Windows. Also, you could do raw device mapping, but I only see those in clusters. Shared block data can get corrupted if not managed by the appropriate application, file data like a CIFS or NFS are built for sharing.

Reply
0 Kudos
fletch8527
Contributor
Contributor
Jump to solution

My Ubuntu guest is set to connect to a VPN and set up in a way that if the VPN disconnects that the network connections are disabled. I was looking for a way to pull files down on the Ubuntu guest and saving them so that they are accessible by the Windows guest in a way that if the VPN were to disconnect they would still have access. I switched to ESXi from VirtualBox. In VirtualBox, Windows was the host and I just used the Shared Folders option in VirtualBox to share a physical drive on my host to the Ubuntu VM. From what it sounds like, I may have to set up a share on one of the guests. I just thought there was a way that ESXi could sort of host a 'share' that would mimic the way that VirtualBox's Shared Folders worked.

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

ESXi and VirtualBox are vastly different types of hypervisors (type 1 versus type 2), and so there is not supposed to be feature parity among them.

I just thought there was a way that ESXi could sort of host a 'share' that would mimic the way that VirtualBox's Shared Folders worked.

No, not natively. This is a job for a NAS or some other external system.

Reply
0 Kudos
fletch8527
Contributor
Contributor
Jump to solution

Thanks for the quick responses guys. I may look into creating a FreeNAS guest to solve the issue.

Reply
0 Kudos