Showing posts with label Hyper-V Server. Show all posts
Showing posts with label Hyper-V Server. Show all posts

Sunday, August 30, 2015

Setup Nano Server of Windows Server 2016 TP3 version on Hyper-V virtual machines

In one of  Microsoft Ignite 2015 sessions, Jeffrey Snover introduced a new Window Server installation option, Nano Server, on the Windows Server 2016 Technical Preview 2. In Windows Server 2016 Technical Preview 3, Microsoft attached 2 PowerShell scripts on the installation media to let administrators to create a new VHD of NanoServer easily. At this moment, Nano Server supports the following features:
  • Hyper-V Compute
  • Windows Containers
  • Storage Server (SOFS)
  • Failover Clustering


For more information what Nano Server supports, please read Getting Started with Nano Server.

In this post, I will try to create a Nano Server VHD by the scripts which are provided by Microsoft. Then, boot the Nano Server VHD and VHDX on a Hyper-V Server.
Lab environment
  • 1 x Windows Server 2012 R2 Hyper-V Server

1. Log in a Hyper-V server as administrator.
2. Launch PowerShell as administrator.
3. Navigate to installation DVD path \NanoServer.


4. Perform . .\new-nanoserverimage.ps1 to load the PowerShell function.


5. Perform New-NanoServerImage -MediaPath <Source path of installation DVD of folder> -BasePath <Temporary folder path for conversion> -TargetPath <Target folder path> -<Feature Name> -EnableIPDisplayOnBoot to create a Nano Server vhd.


This script prompted you to enter the local administrator password for the Nano Server.


Eventually, the Nano Server was created on the destination folder.


Then, you can create a Generation 1 virtual machine and then attach the virtual hard disk.

Remark: The current script, New-NanoServerImage, created the VHD with MBR boot partition so we need to use generation 1 virtual machine to mount it. To use generation 2 virtual machine for Nano Server, we can update this script manually to change to vhdx with GPT boot partition. Based on my testing, I updated the following line numbers of this script.

Line 611, 701, 707, 925






As a result, we can set up Nano Server on virtual machines. To manage Nano Servers, we can perform PowerShell cmdlet, Enter-PSSession, to connect and manage the Nano Servers.



This posting is provided “AS IS” with no warranties, and confers no rights!

Saturday, March 1, 2014

Managing Hyper-V dynamic MAC address pool

By default, the default value of dynamic MAC addresses is 256 in all versions of Hyper-V servers. 

How come the default is 256?

According to KB2804678, Hyper-V generates the MAC address by the following algorithm.
  • The first three octets (aa-bb-cc) are Microsoft's IEEE organizationally Unique Identifier, 00:15:5D (which is common on all Hyper-V hosts).
  • The next two octets (dd-ee) are derived from the last two octets of the server's IP address.
  • The last octet (ff) is automatically generated from the range 0x0 - 0xFF.
Because the last octet is an 8-bit value, there is a default limit of 256 possible MAC addresses.

1. To increase the MAC address pool, click "Virtual Switch Manager" in "Hyper-V Manager".


2. Next to "MAC Address Range".



Administrators can modify the MAC address pool from here.

3. Or, Administrators can assign a static MAC address for a virtual machine in Network Adapter.


More information:

This posting is provided “AS IS” with no warranties, and confers no rights!

Tuesday, January 28, 2014

Update the Windows Time Service settings of domain member servers in Hyper-V virtual machine

Normally, Windows Time service of domain member servers synchronizes a domain controller in domain environment. However, domain member servers are under virtual machine environment (Hyper-V). Virtual machines synchronize them time with the Hyper-V host server because the "Time synchronization" of "Integration Services" is enabled in virtual machines.


To verify the setting, we can log in as local administrator of a domain member server and then perform the "w32tm /query /source".


Now, the domain member server is synchronizing the time with the Hyper-V host server.

According "Time Synchronization in Hyper-V", the "Time synchronization" of "Integration Services" should be enabled in virtual machines. However, administrators can update the registry in virtual machines to stop W32Time from using the Hyper-V time synchronization integration service for moment-to-moment synchronization.

