esSJae's Virtualization Blog

Virtualization and other IT topics

Posts Tagged ‘Hyper-V’

VMGuest.iso for older Windows OSes in Win10/2016

Posted by essjae on March 2, 2017

If you’re playing around with older OSes in the latest versions of Hyper-V, you’re missing one thing, the Integration Components (IC).

With Win10/Server2016 they no longer include this ISO as the current “supported” OSes all get their IC viaWindows Update.

You can get the IC from Hyper-V 2012/2012R2 Server, a free download, here:

https://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2012-r2 (you’ll need to either find a way to extract it or install Hyper-V Server in a VM to get the vmguest.iso)

Or, if you’ve got a Windows 8/8.1/2012/2012R2 VM/system available with Hyper-V installed you’ll find it in the C:\windows\system32\ folder.

I’ve got a copy from Hyper-V 2012 R2 here: https://1drv.ms/u/s!AnbqFQxI6C6pidtRrLfIRLDSHKeYmw

No guarantees how long MS will allow it will stay up here, though it’s freely distributed with Hyper-V Server.

Posted in Virtualization, Hyper-V, Windows 8, W2012, Windows 2012, Windows 8.1, Windows 10, Windows 2012 r2, Windows 2016 | Tagged: , , , , | Leave a Comment »

Adding NAT to Hyper-V in Windows 10 and higher

Posted by essjae on March 10, 2016

I found about this new way to create a NAT virtual switch in Hyper-V, it’s a lot less work than my previously documented method here: https://smudj.wordpress.com/2015/05/14/windows-10-hyper-v-setting-up-networking-shared-and-bridged-options/

https://technet.microsoft.com/en-us/library/hh848455.aspx?f=255&MSPPError=-2147217396

New-VMSwitch

Creates a new virtual switch on one or more virtual machine hosts.

Syntax

