{"id":1861,"date":"2016-09-04T09:53:54","date_gmt":"2016-09-04T14:53:54","guid":{"rendered":"http:\/\/swildow.darktech.org\/wp\/?p=1861"},"modified":"2016-09-04T10:02:14","modified_gmt":"2016-09-04T15:02:14","slug":"1861","status":"publish","type":"post","link":"https:\/\/www.wildow.com\/blog\/?p=1861","title":{"rendered":""},"content":{"rendered":"<p>There are many design considerations that can dictate how to build your virtual machines (VMs), but a major consideration is storage. This post will focus on using virtual hard disks (VHDs) stored locally on the hypervisor\u2014either through direct attached disks, shared storage, or a highly available cluster shared volumes (CSVs). Accessing storage directly from the VM via iSCSI targets or Fiber Channel mounts was popular prior to Hyper-V 2012. Often times, the case for this design was due to the 2 TB VHD limit imposed by all major hypervisor vendors. With Hyper-V 2012 and VMWare 5.5, this limit has been increased to 64 TB!<\/p>\n<p>Microsoft SQL Server can demand high input\/output (IO) and uses several different disks for multiple types of workloads. This guide will walk through building a SQL Server with different VHDs on separate controllers. These VHDs <em>should not<\/em> <em>be stored<\/em> on the same storage device if you want to maintain a high level of performance, unless it is an all-flash array. If you deploy to a Storage Space or a SAN, use multiple arrays across separate sets of spindles to spread the IO. Designing that kind of architecture is a career in itself!<\/p>\n<p>The Hyper-V 2012 R2 environment can be controlled (preferably) from any Windows 8.1 workstation. To do this, install the <a href=\"http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=39296\">RSAT Tools<\/a> on your local workstation. Run Hyper-V Manager and connect to your hypervisor. Alternatively, Remote Desktop into the hypervisor and use Hyper-V Manager to connect to the local computer.<\/p>\n<h3><strong>LET\u2019S BEGIN WITH A BASIC VIRTUAL MACHINE CONFIGURATION<\/strong><\/h3>\n<p>1. \u00a0Click <strong>New &gt; Virtual Machine\u2026<\/strong> A wizard will open and walk you through the process. For the steps below, configure the indicated page as described and click <strong>Next.<\/strong><\/p>\n<p><a href=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/HyperV-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10952\" src=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/700x220xHyperV-1.png.pagespeed.ic.eMKmKC0ydZ.webp\" alt=\"HyperV 1\" width=\"700\" height=\"220\" data-pagespeed-url-hash=\"2314295662\" \/><\/a><\/p>\n<p>2.<strong> \u00a0Specify Name and Location<\/strong>: Choose a name for the new VM and choose where to store the VM if desired.<\/p>\n<p><a href=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/HyperV-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10953\" src=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/700x526xHyperV-2.png.pagespeed.ic.VO4ddvoVpl.webp\" alt=\"HyperV 2\" width=\"700\" height=\"526\" data-pagespeed-url-hash=\"2608795583\" \/><\/a><\/p>\n<p>3.<strong> VM Generation<\/strong>: If using Hyper-V 2012 <strong>R2<\/strong>, choose Generation 2 if you do not plan to move this VM to a Hyper-V 2012 or earlier server.<\/p>\n<p><a href=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/HyperV-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10954\" src=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/700x526xHyperV-3.png.pagespeed.ic.GNhuXGWur8.webp\" alt=\"HyperV 3\" width=\"700\" height=\"526\" data-pagespeed-url-hash=\"2903295504\" \/><\/a><\/p>\n<p>4.<strong> Assign Memory<\/strong>: Choose how much memory to assign the VM and <strong>do <em>not<\/em> choose Dynamic Memory<\/strong>. 4 GB is a good starting point for most servers prior to running SQL Server with any expected workload. Remember to size the memory correctly after you know how much memory is required.<\/p>\n<p><a href=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/HyperV-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10955\" src=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/700x526xHyperV-4.png.pagespeed.ic.3fW_frpnHf.webp\" alt=\"HyperV 4\" width=\"700\" height=\"526\" data-pagespeed-url-hash=\"3197795425\" \/><\/a><\/p>\n<p>5.<strong> Configure Networking<\/strong>: Choose the proper network switch.<\/p>\n<p><a href=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/HyperV-5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10956\" src=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/700x526xHyperV-5.png.pagespeed.ic.dG4rxDkstB.webp\" alt=\"HyperV 5\" width=\"700\" height=\"526\" data-pagespeed-url-hash=\"3492295346\" \/><\/a><\/p>\n<p>6.<strong> Connect Virtual Hard Disk<\/strong>: Choose where to create a new VHD, select an existing one, or choose to wait until later to attach a VHD. If you chose to create a new VHD, choose from where to install the operating system.<\/p>\n<p>Recommendation: Name the VHD \u201c[HOSTNAME]-BOOT.vhdx\u201d to identify the owner of the drive and provide a simple description.<\/p>\n<ul>\n<li>Do this for <em>all disks<\/em>, even if added later, to ease maintenance of the system.<\/li>\n<li>Storage Live Migration allows the Hyper-V Administrator to move VHDs around the system without downtime.<\/li>\n<li>A simple naming scheme will help you identify VHDs and confirm they are properly located.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/HyperV-6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10957\" src=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/700x526xHyperV-6.png.pagespeed.ic.zE5z28Yiq9.webp\" alt=\"HyperV 6\" width=\"700\" height=\"526\" data-pagespeed-url-hash=\"3786795267\" \/><\/a><\/p>\n<p>7.<strong> Summary<\/strong>: Verify the settings you chose in the summary and click <strong>Finish<\/strong> to create the VM.<\/p>\n<h3>MORE ADVANCED SETTINGS OF THE VM<\/h3>\n<p>8. From the middle pane in Hyper-V Manager, click on the VM you just created and click<strong>Settings\u2026<\/strong> on the lower right.<\/p>\n<p><a href=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/HyperV-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10958 size-medium\" src=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/xHyperV-7-222x300.png.pagespeed.ic.BtcGaIIN2_.webp\" alt=\"HyperV 7\" width=\"222\" height=\"300\" data-pagespeed-url-hash=\"332769920\" \/><\/a><\/p>\n<p>9.<strong> Add Hardware: <\/strong>Select SCSI Controller and add three new SCSI controllers. Multiple controllers allow more distribution of disk queues and IO. This design works best when you can put each controller on its own storage array.<\/p>\n<p><a href=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/HyperV-8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10959\" src=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/700x661xHyperV-8.png.pagespeed.ic.yPBThORB3Z.webp\" alt=\"HyperV 8\" width=\"700\" height=\"661\" data-pagespeed-url-hash=\"80827813\" \/><\/a><\/p>\n<p>a)\u00a0\u00a0\u00a0 First Controller: Add two VHDs and one DVD Drive<\/p>\n<ol>\n<li>SQL01-Boot.vhdx (dynamically provisioned)<\/li>\n<li>SQL01-Programs.vhdx (dynamically provisioned)<\/li>\n<li>DVD drive (likely used later in the lifetime of this server)<\/li>\n<\/ol>\n<p>b)\u00a0\u00a0\u00a0 Second Controller: Add two VHDs<\/p>\n<ol>\n<li>SQL01-Data.vhdx (fixed size, 150% of your current data set<\/li>\n<li>SQL01-Logs.vhdx (fixed size, 50% of your data set)<\/li>\n<\/ol>\n<p>c)\u00a0\u00a0\u00a0\u00a0 Third Controller: add two VHDs<\/p>\n<ol>\n<li>SQL01-TEMPDB-DATA.vhdx (fixed size)<\/li>\n<li>SQL01-TEMPDB-LOGS.vhdx (fixed size, 25% of TEMPDB-DATA)<\/li>\n<\/ol>\n<p>d)\u00a0\u00a0\u00a0 Fourth Controller: add one VHD<\/p>\n<ol>\n<li>SQL01-Backups.vhdx (fixed size, 5X data set or sufficient size to contain local backups to meet recovery point objectives)<\/li>\n<\/ol>\n<p>e)\u00a0\u00a0\u00a0 Review your disk layout and confirm the design matches your requirements.<\/p>\n<p><a href=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/HyperV-9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10960 size-medium\" src=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/xHyperV-9-184x300.png.pagespeed.ic.7acp-aGeR0.webp\" alt=\"HyperV 9\" width=\"184\" height=\"300\" data-pagespeed-url-hash=\"1467245645\" \/><\/a><\/p>\n<p>10.<strong> Processor:<\/strong> At a minimum, <a href=\"http:\/\/blog.credera.com\/infrastructure\/right-way-build-small-sql-server\/\">use four virtual processors<\/a>.<\/p>\n<p>a)\u00a0\u00a0\u00a0 In multi-socket servers, expand processors and click NUMA.<\/p>\n<p>b)\u00a0\u00a0\u00a0 Set the number of processors per NUMA node to match the number of cores per processor on the host (not including hyper-threading).<\/p>\n<p><a href=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/HyperV-10-.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10961\" src=\"https:\/\/www.credera.com\/wp-content\/uploads\/2014\/10\/700x494xHyperV-10-.png.pagespeed.ic.Aty6YE_f1w.webp\" alt=\"HyperV 10\" width=\"700\" height=\"494\" data-pagespeed-url-hash=\"1514470355\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>11.<strong> Boot your VM<\/strong>: Install Windows Server 2012 R2.<\/p>\n<p>This post will get you started on the right foot when building a new VM with requirements for both high IO and high number of disks. It is very important to get the VM built correctly from the start, as making these changes to a current VM can be risky. Windows may mount the disks with new numbers (e.g. Disk 3 is remounted as Disk 7) and then re-allocate drive letters. SQL Server <em>is not a fan<\/em> of having drive letters changed!! Ask me how I know that\u2026<\/p>\n<p>To contact a Hyper-V Ninja, email\u00a0<a href=\"mailto:info@credera.com\">info@credera.com<\/a>, or call 972.759.1836. For more information on Microsoft Server 2012 R2 and SQL Server 2012\/2014, please visit our blog or follow us at\u00a0<a href=\"http:\/\/www.twitter.com\/crederaMSFT\">@CrederaMSFT<\/a>\u00a0and <a href=\"http:\/\/www.twitter.com\/crederaIT\">@CrederaIT<\/a>.<\/p>\n<p><span style=\"border-radius: 2px; text-indent: 20px; width: auto; padding: 0px 4px 0px 0px; text-align: center; font: bold 11px\/20px 'Helvetica Neue',Helvetica,sans-serif; color: #ffffff; background: #bd081c  no-repeat scroll 3px 50% \/ 14px 14px; position: absolute; opacity: 1; z-index: 8675309; display: none; cursor: pointer;\">Save<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many design considerations that can dictate how to build your virtual machines (VMs), but a major consideration is storage. This post will focus on using virtual hard disks (VHDs) stored locally on the hypervisor\u2014either through direct attached disks, &#8230; <a class=\"more-link\" href=\"https:\/\/www.wildow.com\/blog\/?p=1861\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-1861","post","type-post","status-publish","format-standard","hentry","category-hyperv"],"_links":{"self":[{"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1861","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1861"}],"version-history":[{"count":3,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1861\/revisions"}],"predecessor-version":[{"id":1863,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1861\/revisions\/1863"}],"wp:attachment":[{"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1861"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1861"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}