We are going to test the SQL Server 2012 cluster function today, but the cluster needs to share the disk. After adding a disk in the previous vm7 method and modifying it all failed, I saw that I used iSCSI software initiator to simulate a shared disk on the Internet. There is no problem after the test. I will repost this article to share with you today.
Creating a SQL Server failover cluster in virtual machines is a fantastic learning experience, especially if you have to do everything yourself, not just the SQL Server install. one thing you may be wondering about is how to simulate shared storage if you
Don't have a San available. luckily, Microsoft has a free download that you can use to do just that. in this blog, I'll show you how to set up shared storage using only virtual machines.
You will need two VMS, one will serve as the storage, and the other is the server that needs to use the storage. Create an internal network called iSCSI.
Vm_storage:Storage Server
Add a second drive for the Storage
Windows 2008 r2
Add the iSCSI Network
Disable client for Microsoft Networks
IP: 192.168.2.10
Subnet: 255.255.255.0
Vm_server:Server that needs to use the shared storage
Your choice of Windows server operating systems
Add the iSCSI Network
Disable client for Microsoft Networks
IP: 192.168.2.11
Subnet: 255.255.255.0
Once everything is set up, make sure you can successfully ping one server from the other using the IPs.
Download
Microsoft iSCSI software initiator. on the vm_storage, run the installation file, iscsitargetqfe4.exe, which creates a folder C: \ iscsitarget and launches the iSCSI target web page. scroll down on the page to the "install the software" section. you'll see
Links to install the software (figure 1 ).
Figure 1: Install the iSCSI target software
Install iSCSI software target (x64) on vm_storage to turn it into a storage server. navigate to the storage node of Computer Management, and you'll see a new Microsoft iSCSI software target node (Figure 2) after the install.
Figure 2: New node under storage
On vm_server, check Administrative Tools to see if the iSCSI initiator is there. if not, you can install the iSCSI initiator from the download. run iSCSI initiator on vm_server. click Yes If asked if you want to start the service. this is where you will
Configure the connection to vm_storage. On the discovery tab click discover portal (Figure 3). Fill in the IP address of vm_storage and click OK.
Figure 3: Enter Storage Server IP
Click the configuration tab to see the initiator name (Figure 4). This is the name that vm_storage will see when assigning disks to target vm_server. Click OK to close the iSCSI initiator Properties dialog box.
Figure 4: view the initiator name
Back on vm_storage, right-click on iSCSI targets to launch the create iSCSI target wizard. on the iSCSI target identification page, fill in a name (vm_server) and description for vm_server. on the iSCSI initiators identifiers screen, Click Browse to find
Vm_server which will be the initiator name created in the last step (Figure 5). Click Finish and now your vm_server will be listed under the iSCSI targets node.
Figure 5: Find the target
Now let's configure the storage. click on disk management and bring the second disk online, initialize it and format it giving it a drive letter. once your second disk is ready to go, right-click devices to launch the create virtual disk wizard. on the file
Screen (figure 6) supply the path to a virtual hard drive that you want to create on the second disk.
Figure 6: create a virtual disk
Supply the size for the virtual disk on the Size page. you can actually create multiple virtual disks, so you might want to leave some room for more disks. on the description page, fill in a name for the drive so you can find it later.
The next screen, access, is where you connect target servers to drives. click Add and select the vm_server target to assign it to this drive. if you are building a cluster, you can add multiple targets. click Finish and you shoshould now see the new disk listed
In devices (figure 7 ).
Figure 7: The new Virtual Disk
Go back to vm_server and check the storage in Computer Management. at this point, you cannot see the storage. start up iSCSI initiator again. on the targets tab, click Connect. now you shoshould see the new storage in disk management. you can bring the disk
Online, activate it. format it and use it! When working with a cluster, the disk will be active in only one node at a time.
Source: http://www.bidn.com/blogs/KathiK/ssas/2770/set-up-shared-storage-with-a-vm