1

We are currently running vmware esx server in our office network. Our vmware guest machines are running Ubuntu Server 11.04.

What we're looking for is a way to share a storage space accessible by guest machines by using a virtual disk. If one of the guest machines writes to the shared storage space, then all other guests would see the change.

I have read a post about creating a vmdk that get's mounted on the guest. But the post also mentions that none of the guests would see changes if one of the guests writes unless the disk is remounted. Is this correct?

Does anyone know how set this up strictly via vmware ? (meaning not using a nas guest machine configured with cifs, smb, nfs, etc.. for sharing)

Ron Buenavida
  • 59
  • 1
  • 2
  • 8

2 Answers2

0

For making a physical drive writable by several Ubuntu machines the easiest way is to add the VMWare disk to ONE of the virtual machines, then use NFS to share that drive with other machines. The only real limitation, relative to trying to share a VMware disk directly, is that, if the virtual machine actually hosting the disk is down, the disk will be unavailable to the other virtual machines. However, an additional advantage of using NFS (apart from not corrupting the disk, as discussed in the other responses) is that the NFS VMware disk can also be shared with other, non-virtual, machines as well.

One of the (many) sets of instructions on how to set up NFS under Ubuntu is at: https://help.ubuntu.com/community/SettingUpNFSHowTo

0

You are asking for a "multi-writer" shared disk. VMware supports this (its used to support MSCS clusters, and VMware fault tolerant VMs), but there are not a lot of filesystems or OSes that can take advantage of this -- I'm pretty confident none of the standard Ubuntu filesystems are capable of this. This setup is the virtual equivalent of plugging a single SCSI drive into two separate hosts ... the caching and consistency issues are not trivial for the hosts to use the shared storage without clobbering each other.

Here is a VMware KB article about enabling multi-writer mode: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1034165

There are also implications for VM management (migration, backups, etc) that get much more complicated with shared disks to be aware of.

P.T.
  • 24,557
  • 7
  • 64
  • 95
  • Thank you for the link. Based on the steps described in the article, it seems like it should be fairly straight forward to mount the new drive in Linux. (vmware tools provides vmhgfs file system for our machines). We are setting up an SFTP server for users to upload files on a vm. The files uploaded will be on the shared virtual drive. That same virtual drive will exist on other guests that will be serving the files through Apache. Do you foresee any issues with this type of setup? – Ron Buenavida Feb 16 '12 at 08:57
  • vmhgfs is not a filesystem for virtual disks. Its for sharing the VM host's filesystem with the guest. You have no viable filesystem for the shared storage, so I'm pretty confident that shared virtual disks are not the solution to your problem. You should stick to network-based shared storage like NFS or CIFS. – P.T. Feb 16 '12 at 20:36