VMware Cloud Community
Rich_Peace
Contributor
Contributor

Need help in creating "Shared storage" that can be accessed by two virtual machines

VM: Virtual machine

I have two hosts running ESXi 4 that have access to remote storage shown at datastore. I create a shared virtual disk (refer to ) on the remote storage that is access by vm-01 and vm-02. I found that when I create a file on the share drive on vm-01 or vm-02, I can't see the file on the another VM. However, if I reboot the VM then I can see the file that is created on another VM. Isn't it when I create a file on the shared drive on vm-01 then I can see it immediately on vm-02?

Windows OS:

Tested on 2 x VM using Windows Server 2008 SP2 and 2 x VMs using Windows Server 2008 R2. Also tested on the same physical host and different physical hosts.

Shared disk config:

vm-01

Create disk - Select Support clustering features such as Fault Tolerance.

Virtual Device Node: SCSI (1:0)

SCSI Bus Sharing: Virtual

vm-02

Select existing virtual disk stored in vm-01

Virtual Device Node: SCSI (1:0)

SCSI Bus Sharing: Virtual

Power on vm-01, initialise the disk, format the disk in NTFS and assigned it to D drive. Then power on vm-02, I can see D drive is mapped. But when I create a file in D drive on vm-01, I cannot see it on D drive on vm-02.... Smiley Sad

Quote from "http://www.vmware.com/support/vsphere4/doc/vsp_40_new_feat.html"

" High Availability Clustering with Windows Server 2000, 2003, 2008

— vSphere 4.0 supports Microsoft Cluster Service (MSCS) with Windows

2000 and Windows 2003, and Failover Clustering for Windows 2008.

Clustering is supported with both 32-bit and 64-bit guests. Boot from

SAN virtual machines is supported as well. Majority Node Set clusters

with application-level replication (for example, Exchange 2007 Cluster

Continuous Replication (CCR)) are now supported. For details regarding

MSCS support, including important restrictions, see Setup for Failover Clustering and Microsoft Cluster Service. For information concerning supported storage arrays, see the vSphere Compatibility Matrixes. "

0 Kudos
6 Replies
NTurnbull
Expert
Expert

Try failing over the disk to the second node, unless 2008 CCR is different in the way it mounts disks for exclusive write then you will not be able to see files created until the disk has been failed over. Have a look on the microsoft KB's for 2008 cluster configuration as the VMware guide is supposed to used in conjunction with the MS guides to configure a cluster

Thanks,

Neil

Thanks, Neil
0 Kudos
Rich_Peace
Contributor
Contributor

How do I fail over the disk on the second node since I haven't even setup the cluster. I only setup both virtual machines to access the "shared" virtual disk and yet when I create a file on the shared disk in first node, I cannot see it in second node and vice versa unless I reboot the machine. ...

0 Kudos
NTurnbull
Expert
Expert

You will need to setup the cluster before you can fail over the disk. When windows starts any hard disk attached to it will get mounted for exclusive read/write by that server. If you then start another server it will then mount that disk for its own exclusive read write - it will see the files created at the mount time but nothing after that. If you start writing from both servers to the same disk then you will corrupt the disk. It is a limit/restriction of NTFS not VMware - NTFS is not a shared/multi host file system. Have a look on the microsoft knowledgebase

Thanks,

Neil

Thanks, Neil
Rich_Peace
Contributor
Contributor

Then if I want a disk that can be accessible by both servers and is it possible to achieve if they are not running as cluster. Does that mean I can only do it via network drive eg NFS or share folder mapping?

0 Kudos
TobiasKracht
Expert
Expert

So, if you are using iSCSI target and do not make a cluster you need to use a NTFS arbiter. If you don`t do so, you simply need to rescan target. Smiley Happy Or use any kind of cluster FS. Also in oprions of target you need to check option allowing clustering connections.

StarWind Software R&D

StarWind Software R&D http://www.starwindsoftware.com
0 Kudos
Texiwill
Leadership
Leadership

Hello,

Moved to Virtual Machine and Guest OS forum.


Best regards,

Edward L. Haletky VMware Communities User Moderator, VMware vExpert 2009, Virtualization Practice Analyst[/url]
Now Available: 'VMware vSphere(TM) and Virtual Infrastructure Security: Securing the Virtual Environment'[/url]
Also available 'VMWare ESX Server in the Enterprise'[/url]
[url=http://www.astroarch.com/wiki/index.php/Blog_Roll]SearchVMware Pro[/url]|Blue Gears[/url]|Top Virtualization Security Links[/url]|Virtualization Security Round Table Podcast[/url]

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos