This section shows you how to attach an empty data disk to the virtual machine. See the Attach a Data Disk Tutorial for more information on attaching empty disks as well as how to attach existing disks.
- Sign in to the Azure Management Portal.
- Click Virtual Machines, and then select the MyTestVM virtual machine.
- You may be taken to the Quick Start page first. If so, select Dashboard from the top.
- On the command bar, click Attach, and then click Attach Empty Disk when it pops up.
- The Virtual Machine Name, Storage Location, File Name, and Host Cache Preference are already defined for you. All you have to do is enter the size that you want for the disk. Type 5 in the Size field. Then click the check mark to attach the empty disk to the virtual machine.
- Return to the dashboard to verify that the empty data disk was successfully attached to the virtual machine. It will be listed as a second disk in the Disks list along with the OS Disk.
After you attach the data disk to the virtual machine, the disk is offline and not initialized. Before you can use it to store data, you’ll need to log on to the virtual machine and initialize the disk.
- Connect to the virtual machine by using the steps in the previous section, How to log on to the virtual machine after you create it.
- After you log on to the virtual machine, open Server Manager. In the left pane, select File and Storage Services.
- Select Disks from the expanded menu.
- In the Disks section, there are three disks in the list: disk 0, disk 1, and disk 2. Disk 0 is the OS disk, disk 1 is a temporary resource disk (which should not be used for data storage), and disk 2 is the data disk you have attached to the virtual machine. Note that the data disk has a capacity of 5 GB as specified earlier. Right-click disk 2 and then select Initialize.
- Click Yes to start the initialization process.
- Right-click disk 2 again and select New Volume.
- Complete the wizard using the default values provided. When the wizard is done, a new volume is listed in the Volumes section.
The disk is now online and ready to use with a new drive letter.