Windows

Hyper-V Virtualization: Turning Hyper-V On and Off

I recently started using Hyper-V on my Windows 10 workstation to task advantage of using technologies such as Docker that leverages Hyper-V to run its container images.  I also run VMware Player for running virtual machines.

The following commands make it a simpler task to toggle Hyper-V on and off again.

To Turn Hyper-V off, run the following command then restart your computer:

bcdedit /set hypervisorlaunchtype off

To turn Hyper-V back on, run the following command then restart your computer:

bcdedit /set hypervisorlaunchtype on (or auto start)

 

Note:  Quick method to check the status of Hyper-V – Get-WindowsOptionalFeature -Online -FeatureName *hyper*

Microsoft: Meltdown and Spectre Check via PowerShell

Like many folks around the world, I was wondering if this Meltdown and Spectre flaw would impact my computers and virtual machines.  Microsoft has started to release emergency fixes for Windows 10 and its been said that Windows 8 and legacy 7 will also receive patches.

Microsoft has released a PowerShell script that lets users check whether they have protection in place.

Steps to take:

  1. Open PowerShell (I like to use PowerShell ISE)
  2. Run PowerShell as as Administrator.
  3. Type Install-Module SpeculationControl and press Enter.
  4. When the installation completes, type Import-Module SpeculationControl and press Enter.
  5. Type Get-SpeculationControlSettings and press Enter.

In the list of results that’s displayed, you’re looking to see that a series of protections are enabled — this will be listed as True.  Ref: https://support.microsoft.com/en-us/help/4073119/protect-against-speculative-execution-side-channel-vulnerabilities-in

Should reassemble 

Speculation control settings for CVE-2017-5715 [branch target injection]

  • Hardware support for branch target injection mitigation is present: True
  • Windows OS support for branch target injection mitigation is present: True
  • Windows OS support for branch target injection mitigation is enabled: True

Speculation control settings for CVE-2017-5754 [rogue data cache load]

  • Hardware requires kernel VA shadowing: True
  • Windows OS support for kernel VA shadow is present: True
  • Windows OS support for kernel VA shadow is enabled: True
  • Windows OS support for PCID optimization is enabled: True

 

 

 

Enabling Hyper-V for use on Windows 10

You all know when it comes to virtualization I am VMware all the way.  However, it has recently to my attention that the use of VMware Player on a company issued computer may be a violation of the EULA as this type of activity would be considered commercial use of the software.

So the option is to purchase a license or use the native Virtualization built into my Windows 10.

Ref: Workstation Player FAQs

  • Here are some capabilities of Windows 10 virtualization:
  • Hot add & remove for memory and network adapters: Windows and Linux Guests
  • Windows PowerShell Direct: Issue commands inside a virtual machine from the host
  • Linux secure boot:  – Ubuntu and SUSE Linux Enterprise Server can use secure boot options
  • Hyper-V Manager: Hyper-V manager can manage computers running Hyper-V on Windows Server 2012, Windows Server 2012 R2 and Windows 8.1

 

Prerequisites

The following prerequisites are required to successfully run Hyper-V on Windows 10:

Windows 10 Pro or Enterprise 64 bit Operating System
64 bit processor with Second Level Address Translation (SLAT)
4GB system RAM at minimum
BIOS-level Hardware Virtualization support

 

Windows 10 Hyper-V Install Steps:

  1. Enable virtualization support in bios
  2. Access the Control Panel
  3. From Control Panel select Programs
  4. In Windows Features select Hyper-V
  5. After installation of Hyper-V has completed, restart computer

The installation of Hyper-V is now complete.  The next step is to setup the Virtual Switch Manager for networking and configure your first virtual machine. This is can be done by:

  1. Clicking the search icon on the task-bar and then typing Hyper-V Manager .
  2. Select Virtual Switch Manager in the Actions pane
  3. Choose External and then click on the Create Virtual Switch button
  4. Give the new Virtual Switch a name, and ensure the active NIC is selected

 

Tech Short: How-To WDS Server Role – Server 2016

 

Background:

Windows Deployment Services (WDS) is a service role that allows you to deploy operating systems to the PXE supported clients without the need of physical media.

Requirements:

  • Windows Server 2016 Server Install
  • Administrative rights on Server

Install of Windows Deployment Service

  1. On the Server Manager tool, click Manage, and then click Add Roles and Features.
  2. Accept the default selections and click Next until you get the Select server roles page.
  3. On the Select server roles page, as shown in the following figure, select the Windows Deployment Services check box.
  4. On the Add Roles and Features Wizard window, click Add Features.
  5. Accept the default selections and click Next, until you get the Confirm installation selections page.
  6. Click Install to complete the installation.

Video:

 

Done – Next up is to configure WDS

 

 

 

Tech Short: How To Change The MTU – Server 2016

 

Troubleshooting an application issues which could possibly be network related.  I found myself needing to make some adjustment to the maximum transmission unit (MTU) setting of my server.  As such what better time to post a quick technical short on how to go about doing this.

 

How To Change The MTU – Windows Server 2016

Requirements:

  • Logon and Administrator permission on Server
  • Network Connectivity
  • Time to reboot

 

Procedure:

From the desktop of your Windows Server 2016 server open an Administrative command prompt by Right-Clicking on the start button and select  – Command Prompt (Admin).

Once in the command prompt you we be using netsh to determine the IDX of the installed interface devices. this is performed by using the following command:  netsh interface ipv4 show interfaces

Take note of the IDX interface that you would like to change the MTU on as this is what we need to specify when changing the MTU settings.

Using netsh again you issue the following command: netsh interface ipv4 set subinterface “number-goes-here” mtu=1400 store=persistent

Please note that the subinerface will be the IDX number from the first netsh command and that the MTU setting is a value less than the original 1500.

Now you can reboot to have the changes take effect.  I have also noticed the disabling the interface and  re-enabling also works.