Hyper-v Service



 
Creating a Windows Server 2012 VM using the Hyper-v service on a Windows Server 2016 system.
 
    What we need before Install Hyper-V Service and create a virtual machine.
 
Prerequisites:

  • A user account with administrator permissions for the computer.
  • Enough memory to run all the virtual machines that you plan to run at the same time.
  • Software to install as the guest operating system for the virtual machine (ISO).


Step 1: Install Hyper-V.
 
    Install Hyper-V so you can create and run virtual machines on this computer. To install the Hyper-V role in Windows Server 2012 or Windows Server 2016. You can install the Hyper-V role from the Server Manager or by using Windows PowerShell.

 

Install the Hyper-V role by using Server Manager.

 

  1. In Server Manager, on the Manage menu, click Add Roles and Features.
  2. On the Before you begin page, verify that your destination server and network environment are prepared for the role and feature you want to install. Click Next.
  3. On the Select installation type page, select Role-based or feature-based installation and then click Next.
  4. On the Select destination server page, select a server from the server pool and then click Next.
  5. On the Select server roles page, select Hyper-V.
  6. To add the tools that you use to create and manage virtual machines make sure to check the box if it unchecked , click Add Features. On the Features page, click Next.
  7.  the Create Virtual Switches page, Virtual Machine Migration page, and Default Stores page, select the appropriate options.
  8. Virtual Machine Migration is basically allow the VM to between servers.
  9. On the Confirm installation selections page, select Restart the destination server automatically if required, and then click Install.
  10. When installation is finished, verify that Hyper-V installed correctly. Open the All Servers page in Server Manager, select a server on which you installed Hyper-V. Check the Roles and Features tile on the page for the selected server.

 

 
11. I like to restart my Server.
 

 

 

Step 2: Create a virtual machine.

You can create a virtual machine by using the wizard in Hyper-V Manager or by using Windows PowerShell. In my case I am using Hyper-V Manager.

To create a virtual machine in Hyper-V Manager.

1. Open Hyper-V Manager.

   
 2. From the navigation pane of Hyper-V Manager, select the computer running Hyper-V.

  3. From the Actions pane, click New > Virtual Machine.


4. Click Next in the New Virtual Machine wizard.



5. 
On the Specify Name and Location page, type an appropriate name, click Next.

 

 

6. On the Specify Generation page, choose the generation of this Virtual Machine, click Next.

7. On the Assign Memory page, specify enough memory to start the guest operating systemclick Next.

 

 

 

8. On the Configure Networking page, connect the virtual machine to the switch you created when you installed Hyper-Vclick Next.

 

  9. On the Connect Virtual Hard Disk page, choose the option that is appropriate for how you plan to install the guest operating system:
  • Create a virtual hard disk.
  • Use an existing virtual hard disk.
  • Attach a vitual hard disk later.

 

 
  10. On the Installation Options page, choose the option that is operate system:

 

 

    • Install an operating system later.
    • Install an operating system from a bootable Media.
      • CD/DVD Drive.
      • Image file (.iso). This is my option I choose.
    • Install an operating system from a bootable floppy disk.
    • Install an operating system from network-based installation server.
  • Install an operating system from a bootable Media Image file (.iso)
  • Click on Browse.

 

  • Select the location for the ISO you have, then click open.

 

 
    11. On the Summary page, verify your selections and then click Finish.

 

 

 

 

Completing the New Virtual Machine Wizard.(Waiting)…
 

Step 3: Install the guest operating system.

This
step assumes that you configured the boot media for the virtual machine
when you created the virtual machine. It can’t be automated or done
within a Windows PowerShell session.

 

To install the guest operating system.

    • From Hyper-V Manager, in the Virtual Machines section of the results pane, right-click the name of the virtual machine and click Connect.
    • From the Action menu in the Virtual Machine Connection window, click Start.

 

    • Proceed through the installation.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
Step 4:  stuff you should know.
  1.  From the Hyper-V Manger, look at the VM’S, you get all the information you need about the VM you are running like, Name, State, CPU Usage, Assigned Memory, Uptime and status.

  2. From the Hyper-V Manger, look at the Checkpoints, you see how many Checkpoints you have or not have.
  3. From the Hyper-V Manger, look at the VM you select and you can see live window of the VM also Summary, Memory, Networking and Replication.
 
Best practice: 

 

 

  • On the VM Configuration, go to Management then Automatic Start Action,when the physical computer starts. I chose Automatic start delay 120 seconds. so it gives the physical computer be up and ruining without extra loading applications.
  • On the VM Configuration, go to Management then Automatic Stop Action, when the physical computer shuts down. I chose Save the Virtual Machine State.