{"id":19516,"date":"2016-05-16T15:34:31","date_gmt":"2016-05-16T14:34:31","guid":{"rendered":"https:\/\/aidanfinn.com\/?p=19516"},"modified":"2016-05-16T15:39:12","modified_gmt":"2016-05-16T14:39:12","slug":"playing-with-ws2016-hyper-v-nested-virtualization-nano-set-and-powershell-direct","status":"publish","type":"post","link":"https:\/\/aidanfinn.com\/?p=19516","title":{"rendered":"Playing with WS2016 Hyper-V &#8211; Nested Virtualization, Nano, SET, and PowerShell Direct"},"content":{"rendered":"<p>I have deployed Technical Preview 5 (TP5) of Windows Server 2016 (WS2016) to most of the hardware in my lab. One of the machines, a rather old DL380 G6, is set up as a standalone host. I\u2019m managing it using Remote Server Administration Toolkit (RSAT) for Windows 10 (another VM).<\/p>\n<p>I enabled Hyper-V on that host. I then deployed a 4 x Generation 2 VMs using Nano Server (domain pre-joined using .djoin files) &#8211; this keeps the footprint tiny and the boot times are crazy fast.<\/p>\n<p>Hyper-V is enabled in the Nano VMs &#8211; thanks to the addition of nested virtualization. I\u2019ve also clustered these machines. Networking-wise, I have given each VM 2 x vNICs, each with MAC spoofing (for nested VMs) and NIC teaming enabled.<\/p>\n<p>I launched PowerShell ISE then used Enter-PSSession to connect to the host from the admin PC. And from the host, I used Enter-PSSession -VMName to use PowerShell Direct to get into each VM &#8211; this gives me connectivity without depending on the network. That\u2019s because I wanted to deploy Switch Embedded Teaming (SET) and provision networking in the Nano VMs. This script configure the VMs each with 3 vNICs for the management OS, connected to the vSwitch that uses both of the Nano VMs vNICs as teamed uplinks:<\/p>\n<pre class=\"lang:default decode:true\">$idx = 54\r\n\r\nNew-VMSwitch -Name External -NetAdapterName \"Ethernet\",\"Ethernet 2\" -EnableEmbeddedTeaming $true -AllowManagementOS $false\r\n\r\nAdd-VMNetworkAdapter -ManagementOS -Name \"Management\" -SwitchName External\r\nAdd-VMNetworkAdapter -ManagementOS -Name \"SMB1\" -SwitchName External\r\nAdd-VMNetworkAdapter -ManagementOS -Name \"SMB2\" -SwitchName External\r\n\r\nSleep 10\r\n\r\nNew-NetIPAddress -InterfaceAlias \"vEthernet (Management)\" -IPAddress 172.16.2.$idx -PrefixLength 16  -DefaultGateway 172.16.1.1\r\nSet-DnsClientServerAddress -InterfaceAlias \"vEthernet (Management)\" -ServerAddresses \"172.16.1.40\"\r\n\r\nNew-NetIPAddress -InterfaceAlias \"vEthernet (SMB1)\" -IPAddress 192.168.3.$idx -PrefixLength 24\r\nNew-NetIPAddress -InterfaceAlias \"vEthernet (SMB2)\" -IPAddress 192.168.4.$idx -PrefixLength 24<\/pre>\n<p>Note: there\u2019s no mention of RDMA because I\u2019m working in a non-RDMA scenario &#8211; a test\/demo lab. Oh yes; you can learn Hyper-V, Live Migration, Failover Clustering, etc on your single PC now!<\/p>\n<p>And in no time, I had myself a new Hyper-V cluster with a tiny physical footprint, thanks to 4 new features in WS2016.<\/p>\n<div id=\"scid:0767317B-992E-4b12-91E0-4F059A8CECA8:dd4c0196-11e6-4b57-bc06-387a8acb0527\" class=\"wlWriterEditableSmartContent\" style=\"float: none; margin: 0px; display: inline; padding: 0px;\">Technorati Tags: <a href=\"http:\/\/technorati.com\/tags\/Windows+Server+2016\" rel=\"tag\">Windows Server 2016<\/a>,<a href=\"http:\/\/technorati.com\/tags\/Hyper-V\" rel=\"tag\">Hyper-V<\/a>,<a href=\"http:\/\/technorati.com\/tags\/PowerShell\" rel=\"tag\">PowerShell<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I have deployed Technical Preview 5 (TP5) of Windows Server 2016 (WS2016) to most of the hardware in my lab. One of the machines, a rather old DL380 G6, is set up as a standalone host. I\u2019m managing it using Remote Server Administration Toolkit (RSAT) for Windows 10 (another VM). I enabled Hyper-V on that &hellip; <a href=\"https:\/\/aidanfinn.com\/?p=19516\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Playing with WS2016 Hyper-V &#8211; Nested Virtualization, Nano, SET, and PowerShell Direct&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":19518,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[20],"tags":[181,87,137],"class_list":["post-19516","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hyper-v","tag-hyper-v","tag-powershell","tag-windows-server-2016"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/aidanfinn.com\/wp-content\/uploads\/2016\/05\/hypervnesting1.png","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/19516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19516"}],"version-history":[{"count":2,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/19516\/revisions"}],"predecessor-version":[{"id":19519,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/19516\/revisions\/19519"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/media\/19518"}],"wp:attachment":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}