VMware Cloud Community
skchaw
Contributor
Contributor

How to Share a virtual disk for 2 virtual machine ??? Need Help Urgently !!

Hi,

Can i know how to share a virtual disk for 2 virtual machine in VI3.0.1

(Without using RDM method)

How to disable the file locking ?? I need it urgently, please help me \!!!

I need to share my vmdk file for 2 virtual machine. but i always received file locking error, any way to configure this ? any registry did i need to modified ?? Please help \!!!

Reply
0 Kudos
18 Replies
dkfbp
Expert
Expert

Why do you want to do that? I have built some test MSCS clusters running shared VMDK. You don't want to have two virtual machines accessing the same vmdk without running cluster.

I know vmware has some documentation on vmware.com regarding configuring shared VMDK for clusters.

Best regards Frank Brix Pedersen blog: http://www.vfrank.org
Reply
0 Kudos
skchaw
Contributor
Contributor

Hi,

I just need to share my virtual disk (D drive) for 2 virtual machine. so that data can be see on this 2 virtual machine. Is there any way to do this ?

Can i have to installation procedure or the link that so how to do this ?

Please !

Reply
0 Kudos
VirtualNoitall
Virtuoso
Virtuoso

Share out the data and connect to it from your second server. Do not try to mount the same disk on two servers without clustering. You will cause data corruption.

Reply
0 Kudos
bflynn0
Expert
Expert

The procedure is in the MSCS Setup Guide, starting on page 23[/url]

however its not recommended to have two systems accessing a disk (physical or virtual) without using a clustering solution (or the OS supports it like the ESX host). For instance in Windows both systems will attempt to write their own signatures to the disk and if there are writes to the disk from more than one host at a time it can/will lead to data loss/corruption

Reply
0 Kudos
skchaw
Contributor
Contributor

Hi,

Beside using clustering, is there any way to disable the file locking for a virtual disk? so that both virtual machine can see and use the same virtual disk at a same time. Please help !

Reply
0 Kudos
Vandalay
Enthusiast
Enthusiast

What you're trying to do is by definition a cluster and requires clustering software.

Otherwise, if you just need it accessible, share it out via CIFS or NFS and you can access from both machines. If both are on the same ESX server it will be very fast since the network traffic won't leave the server.

Reply
0 Kudos
bflynn0
Expert
Expert

The requirement of a single system accessing a disk without clustering is made by the guest operating system. That is, Microsoft does not support having two hosts accessing the same disk without clustering being setup. This doesn't matter if it's a physical system or a VM.

To have two VM's access a VMDK file do (Perform this at your own risk if you refuse to use clustering inside your guests):

Add the VMDK Hard drive to the first VM and change the Virtual Device node to a new SCSI controller (e.g. SCSI (1:0) - This will add a new SCSI Controller to the VM)

Change the Bus Sharing on the new SCSI Controller to Virtual.

Do the same on the other VM as well.

Reply
0 Kudos
skchaw
Contributor
Contributor

ha ha ! i have no choice, request from customer.

Below are the detail :

Create templates on Win2003std and Win2003Ent with SP and MS updates only, save templates into local drive

\- Setup 2 datastores on SAN in PMVM1 and PMVM2 (PMVM1 & PMVM2 are ESX host name)

\- Datastore 1 : VMachine Production (450GB) ~ 14LUNs 32GB per LUN

\- Datastore 2 : Notes Data (800GB) ~ 25LUN

\- Setup 2 Windows STD servers – PM03Notes01 and PM03Notes02

\- C:\ OS in Datastore 1 (VMachine Production) 36GB

\- D:\ create on Datastore 2 (Notes Data) 800GB accessible and shared by both servers

\- E:\ create on Datastore 1 (VMachine Production) 60GB

Any way to do this ???

Reply
0 Kudos
skchaw
Contributor
Contributor

From bflynn0

The requirement of a single system accessing a disk without clustering is made by the guest operating system. That is, Microsoft does not support having two hosts accessing the same disk without clustering being setup. This doesn't matter if it's a physical system or a VM.

