How to create a VM in Hyper V server
Creating a VM in Hyper V Server from scratch is a simple process using Hyper-V manager. For straightforwardness, a large portion of the configuration options is not accessible during initial creation. The wizard presents various alternatives that may not be completely evident for those not experienced with its subtleties.
Follow the below steps to create a New Virtual machine:
1. You need to open Hyper-V Manager and now in there in the left pane, you need to click on the Hyper-V hosting where you wish to host the new virtual machine.
2. Now click on New on your right-hand action and now your virtual machine will start the wizard.
3. Now you will get some information page of the New Virtual Machine Wizard. And now you need to click on next.
4. Now in here, you will see few options where it will ask for the name of the virtual machine and its initial location. So while choosing the name be careful because it will be used as a label in all of your virtual machine tools like Hyper-V Manager, Failover Cluster Manager, and PowerShell. And if you are giving any names of the guest operating system where it automatically set will not install. You also need to check the storage option of the virtual machine in a different location, and if you have not checked the option then all the virtual machine’s metadata like XML, BIN, VSV, and second-level paging files will not be stored in the default host’s location. So this path will be visible in the grayed out text box. But you can overcome this by checking the box that allows you to override this location. And if it is never held a virtual machine before, then name the subfolder as “Virtual Machines” and it will be created in the path that you specified. And in here you no need to worry about the folder because whether that folder is new or existing, another new subfolder will be created underneath it that will have the name of the automatically-generated GUID that represents the virtual machine. And even the security will automatically be configured for you.
5. Once after done with specify name and location next you need to you need to set the specify generation. In here you will be asked to choose the Generation of the virtual machine that you want. So generation 1 will operate in the traditional BIOS mode where it will be compatible will the virtual and also with any guest operating system. Not only that it also allows you to use the "legacy" hardware where it emulates the virtual network adapter and IDE hard disks. And in generation 2 virtual machines use the newer and latest UEFI standard and these are compatible with newer guest operating systems like Windows Server 2012, Windows 8, and recent Linux distributions. Not only that it also gives you a lot of new features.
6. Now in Assign memory, you need to set the preliminary memory settings for the virtual machine. And in here you have two option that is the amount of startup memory and whether or not you wish to Use Dynamic Memory for this virtual machine. So on the other hand if you do not wish to use dynamic memory then you can leave the box unchecked and you can proceed to set the startup memory to the amount of memory that you wish the virtual machine to have. Moreover, if you wish to use dynamic memory then you have to configure it minimums and maximums. But in here it will automatically set to 512 and 1TB, respectively. Note: if you are using Windows server 2012 and R2 then it will not install if the Startup memory is less than 1 gigabyte and you will get the error message stating the invalid license key, or insufficient memory.
7. In this configure networking you need to determine how to connect the virtual network adapter. If you want you can leave it as "Not Connected" which means the virtual machine will start without any network connectivity. Or else you can connect it to a virtual switch right away. But make sure that you can connect it to a virtual switch right away. Not only that you cant set any advanced options such as the VLAN. So whatever you choose this will adapter is always the newer synthetic adapter which cannot be used to PXE boot a Generation 1 virtual machine.
8. Now in this connect virtual hard disk option you will be asked to configure the first virtual hard disk for the virtual machine. And in here you will be having three options on your screen- First you need to build a new virtual hard disk file. And it will always be dynamically expanding and, in 2012+, and will always be VHDX. And unlike the virtual machine placement, the destination location will be specified on your screen and will be the exact placement of the generated VHDX file.
Second option-It allows you to connect an existing virtual hard disk. But currently, it cannot be used if it is attached to another virtual machine that is currently turned off, and the security of this virtual machine will be reset. Moreover, you cannot use this wizard to establish one of the new shared virtual hard disks; such virtual hard disks cannot be the boot disk of a virtual machine.
In the third option - is to not connect a virtual hard disk at all. And you cannot use this wizard to connect to a physical hard disk. Adverse to a myth that’s flowing, you can, in fact, use a physical disk as the primary disk for a Hyper-V virtual machine in recent versions. And this doesn’t change the fact that you should just stop using physical hard disks altogether.
9. In here Installation option it is ordered in the left-hand navigation pane of the wizard for good reason: it will only appear if you chose to create a new virtual hard disk. So the first option is to install an operating system and next you need to create the virtual machine with all of the previous settings and then does nothing else.
And in the second option, you need to install an operating system from a bootable CD/DVD-ROM, where it allows you to select an ISO image or, for a Generation 1 VM, connect the host’s physical optical drive directly to the virtual machine. And if you select this option the image or disc will be “inserted” into the virtual machine’s virtual optical drive and the virtual machine will be set to boot from it. And this option is used to use a virtual floppy disk which is only available on Generation 1 virtual machines, as the Generation 2 virtual machine does not allow virtual floppies. Not only that even the 1st Generation machines have an extremely rare circumstance. And you can easily create a virtual floppy image using Hyper-V Manager, but you will need a functioning virtual machine to work with it.
And in the third option, it sets the virtual machine to boot from a virtual network adapter. And if you have created a Generation 1 virtual machine, then it will cause a legacy virtual NIC to be created. And if you have created a Generation 2 virtual machine, no extra NIC is created.
10. Once everything is done the final screen is simply a confirmation and your last opportunity to go back and make any necessary changes.
And once after clicking on finish the wizard undertakes all of the options that you selected and creates the virtual machine. And the wizard will not turn the virtual machine on, so you have an opportunity to make any desired modifications beforehand. Note that there is no screen allowing you to select the number of virtual CPUs. All virtual machines are always created with only one.