Copy
Parameter Set: NetAdapterName
New-VMSwitch [-Name] <String> -NetAdapterName <String[]> [-AllowManagementOS <Boolean> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-EnableEmbeddedTeaming <Nullable [System.Boolean]> ] [-EnableIov <Boolean]> ] [-EnablePacketDirect <Nullable [System.Boolean]> ] [-MinimumBandwidthMode <VMSwitchBandwidthMode> {Default | Weight | Absolute | None} ] [-NATSubnetAddress <System.String> ] [-Notes <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NetAdapterInterfaceDescription
New-VMSwitch [-Name] <String> -NetAdapterInterfaceDescription <String[]> [-AllowManagementOS <Boolean> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-EnableEmbeddedTeaming <Nullable [System.Boolean]> ] [-EnableIov <Boolean]> ] [-EnablePacketDirect <Nullable [System.Boolean]> ] [-MinimumBandwidthMode <VMSwitchBandwidthMode> {Default | Weight | Absolute | None} ] [-NATSubnetAddress <System.String> ] [-Notes <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SwitchType
New-VMSwitch [-Name] <String> -SwitchType <VMSwitchType> {Private | Internal | External} [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-EnableEmbeddedTeaming <Nullable [System.Boolean]> ] [-EnableIov <Boolean]> ] [-EnablePacketDirect <Nullable [System.Boolean]> ] [-MinimumBandwidthMode <VMSwitchBandwidthMode> {Default | Weight | Absolute | None} ] [-NATSubnetAddress <System.String> ] [-Notes <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Example

New-VMSwitch -SwitchName "Virtual Switch" -SwitchType NAT -NATSubnetAddress "172.16.0.0/12"

Posted in Hyper-V, Uncategorized, Windows 10 | Tagged: , , , | 1 Comment »

Running Hyper-V Manager as a different user in Windows 10 (Runas)

Posted by essjae on February 10, 2016

I hit a small issue while working on building up a test SCCM/SCVMM lab in Hyper-V.

My primary system (call it One) has Windows 10 and is domain joined, but I’ve been doing the “Microsoft” thing and logging in with my “Microsoft” account instead of my local domain account.

I’ve got two Hyper-V hosts, one on Windows Server 2012 R2 and another running on Windows 10* (call it Two).  I’ve been able to launch my Hyper-V Manager on One and connect and manage the Hyper-V VMs on Server 2012.

However, I hit a roadblock trying to connect to Two.  The first thing I tried after failing and getting some error messages was to configure winrm.

On Two:

I opened an administrator PowerShell window and ran

winrm quickconfig

and followed the wizard and was able to start the winrm service and open the firewall.

On One:

Again in a administrator PowerShell window, I ran:

Enable-WSManCredSSP -role client -delegatecomputer two.mydomain.com

Failure!  I got a big text message in red that said to run winrm quickconfig.

This is odd, since I did none of this to connect to the Server 2012 Hyper-V instance.

I then shift+right-clicked on Hyper-V Manager and ran it with my domain credentials and it ran! Ah ha!  No problem, just create a runas shortcut for Hyper-V Manager.

C:\Windows\System32\runas.exe /user:mydomain\myusername /savecreds "%windir%\System32\mmc.exe "%windir%\System32\virtmgmt.msc""

Again, no joy.  Launching my new short-cut from a command prompt showed the error:

740: The requested operation requires elevation.

The command needs ADUC elevation, with some Googling** I finally found a solution, first launch a cmd prompt and then the command.  This allows you to receive the ADUC prompt and accept it.

C:\WINDOWS\system32\runas.exe /savecred /user:mydomain\myusername "cmd /c Start /B %windir%\System32\mmc.exe "%windir%\System32\virtmgmt.msc""

The path to the Hyper-V Manager icon is here:

%ProgramFiles%\Hyper-V\SnapInAbout.dll
...
*I don’t recall my logic in installing Windows 10 here instead of Server 2012…it may have just been laziness, an upgrade to Win10 from the previous Windows 8.1 OS that was installed.

 

**http://serverfault.com/questions/374342/run-active-directory-admin-center-as-another-user

Posted in Hyper-V, Uncategorized, Virtualization, Windows 10, Windows 2012 | Tagged: , , , , , , , | 1 Comment »

Windows 10 Hyper-V: Setting up Networking Shared and Bridged Options

Posted by essjae on May 14, 2015

Update:  It’s now a lot easier to create networks (using PowerShell) in Windows 10 Hyper-V:  https://smudj.wordpress.com/2016/03/10/adding-nat-to-hyper-v-in-windows-10-and-higher/

Update: Build 10586.3–Loopback adapter was missing, added back, and checked Hyper-V Extensible Virtual Switch.  This seems to happen with each build update.  A reboot may also be required.

This procedure shows you how to set up bridged and shared (NAT) networking with a single physical network card.

Standard Bridged Networking

  1. Start the Hyper-V Manager and click Virtual Switch Manager
  2. Select External and click Create Virtual Switch
  3. Enter Bridged or similar to identify this network as being on your physical network
  4. Select the correct network adapter under External network, this should be an active network card, i.e. one that is connected to your network and your host is using.
    1. If you only have one network card, verify that Allow management operating system to share this network adapter.
    2. If you have multiple network cards, and want to use this card exclusively for VMs, uncheck Allow management operating system to share this network adapter.
  5. Click OK and the new virtual switch will be created.
  6. Verify that you don’t have any ongoing network tasks before clicking yes, as your network connection will likely be disrupted when the virtual switch is created.
  7. This will create a network adapter under Network Connections called vEthernet (name_used), in this case, vEthernet (Bridged)

Shared Networking

Manually add a loopback adapter

  1. Open a cmd prompt with Administrator privileges.
    1. Type cmd, right-click on the search result and click Run as administrator
  2. Type hdwwiz and press enter
  3. add-new-hardware-wizard
  4. Click Next to start the wizard.
  5. Select Install the hardware that I manually select from a list (Advanced), and click
  6. Highlight Network Adapters, and click Next.
  7. Select Microsoft from the Manufacturer column and Microsoft KM-TEST Loopback Adapter from the Model column and click Next.
  8. ms-loopback
    1. Click Finish to complete the wizard.
    2. Open Network Connections (CTRL+X and select Network Connections), locate the newly created loopback adapter, right-click it and click Rename, and rename it from Ethernet 2 or Ethernet 3 to Loopback.

Create the Shared Virtual Network Switch in Hyper-V

  1. Open the Hyper-V Manager and click Virtual Switch Manager
  2. Select External and click Create Virtual Switch
  3. Enter a descriptive name, like Shared or NAT. This will create a network adapter under Network Connections called vEthernet (name_used), in this case, vEthernet (Shared)
  4. Select the Loopback adapter under the External Network selection box, click OK, then click Yes, this operation will not disrupt your host networking.

Connect the Loopback Adapter and Virtual Switch to the Network

  1. Open Network Connections (CTRL+X and select Network Connections)
  2. Click Change adapter settings
  3. Right-click and select Properties on the vEthernet (Bridged) network adapter created under Standard Bridged Networking.
  4. Click the Sharing
  5. Click Allow other network users to connect through this computer’s Internet connection.
  6. vEthernet(bridged)
  7. Select the Shared network connection, it should be listed as vEthernet (Shared), or whatever name was used in place of Bridged.
  8. Click Ok.

Note:  The Hyper-V networking is very fragile here, and you may need to reboot if you get errors when trying to connect and share the connections.

Here’s the completed Network Connections Window, note the Bridged and Shared Hyper-V adapters. Apologies for the pixelation, the Hyper-V Manager is not 4K screen friendly.

virtual_switches

Here’s two VMs using the Shared networking, note, the 192.168.137.x network, the default used by ICS.  Also shown is a third VM using the host network and the host’s IP.

IPconfigs-4

Posted in Computers, Hyper-V, Windows 10 | Tagged: , , , , | 2 Comments »

Windows 10 Hyper-V: Accessing ISOs from a Network Share

Posted by essjae on May 13, 2015

Keeping ISOs on a server/network share is a great way to save space for all your installation ISOs.  Unfortunately, Hyper-V does things a little different (it’s called constrained delegation) and can’t directly access an ISO file on a network share or mapped drive with your user account.  Hyper-V will ignore any mapped drives you’ve got, but with Windows 10 you can add a network location from Windows Explorer’s Computer tab (1). This makes it easy to get to a remote network share quickly.

You’ve got 2 options:

  1. Go to the ISO location and mount it as a physical drive. This tricks Hyper-V into thinking the disk is local and not network shared.  It works great for everything but Gen2.
  2. Constrained delegation configuration
    1. On a domain: this is easy, you just need to add your Hyper-V computer’s domain joined account to the network share.
      1. Go to the shared drive/folder and right-click–>Properties.
      2. Click the Sharing tab, click Advanced Sharing.
      3. Click Permissions, click Add.
      4. Click Object Types and select Computers, click OK.
      5. Enter the computer’s name, and click Check names, click OK to add.
    2. Workgroup/Microsoft accounts: this is a little more involved and care should be taken if this is used anywhere other than a home or lab network as you’re changing some security settings
      1. Go to Administrative Tools–>Local Security Policy, in Security Settings–>Local Policies–>Security Options change these settings:
        • Network Access: Do not allow anonymous enumeration of SAM accounts and shares – Change to: Disabled
        • Network Access: Let Everyone permissions apply to anonymous users – Change to: Enabled
        • Network Access: Restrict anonymous access to Named Pipes and Shares – Change to: Disabled
        • Network Access: Shares that can be accessed anonymously, add the name of the share on the Windows server, i.e. if the share name is “ISOs” add “ISOs” here. *I don’t have a non-Windows NAS, if you do and have found a solution for this, please let me know and I’ll post it

 

Footnote (1)

Notes:

  • Add a network share:
    1. Open This PC via the start menu, or Win+E.
    2. Click Computer, click Add a network location
    3. add-network-location
    4. Follow the Add Network Location Wizard to finish
      1. For a standard Windows share, use the syntax: \\servername\sharename replacing with the actual name of the server and share.

**Content created and tested on Windows 10 Pro Insider Preview Build 10074

Posted in Computers, Hyper-V, Virtualization, Windows 10 | Tagged: , , , , | Leave a Comment »

“Not enough memory” error message and Windows Phone 8 Emulator does not start in Windows 8.1

Posted by essjae on December 5, 2013

There is a recent KB that addresses some issues that have appeared every so often on the TechNet forums.  Since the WP8 emulator uses Hyper-V any related memory issues with running Hyper-V VMs on 8.1 should also be covered by this.

“Not enough memory” error message and Windows Phone 8 Emulator does not start in Windows 8.1

http://support.microsoft.com/kb/2911380

The Windows Phone 8 Emulator does not start on a computer that is running Windows 8.1 and that has fewer than 8 gigabytes (GB) of RAM if many programs are running at the same time. Additionally, you receive the following error message:
“The Windows Phone Emulator wasn’t able to ensure the virtual machine was running:

Something happened while starting a virtual machine: ‘Emulator Name’ could not initialize. (Virtual machine ID GUID)
Not enough memory in the system to start the virtual machine Emulator Name with ram size 1024 megabytes. (Virtual machine ID GUID)”

Additional troubleshooting can be found here:  https://smudj.wordpress.com/2013/02/22/troubleshooting-windows-8-and-hyper-vwindows-phone-8-emulator/

Posted in Hyper-V, Virtualization, Windows 8, Windows 8.1 | Tagged: , , , , , | 2 Comments »

Hyper-v Architecture Poster and Teaming Deployment and Management Guide available

Posted by essjae on October 22, 2013

Hyper-v Architecture Poster

http://www.microsoft.com/en-us/download/details.aspx?id=40732

Provides a visual reference for understanding key Hyper-V technologies in Windows Server 2012 R2 and focuses on Generation 2 virtual machines, Hyper-V with virtual hard disk sharing, online virtual hard disk resizing, storage quality-of-service, enhanced session mode, live migration, Hyper-V failover clustering, and upgrading your private cloud.

 

Windows Server 2012 R2 NIC Teaming Deployment and Management guide
http://www.microsoft.com/en-us/download/confirmation.aspx?id=40319

Download this document to learn how to deploy and manage NIC Teaming, a Windows Server 2012 R2 High Speed Networking component.

Posted in Hyper-V, Virtualization | Tagged: , , , | Leave a Comment »

HVRemote updated for Hyper-V v.3 including Windows 8, 8.1, Server 2012, and Server 2012 R2

Posted by essjae on September 25, 2013

HVRemote has been updated for Hyper-V v.3  for supported use with Windows 8.x and Windows Server 2012 and R2.

HVRemote reduces the manual configuration steps needed for Hyper-V Remote Management down to a few simple commands, and can diagnose common configuration errors.

http://code.msdn.microsoft.com/windowsdesktop/Hyper-V-Remote-Management-26d127c6

Supported Servers:

  • Windows Server 2008 SP1 with Hyper-V RTM update applied (KB950050), Core & Full installations
  • Windows Server 2008 SP2, Core & Full installations
  • Microsoft Hyper-V Server 2008 SP1 (already contains Hyper-V RTM update)
  • Microsoft Hyper-V Server 2008 SP2
  • Windows Server 2008 R2, Core & Full installations
  • Windows Server 2008 R2 SP1, Core & Full installations
  • Microsoft Hyper-V Server 2008 R2
  • Microsoft Hyper-V Server 2008 R2 SP1
  • Windows Server 2012 Core & Full installations (Version 1.x or later)
  • Microsoft Hyper-V Server 2012 (Version 1.x or later)
  • Windows 8 Pro & Enterprise x64 with Hyper-V enabled (Version 1.x or later)
  • Windows Server 2012 R2 Core & Full installations (Version 1.08 or later)
  • Microsoft Hyper-V Server 2012 R2 (Version 1.08 or later)
  • Windows 8.1 x64 Client Hyper-V (Version 1.08 or later)

Posted in Hyper-V, Virtualization, W2012, W2K8R2, Windows, Windows 2012, Windows 8 | Tagged: , , , , , | 3 Comments »

Configuring wide screen resolutions in a Hyper-V virtual machine

Posted by essjae on July 15, 2013

Ben’s got the hot news again.  Need to configure your Hyper-V Machine for widescreen: http://blogs.msdn.com/b/virtual_pc_guy/archive/2013/07/09/configuring-wide-screen-resolutions-in-a-hyper-v-virtual-machine.aspx

Essentially:

  1. Right click on the desktop of the virtual machine and select Screen Resolution
  2. Select Advanced Settings
  3. Click List All Modes
  4. Choose the screen resolution that you want and click OK

Hit Ben’s blog for screen shots

Posted in Hyper-V, Virtualization, Windows 2012 | Tagged: , , , | 2 Comments »

Hyper-V Administrators Group Missing from Windows 8

Posted by essjae on May 22, 2013

There was a recent post on the TechNet forums regarding this.

There is also a similar post on the answers.microsoft.com group

 

VPCGuy Ben Armstrong’s blog has PowerShell scripts to resolve this.

http://blogs.msdn.com/b/virtual_pc_guy/archive/2010/09/28/creating-a-hyper-v-administrators-local-group-through-powershell.aspx

http://blogs.msdn.com/b/virtual_pc_guy/archive/2010/09/28/creating-a-hyper-v-administrators-local-group-through-powershell.aspx

 

Thanks to MikePayne81 and VPCGuy Ben!

Posted in Hyper-V, Virtualization, Windows 8 | Tagged: , , , | Leave a Comment »