Goal
  • Update the Windows Time Service in a domain member server, TM01, to synchronize a domain controller
Lab

1. On TM01, log in as Local Administrator.
2. Launch "Registry Editor".
3. Navigate to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\VMICTimeProvider".
4. On right pane, double-click "Enabled".


5. Next to "Value data", change to "0".


6. Click "OK".


7. Close "Registry Editor".
8. Launch "Command Prompt" as administrator.
9. Perform "w32tm /config /syncfromflags:domhier /update" to update the setting to synchronize the time with a domain controller.


10. Perform "net stop w32time & net start w32time" to restart the Windows Time service.


11. Perform "w32tm /resync /force" to force synchronization.


12. Perform "w32tm /query /source" to verify the result.


As a result, the domain member server which is a virtual machine synchronize the time with a domain controller.

More information:

This posting is provided “AS IS” with no warranties, and confers no rights!

Tuesday, November 19, 2013

Disable Windows Firewall in Windows Server 2012 or Windows Server 2012 R2 by PowerShell

In Windows Server 2012 or Windows Server 2012 R2, we can disable Windows Firewall by PowerShell. By default, all profiles of Windows Firewall are "Enabled".


To disable Windows Firewall in one of the profiles, we can perform "Set-NetFirewallProfile -Enabled false - Name Public -PassThru" to disable firewall in "Public" profile.


To disable Windows Firewall in all profiles, we can perform "Get-NetFirewallProfile | Set-NetFirewallProfile -Enabled false -PassThru".


For more information:


This posting is provided “AS IS” with no warranties, and confers no rights!

Sunday, November 10, 2013

Installing Hyper-V Server 2012 R2

Microsoft Hyper-V Server is a standalone product released by Microsoft. You don't need to install any Windows Server version before installing it. It's no need any license and free to use it. The latest version of this is Microsoft Hyper-V Server 2012 R2. It supports the following features like BitLocker, Failover Cluster, Windows PowerShell and so on.


The Hyper-V server can be joined to the domain and can be managed by Server Manager.

It can be downloaded from here.

The hardware requirements of Hyper-V servers are:

Hyper-V requires a 64-bit processor that includes the following:

  • Hardware-assisted virtualization. This is available in processors that include a virtualization option - specifically processors with Intel Virtualization Technology (Intel VT) or AMD Virtualization (AMD-V) technology.
  • Hardware-enforced Data Execution Prevention (DEP) must be available and enabled. Specifically, you must enable Intel XD bit (execute disable bit) or AMD NX bit (no execute bit)

Reference:

To install Hyper-V Server 2012 R2, the steps are quite straightforward.

1. Boot-up and Insert the DVD of Hyper-V Server 2012 R2 into a physical server.
2. On "Install Microsoft Hyper-V Server" window, click "Next".


3. Click "Install now".


4. On "License terms" window, check "I accept the license terms".


5. Click "Next".
6. On "Which type of installation do you want" window, click "Custom: Install the newer version of Hyper-V Server only (advanced)".


7. On "where do you want to install Hyper-V Server" window, select the hard disk which you want to install the OS of Hyper-V Server 2012 R2 and then click "Next".


Now, the Hyper-V server are installing in the physical server.


 Then, the server will restart automatically.


8. When installation finished, you can enter the local administrator password of the Hyper-V server.




9. Now, we can change the computer name, IP addresses, join domain and so on in "sconfig".


As a result, the Hyper-V server was installed successfully.

Remark: If all the command prompts are closed, you can do the following tasks.

1. You can press "Ctrl" + "Alt" + "Delete" and then select "Task Manager". 


Click "More details".


3. On the menu of "Task Manager", click "File > Run new task".


4. On "Create new task" window, enter "cmd" and then click "OK".


Now, you can use the command prompt and then you can also enter "sconfig" to call the menu to configure your Hyper-V Server.



For more information:


This posting is provided “AS IS” with no warranties, and confers no rights!