11 Replies Latest reply on Jan 14, 2020 7:26 AM by continuum

    Sharing RAW Volumes With Multiple VMs

    hxman101 Novice

      Is it possible to map a RAW piece of storage to multiple VMs, for example we have some VMs that will be in a cluster and they need shared storage between them? I am unable to find the docs online.

       

      Thanks

        • 1. Re: Sharing RAW Volumes With Multiple VMs
          a.p. Guru
          User ModeratorsCommunity WarriorsvExpert

          You can find the MSCS cluster documentation for the different vSphere versions at http://kb.vmware.com/kb/1004617

          Remember, that MSCS is a shared-nothing cluster, i.e. only one node at a time can access a shared volume.

           

          André

          • 2. Re: Sharing RAW Volumes With Multiple VMs
            hxman101 Novice

            So it appears I can't share RAW Device Mappings correct? On the second host when I try to select a disk it only shows shared Datastores and not the RDM....

            • 3. Re: Sharing RAW Volumes With Multiple VMs
              MKguy Virtuoso

              When adding the RDM to the 2nd VM you have to select "Add an existing virtual disk" and point it to the RDM mapping vmdk file that was created on the datastore when you added the RDM to the first VM (by default this mapping file is created in the first VMs folder).

              Please refer to the documentation linked by André above and this KB article:  VMware KB: Microsoft Clustering on VMware vSphere: Guidelines for supported configurations

              • 4. Re: Sharing RAW Volumes With Multiple VMs
                hxman101 Novice

                So if the Datastore is clustered?

                When I create the RDM on the 1st VM, then "Onto which datastore do you want to map this LUN?" I select "Store with Virtual Machine" or "specify datastore"?

                • 5. Re: Sharing RAW Volumes With Multiple VMs
                  MKguy Virtuoso

                  It doesn't really matter, this is just about the location of the RDM mapping file. The mapping file basically just says "access for this virtual disk is directed to physical LUN X".

                  It might be a bit easier to manage or understand if you create a dedicated folder on a datastore and store the mapping file there instead of leaving it in the default VM folder of your first VM, but in the end it doesn't really matter as long as you know where to point your other VMs.

                  • 6. Re: Sharing RAW Volumes With Multiple VMs
                    Umesh Expert

                    Procedure

                    For Primary VM

                    1 On the Select a Disk page of the New Virtual Machine wizard, select Raw Device Mapping and click Next.

                    2 From the list of SAN disks or LUNs, select a LUN for your virtual machine to access directly and click Next.

                    3 Select a datastore for the LUN mapping file and click Next.

                    You can place the RDM file on the same datastore where your virtual machine configuration file resides, or select a different datastore.

                    Note : To use vMotion for virtual machines with enabled NPIV, make sure that the RDM files of the virtual machines are located on the same datastore. You cannot perform Storage vMotion or vMotion between datastores when NPIV is enabled.

                    4 Select a compatibility mode and click Next.

                               Physical : Allows the guest operating system to access the hardware directly. Physical compatibility is useful if you are using SAN-aware applications on the virtual machine. However, a virtual machine with a physical compatibility RDM cannot be cloned, made into a template, or migrated if the migration involves copying the disk.

                              Virtual : Allows the RDM to behave as if it were a virtual disk, so you can use such features as taking a snapshot, cloning, and so on. When you clone the disk or make a template from it, the contents of the LUN are copied into a .vmdk virtual disk file. When you migrate a virtual compatibility mode RDM, you can migrate the mapping file or copy the contents of the LUN into a virtual disk.

                    5 Accept the default or select a different virtual device node. In most cases, you can accept the default device node. For a hard disk, a nondefault device node is useful to control the boot order or to have different SCSI controller types.

                    For example, you might want to boot from an LSI Logic controller and share a data disk with another virtual machine using a bus Logic controller with bus sharing turned on.

                    6 (Optional) To change the way disks are affected by snapshots, click Independent and select an option.

                              Independent - Persistent : Disks in persistent mode behave like conventional disks on your physical computer. All data written to a disk in persistent mode are written permanently to the disk.

                              Independent - Nonpersistent : Changes to disks in nonpersistent mode are discarded when you power off or reset the virtual machine. With nonpersistent mode, you can restart the virtual machine with a virtual disk in the same state every time. Changes to the disk are written to and read from a redo log file that is deleted when you power off or reset.

                     

                    7 Click Next.

                     

                    For Secondary VM

                    1 Edit Virtual machine settings

                    2 Add HDD

                    3 Use an existing virtual disk

                    4 Browse the datastore of Virtual machine you have added the RDM

                    5 Select the .vmdk

                    6 Click finish

                    • 7. Re: Sharing RAW Volumes With Multiple VMs
                      gautamparkash Novice

                      i have same problem, but after following the same step for mapping RDM disk.

                       

                      we mapped the RDM while VM's is in power on state. getting the below error while we followed steps for secondary VM.

                       

                      File system specific implementation of LookupAndOpen[file] failed

                       

                      we mapped the RDM in power of state, then we are able to power on one VM only, getting below error while powering on second VM

                       

                      Cannot open the disk '/vmfs/volumes/5e1d47cc-5505508c-f8cd-000af775e1f0/TEST1/TEST1_1.vmdk' or one of the snapshot disks it depends on.

                      Failed to lock the file

                      File system specific implementation of LookupAndOpen[file] failed

                       

                      Please help.

                      • 8. Re: Sharing RAW Volumes With Multiple VMs
                        continuum Guru
                        User ModeratorsCommunity WarriorsvExpert

                        Consider yourself lucky that the advice from umesh did not work - it is not supposed to work like that.

                        If it worked it was a cool way to sabotage the filesystems inside your VMs !!!

                        • 9. Re: Sharing RAW Volumes With Multiple VMs
                          jburen Hot Shot
                          vExpert

                          Please make sure that the SCSI Controller that is used for the RDM is set to SCSI Bus Sharing: Physical. This should also be in the documentation...

                          • 10. Re: Sharing RAW Volumes With Multiple VMs
                            gautamparkash Novice

                            So how i will fix this problem.

                             

                            I tried with all option in sharing:

                            No Sharing

                            Unspecified

                            Multi Wrinter

                             

                            with Physical/Virtual option

                             

                            But not working, help me to get it fixed

                            • 11. Re: Sharing RAW Volumes With Multiple VMs
                              continuum Guru
                              vExpertUser ModeratorsCommunity Warriors

                              You do not use vmdks in multiwriter mode to share data between normal VMs.

                              This is for special cluster aware VMs only