This video will look at how to create virtual hard disks on Windows Server 2012 R2 using the VHD and VHDX format. The video will also look at how to convert between the different formats. The principles used in this video also apply to client operating system.
Access the rest of the course ITFreeTraining.com/server
Download the PDF: ITFreeTraining.com/handouts/se...
Demonstration creating virtual disks in Disk Management
1) To create and manage virtual disks this can be done with “Disk Management”. “Disk Management” can be opened by right clicking on the start menu and selecting the option “Disk Management”.
2) To create a new VHD, open the action menu and then select the option “Create VHD”.
3) To create a new virtual hard disk, enter in the location you want to create the virtual hard disk at the top of the screen.
4) Under the location select the size of the virtual hard disk that you want to create. If you create a virtual hard disk using the VHD format then the largest virtual hard disk you can create is 2040 Gigabytes. If you use the VHDX format you can create a virtual hard disk that is up to 64 Terabytes in size. The VHDX format is only supported on Windows Server 2012 and Windows 8 and above. The VHDX format offers additional performance features as well as transaction logging.
5) In the middle of the screen select the format you want to use to create the virtual machine. Either VHD or VHDX.
6) At the bottom you can choose if the virtual hard disk is fixed in size or dynamically expanding. The size of the dynamically expanding virtual disk will be same as the amount of data stored on the virtual disk. The fixed option creates a file the same size as the virtual disk. This makes performance of the virtual disk faster, however it does mean that more disk space will be used.
7) Once a virtual disk is created it will automatically be mounted and thus will appear in disk management. The icon used in disk management will be blue to indicate that it is a virtual disk. The icon used for physical hard disks will be grey. If the computer is restarted the virtual hard disk will need to be mounted again. If you want the virtual disk to be automatically mounted during start up, a script will need to created and run at start up to mount the virtual disk.
8) Like a newly installed physical hard disk with data on it, the virtual hard disk will need to be initialized before it can be used. To do this, right click on the virtual hard disk and select the option “Initialize Disk”. In this case MBR will be used, however you could use GPT as well if the hardware that you were planning to use the virtual disk on supported GPT.
9) Once the disk has been initialized it will be able to be formatted. To do this, right click on the virtual disk and select the option “New Simple Volume”. You are free to choose your own options, however in this case all the defaults were used. This will create a drive using all the free space and format it with NTFS.
Demonstration creating virtual disks using PowerShell
1) To open PowerShell, press the PowerShell icon in the quick launch bar.
2) If you run the command convert-vhd in PowerShell you will get an error message saying the Hyper-V role needs to be installed. To install Hyper-V, assuming the server meets the requirements, open Server Manager and select the option on the welcome screen “Add roles and features” and then from the wizard accept all the defaults except for ticking the role “Hyper-V” on the “Select server roles” screen. Part of the install will install the module “Hyper-V Module for Windows PowerShell” which is what you need to run the PowerShell commands. Unfortunately the whole Hyper-V role needs to be installed in order for the PowerShell commands to work. If you are not able to install Hyper-V on the server, it is also possible to run these PowerShell commands on Windows clients like Windows 8 assuming the Hyper-V role is installed on those clients. The server or client will need to be restarted after the install.
3) To convert a VHD file from one format to another use the PowerShell command Convert-VHD -Path (Source) -DestinationPath (Dest). e.g. Convert-VHD -Path c:\DataDrive.vhd -DestinationPath c:\DataDrive.vhdx
Description too long for RU-vid. Please see the following link for the rest of the description: itfreetraining.com/server#/vir...
See / itfreetraining or itfreetraining.com for our always free training videos. This is only one video from the many free courses available on RU-vid.
References
“Hyper-V” en.wikipedia.org/wiki/Hyper-V#...
“Installing and Configuring Windows Server 2012 Exam Ref 70-410” pg 48-50
24 июл 2024