{"id":2697,"date":"2014-09-11T09:21:08","date_gmt":"2014-09-11T14:21:08","guid":{"rendered":"http:\/\/www.poweradmin.com\/blog\/?p=2697"},"modified":"2015-10-21T13:14:48","modified_gmt":"2015-10-21T18:14:48","slug":"how-to-deploy-a-new-vm-on-hyper-v","status":"publish","type":"post","link":"https:\/\/www.poweradmin.com\/blog\/how-to-deploy-a-new-vm-on-hyper-v\/","title":{"rendered":"How to deploy a new VM on Hyper-V"},"content":{"rendered":"<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\">Now that we\u2019ve seen how to install and configure Hyper-V Server role on our Windows Server 2012 machine, it\u2019s time to deploy a new Virtual Machine using our virtualization product. Note that by now you should have a Windows Server 2012 running Hyper-V. If you haven\u2019t read the last article please read it <a href=\"http:\/\/www.ittrainingday.com\/2014\/08\/how-to-install-and-configure-hyper-v-on.html\" rel=\"nofollow\" target=\"_blank\">here<img class=\"extlink-icon\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/plugins\/external-links-nofollow-open-in-new-tab-favicon\/images\/extlink.png\"><\/a> before proceeding with this post. All settings were discussed in the last article so please take some time and read it before proceeding with this post. Let\u2019s say you\u2019ve set up everything in our virtualization infrastructure and now you want to build your Virtual Servers that will host most of your company\u2019s applications and services. In this article I will show you how to create and configure a new VM using Hyper-V. Once the VM has been turned on, the installation procedure for a Windows Server is identical to the operation that you\u2019ve been familiar with for some time now.<\/span><\/p>\n<h2><span style=\"font-family: verdana,geneva; font-size: 12pt; color: #3366ff;\">Create a New Virtual Machine<\/span><\/h2>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\">Without any delays let\u2019s open our Hyper-V console and create a new VM. You will need to navigate to your <i>Hyper-V node<\/i>, <i>right click<\/i> it and select <i>New<\/i>, <a title=\"Monitoring VMWare ESX Hosts\" href=\"\/help\/sm_5_6\/config_monitor_esx.aspx\"><i>Virtual Machine<\/i><\/a>. You can also use the <i>Actions<\/i> menu from the right side of the panel:<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><a href=\"\/blog\/wp-content\/uploads\/2014\/09\/hyper-v-manager.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2700 size-full\" title=\"Hyper-V Manager\" src=\"\/blog\/wp-content\/uploads\/2014\/09\/hyper-v-manager.png\" alt=\"Hyper-V Manager\" width=\"822\" height=\"436\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/hyper-v-manager.png 822w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/hyper-v-manager-300x159.png 300w\" sizes=\"auto, (max-width: 822px) 100vw, 822px\"><\/a><\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\">You will need to set a name for the Virtual Machine and select its location if you haven\u2019t configured a repository for your Servers:<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2701 size-full\" title=\"New Virtual Machine Wizard\" src=\"\/blog\/wp-content\/uploads\/2014\/09\/new-virtual-machine-wizard.png\" alt=\"New Virtual Machine Wizard\" width=\"717\" height=\"538\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/new-virtual-machine-wizard.png 717w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/new-virtual-machine-wizard-300x225.png 300w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\"><\/span><\/p>\n<h2><span style=\"font-family: verdana,geneva; font-size: 12pt; color: #3366ff;\">Specifying Generation and the Amount of Memory<\/span><\/h2>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\">In the following section you will have to select one of the two available VM generations. The first generation was introduced in previous versions of Hyper-V and thi<\/span><span style=\"font-family: verdana,geneva; font-size: 12pt;\">s was the only one available until now.<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2707 size-full\" title=\"Virtual Machine - Specify Generation\" src=\"\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-specify-generation.png\" alt=\"Virtual Machine - Specify Generation\" width=\"716\" height=\"537\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-specify-generation.png 716w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-specify-generation-300x225.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\"><\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\">The second generation brings some new features while dropping older ones. The new generation has a different firmware and new devices. For example, instead of the PCAT Bios used in the first generation, this new technology uses a UEFI firmware. It also dropped the IDE controller, S3 Video, floppy controller, i8042 keyboard controller, PS\/2 mouse, the Programmable Interrupt Timer (PIT), the Programmable Interrupt Controller (PIC), the Super I\/O device. Instead of all these older features, new devices were added with increased capabilities. I\u2019m not familiar with some of these technologies so instead I will give you a reference link to an interesting article describing <a title=\"Hyper-V generation 2 VM\" href=\"http:\/\/blogs.technet.com\/b\/jhoward\/archive\/2013\/10\/24\/hyper-v-generation-2-virtual-machines-part-1.aspx\" target=\"_blank\" rel=\"nofollow\">Hyper-V generation 2 VM<img class=\"extlink-icon\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/plugins\/external-links-nofollow-open-in-new-tab-favicon\/images\/extlink.png\"><\/a>. The security component has been revised and the new generation of VMs has a lower attack surface. Note that you cannot change the generation<\/span><span style=\"font-family: verdana,geneva; font-size: 12pt;\"> of your Virtual Machine once you\u2019ve deployed the Server.<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\">You will have to set the amount of memory that your new <a title=\"Server monitoring\" href=\"\/servermonitor\/features.aspx?ref=blog\" target=\"_blank\">Server<\/a> will use. For demonstration purposes I will create a VM with 512 MB of RAM since I\u2019m already using a VM running Hyper-V and I have hardware limitations.<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2702 size-full\" title=\"Virtual Machine - Assign Memory\" src=\"\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-assign-memory.png\" alt=\"Virtual Machine - Assign Memory\" width=\"715\" height=\"535\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-assign-memory.png 715w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-assign-memory-300x224.png 300w\" sizes=\"auto, (max-width: 715px) 100vw, 715px\"><\/span><\/p>\n<h2><span style=\"font-family: verdana,geneva; font-size: 12pt; color: #3366ff;\">Network Configuration<\/span><\/h2>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\">An important step when creating a new VM is the networking configuration part. You will need to select a device that will bind to the VM network adapter. You can select a virtual switch connected to your physical interface or create a new virtual switch. We\u2019ve talked about these components in a <a href=\"http:\/\/www.ittrainingday.com\/2014\/08\/how-to-install-and-configure-hyper-v-on.html\" target=\"_blank\" rel=\"nofollow\">previous<img class=\"extlink-icon\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/plugins\/external-links-nofollow-open-in-new-tab-favicon\/images\/extlink.png\"><\/a> article.<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2703 size-full\" title=\"Virtual Machine - Configure Networking\" src=\"\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-configure-networking.png\" alt=\"Virtual Machine - Configure Networking\" width=\"712\" height=\"536\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-configure-networking.png 712w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-configure-networking-300x225.png 300w\" sizes=\"auto, (max-width: 712px) 100vw, 712px\"><\/span><\/p>\n<h2><span style=\"font-family: verdana,geneva; font-size: 12pt; color: #3366ff;\">Connecting a Storage Device<br>\n<\/span><\/h2>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\">A <a title=\"Storage Monitoring\" href=\"\/storage-monitor\/features.aspx\">storage device<\/a> must be connected to your Virtual Machine. You have three methods available: <i>create a new virtual hard disk<\/i>,<i> use an existing virtual hard disk <\/i>or<i> attach a virtual hard disk later. <\/i>I will choose the first option and create a new 10 GB virtual hard drive on my local disk.<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2704 size-full\" title=\"Virtual Machine - Connect Virtual Hard Disk\" src=\"\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-connect-virtual-hard-disk.png\" alt=\"Virtual Machine - Connect Virtual Hard Disk\" width=\"712\" height=\"535\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-connect-virtual-hard-disk.png 712w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-connect-virtual-hard-disk-300x225.png 300w\" sizes=\"auto, (max-width: 712px) 100vw, 712px\"><\/span><\/p>\n<h2><span style=\"font-family: verdana,geneva; font-size: 12pt; color: #3366ff;\">Choosing an Installation Option<br>\n<\/span><\/h2>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\">In the last part of this operation you will need to choose an installation option from the following:<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><i>Install an operating system later<\/i><\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><i>Install an operating system f<\/i><\/span><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><i>rom a bootable image file<\/i><\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><i>Install an operating system from a network-based installation server<\/i><\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\">Based on your needs you can further proceed with the OS Installation. I want to show you how to deploy a new Server using WDS once you\u2019ve created a new Virtual Machine using Hyper-V so I will not install the Operating System right now.<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2706 size-full\" title=\"Virtual Machine - Installation Options\" src=\"\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-installation-options.png\" alt=\"Virtual Machine - Installation Options\" width=\"715\" height=\"536\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-installation-options.png 715w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-installation-options-300x224.png 300w\" sizes=\"auto, (max-width: 715px) 100vw, 715px\"><\/span><\/p>\n<h2><span style=\"font-family: verdana,geneva; font-size: 12pt; color: #3366ff;\">Virtual Machine Summary<br>\n<\/span><\/h2>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\">A<\/span><span style=\"font-family: verdana,geneva; font-size: 12pt;\">t the end of the Wizard there is a summary of the new Virtual Machine, make sure that everything is correct and proceed with the VM creation. Your new Server will appear in the Hyper-V Manager console, you can now start the <i>Server <\/i>by clicking the <i>Start <\/i>button from the <i>Actions <\/i>menu.<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2705 size-full\" title=\"Virtual Machine - Hyper-V Manager Console\" src=\"\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-hyper-v-manager-console.png\" alt=\"Virtual Machine - Hyper-V Manager Console\" width=\"862\" height=\"652\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-hyper-v-manager-console.png 862w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/virtual-machine-hyper-v-manager-console-300x226.png 300w\" sizes=\"auto, (max-width: 862px) 100vw, 862px\"><\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\">The whole process can be completed much faster using Windows Powershell. Hyper-V module is added to Powershell when you install this Server Role. Open up Powershell and type <i>Get-Module -ListAvailable<\/i> to view the modules available on your Windows Server. Now type <i>Import-Module Hyper-V <\/i>and then <i>Get-Command -Module Hyper-V <\/i>to view all available commands. To create a new VM you\u2019ll need to use the <i>New-VM<\/i> cmdlet. Check out its help page by typing <i>get-help New-VM -full<\/i>. To create an identical machine as the one we\u2019ve created earlier, you will need to type in the following:<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><i>New-VM -Name \u201cServer2\u201d -ComputerName SRV2 -Path C:\\VM\\Server2 -MemoryS<\/i><\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><i>tartupBytes 512MB -NewVHDPath C:\\VM\\Server2\\Server2.vhdx -NewVHDSizeBytes 10GB -Generation 2<\/i><\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2699 size-full\" title=\"Hyper-V Manager Windows Powershell\" src=\"\/blog\/wp-content\/uploads\/2014\/09\/hyper-v-manager-windows-powershell.png\" alt=\"Hyper-V Manager Windows Powershell\" width=\"842\" height=\"84\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/hyper-v-manager-windows-powershell.png 842w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/09\/hyper-v-manager-windows-powershell-300x29.png 300w\" sizes=\"auto, (max-width: 842px) 100vw, 842px\"><\/span><\/p>\n<p><span style=\"font-family: verdana,geneva; font-size: 12pt;\">That\u2019s about it for this article folks, I hope we\u2019ve covered all major aspects of VM creation in Hyper-V. We will talk about this technology in future articles that\u2019s why I hope this one will serve you well in learning new things about Hyper-V. Wish you all the best!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that we\u2019ve seen how to install and configure Hyper-V Server role on our Windows Server 2012 machine, it\u2019s time to deploy a new Virtual Machine using our virtualization product. Note that by now you should have a Windows Server 2012 running Hyper-V. If you haven\u2019t read the last article please read it here before [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":2714,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,10,9,8],"tags":[],"class_list":["post-2697","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general-it","category-how-to","category-power-admin","category-technical","category-windows"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/2697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/comments?post=2697"}],"version-history":[{"count":5,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/2697\/revisions"}],"predecessor-version":[{"id":4237,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/2697\/revisions\/4237"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media\/2714"}],"wp:attachment":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media?parent=2697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/categories?post=2697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/tags?post=2697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}