To have two VM's access a VMDK file do (Perform this at your own risk if you refuse to use clustering inside your guests):

Add the VMDK Hard drive to the first VM and change the Virtual Device node to a new SCSI controller (e.g. SCSI (1:0) - This will add a new SCSI Controller to the VM)

Change the Bus Sharing on the new SCSI Controller to Virtual.

Do the same on the other VM as well.

\----


Actually i already did that, but the data is not updated automatically, when i create a folder in one of the VM, i can't see it on another VM. I have to restart the VM then only i can see the folder is appear on the disk

Reply
0 Kudos
skchaw
Contributor
Contributor

ha ha ! i have no choice, request from customer.

Below are the detail :

Create templates on Win2003std and Win2003Ent with SP and MS updates only, save templates into local drive

\- Setup 2 datastores on SAN in PMVM1 and PMVM2 (PMVM1 & PMVM2 are ESX host name)

\- Datastore 1 : VMachine Production (450GB) ~ 14LUNs 32GB per LUN

\- Datastore 2 : Notes Data (800GB) ~ 25LUN

\- Setup 2 Windows STD servers – PM03Notes01 and PM03Notes02

\- C:\ OS in Datastore 1 (VMachine Production) 36GB

((( - D:\ create on Datastore 2 (Notes Data) 800GB accessible and shared by both servers ))) <------- problem here !!!![/b]

\- E:\ create on Datastore 1 (VMachine Production) 60GB

Any way to do this ???

Reply
0 Kudos
bflynn0
Expert
Expert

Actually i already did that, but the data is not

updated automatically, when i create a folder in one

of the VM, i can't see it on another VM. I have to

restart the VM then only i can see the folder is

appear on the disk

Sounds about right. The file allocation tables aren't updated on the second host when the first host writes the data. You're not going to get around this without using a clustering solution. It's just not supported in Windows.

Reply
0 Kudos
kharbin
Commander
Commander

You do have a choice. The choice is to educate the customer as to why what he has requested is technically not feasible. Obviously the customer is mistaken about the capabilities of virtualization and what can be performed. So rather than provide a substandard, non-valid "solution", you must educate as well as propose a valid, workable solution. Don't be afraid to tell the customer he is wrong. Otherwise, he sure won't be afraid to blame you when it doesn't work.

You can only share a VMDK is the operating system supports clustered file systems. By default, NTFS is NOT sharable.

my 2 cents

Ken Harbin

www.esXpress.com

Reply
0 Kudos
VirtualNoitall
Virtuoso
Virtuoso

Even with clustering the disk is only accessible to one machine at a time. There is no way to do what he wants.

Reply
0 Kudos
bertdb
Virtuoso
Virtuoso

You will need a so-called "global" filesystem (like redhat GFS, or IBM GPFS).

NTFS, FAT32, ext3, ... are all local filesystems that need to be controlled by exactly one host. Letting multiple hosts control such a filesystem will corrupt your data, 100% guarantee.

Reply
0 Kudos
Vandalay
Enthusiast
Enthusiast

Good point.

If the customer asked you for a ride in a time machine back to the Bronze age, would you have a choice?

Reply
0 Kudos
bwold
Contributor
Contributor

If it's a must and your customer can afford it try polyserve

http://www.polyserve.com

It''l let the windows servers access the same data.

Reply
0 Kudos
Jae_Ellers
Virtuoso
Virtuoso

share the drive on one system. mount the drive on the other. The only situation this doesn't address is failover.

WTF? VMware isn't a universal magic wand. Neither does it usually need to be. Most of these problems have been solved before.

If you have a problem this doesn't solve you need more complex software, such as clustering or replication management.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=- http://blog.mr-vm.com http://www.vmprofessional.com -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reply
0 Kudos
skchaw
Contributor
Contributor

Hi,

Thanks for everyone who help me here, i will explain this to my customer.

Once again, thank you very much \!!! I love you all \!!!

Reply
0 Kudos