How to Attach virtual hard disk to existing HyperV virtual machine?
This step by step instruction will guide you to add virtual hard disk to your HyperV virtual machine.
Situations:
My virtual SharePoint 2010 installation is running out of space and need to add additional drive so
that I could move SQL data out of current drive to the new one.
Step 1:
1. Turn off your virtual hyperv machine and open HyperV Manager. Select the virtual machine
which you want to add additional virtual drive and click on Settings
2. In settings select IDE Controller | Hard Drive and click Add
3. Now we need to create a new virtual hard disk. Click new to create new virtual harddisk
4. Adding new virtual hard disk wizard: This wizard helps you to create a new virtual hard disk.
Virtual hard disk provide storage for virtual machines and are stored on physical media as.vhd files
Click Next
5. You have three options to choose disk type
– Fixed Size, dynamically expanding and differencing. In this case, I am going with fixed size
6. Specify Name and location. I
7. You can create a blank virtual hard disk or copy the contents of an existing physical disk
8. Summary of your new virtual hard disk which we are creating and click
Okay below to create your new virtual hard disk
9. Once HyperV completed it process of creating new virtual hard disk, this is how you should see the end result
Step 2:
1. Turn on your HyperV virtual machine
Start | Administrative Tools | Server Manager | Disk Management |
In disk management you should see your second drive which you created.
2. Right click in unallocated space and click on New Simple Volume
3. New simple volume wizard : This wizard helps you to create a simple volume on a disk
4. Specify Volume Size : Choose a volume size that is between the maximum and minimum sizes
5. Assign Drive Letter or Path : For easier access, you can assign a dive letter or drive path to your partition
6. Format Partition: To store data on this partition, you must format it fist
7. You have successfully completed the new simple volume wizard
8. End results: I have successfully added second drive to my hyperv virtual machine.
Now I can move all the SQL data files to my new drive which I added in HyperV virtual machine. If you perform all the above steps
you can successfully add additional drive in your HyperV virtual machine.
where is it taking that drive space from? I do not see any settings that show where you can point it to for the space. For instance, If I have my physical server with local drives, and create a hyper v virtual server on it, I have a partition called V drive of 200 gb that I point to when creating the VM for the C drive. So when I want to add a second drive as described here, if I make it 100 gb, is it taking it from my V partition on the physical server? I still have 500gb of unallocated space on the physical server which I was hoping to make a partition to use for a second drive on my VM – (for splunk data). Is that unable to be done?
Virtual Drive