Category: Virtualization

PowerShell Function to Determine the Hyper-V Host for a VM

This week, I thought I would share a PowerShell function that I wrote to determine what Hyper-V host server a VM (virtual machine) resides on. In this scenario, you have no idea which Hyper-V host a VM resides on. First off, let me say that this function is written a bit unorthodox. Typically you'll see functions written where each item in the ComputerName array is iterated through one at a time. Since this function uses the PowerShell remoting Invoke-Command Read more [...]

Convert, Resize, and Optimize VHD and VHDX files with PowerShell

I recently received an email from someone who attended one of my presentations asking if I had a blog article on using PowerShell to compact and optimize VHD files. Since I didn't have a blog article on that subject, I decided to create one. The process itself is fairly simple. The examples shown in this blog article are being run on a Windows 10 computer which has Hyper-V enabled on it. Only specific SKU's of Windows 10 are capable of running Hyper-V. The same process can be used on servers running Read more [...]

Use caution when updating to Windows 10 RTM with data deduplication enabled volumes

I recently decided to reload my computer, moving from Windows 8.1 Enterprise Edition to Windows 10 Enterprise Edition. I had previously enabled the data deduplication feature on my Windows 8.1 installation with an unsupported hack by using the source files from Server 2012 R2. Deduplication was enabled on my SSD drive for the VHDX files that I use for my test and demonstration environment that runs via Hyper-V VM's. In my opinion, Microsoft should support data deduplication on enterprise edition Read more [...]

Creating Hyper-V VM’s with Desired State Configuration

I'm looking to automate the build of my test environment that runs as Hyper-V virtual machines on my Windows 8.1 Laptop computer. To get started, I thought I would take a look at the xHyper-V DSC resource to create the actual VM's. There's also no reason this shouldn't work on a Windows Server that's running the Hyper-V role. The Hyper-V role has already been added to my Windows 8.1 computer. I also have a previously created virtual hard drive (vhdx) file that has been loaded with the Windows Read more [...]

PowerShell One-Liner: Create a new Hyper-V VM

My test environment resides on a workstation that runs Windows 8.1 Enterprise Edition with the Hyper-V role enabled. I need to create a new VM that will be used as a second domain controller in my test environment. I'll use a PowerShell one-liner to create this new VM which will use a differencing disk based on a Windows Server 2012 R2 vhdx that has been fully patched and syspreped: µ Read more [...]

PowerShell Function to Prevent Starting Hyper-V VM’s that are Connected to an External Network

Beginning with Windows 8 (Professional and Enterprise Edition), Hyper-V is available on workstations that have a processor that supports SLAT (Second Level Address Translation). For specifics about the requirements, see the Client Hyper-V blog article on Microsoft TechNet. That means you have a Hypervisor running right on your desktop or laptop computer for free. With the price of hardware these days, your regular everyday computer can be spec'd out with an i7 processor, 16 gigabytes of memory, and Read more [...]

Use PowerShell to Determine the Chain of VHD’s for a Virtual Machine on Hyper-V

You want to determine what VHD's exist for the virtual machines (VM's) that are virtualized on your Windows 8 or Windows Server 2012 Hyper-V virtualization host. This may sound simple, but what if you have a base image or template that has been configured and then multiple VM's have been created using differencing disks that reference that single base image? If that weren't difficult enough to keep track of, you may also have snapshots of those VM's which are also classified as differencing disks Read more [...]

Use PowerShell to Check for Processor (CPU) Second Level Address Translation (SLAT) Support

The hardware requirements for using Hyper-V to run virtual machines on a Windows 8 client states that a 64-bit system that has a processor (CPU) that supports Second Level Address Translation (SLAT) is required. A minimum of 4GB of RAM is also required. How do I know if my Processor (CPU) supports Second Level Address Translation? You could do like most blogs on the Internet state and use Coreinfo: You have two additional choices if you already have Windows 8 or Windows Server 2012 Installed. #1 Read more [...]

Hyper-V Live Merge Snapshot Feature in Windows Server 2012

One of the best new features I've noticed while testing Hyper-V on the release candidate of Windows Server 2012 is the ability to merge snapshots while a virtual machine is running without the need for a restart as was required by Hyper-V in Windows Server 2008 R2. The Windows 7 VM shown below is currently running and it has one snapshot: When a snapshot is created a .avhdx file is created and any changes from that point forward are written to it instead of the .vhdx file: Here are the files Read more [...]

Enabling Dynamic Memory for a Guest VM on Hyper-V

You've loaded SP1 on your Windows Server 2008 R2 Hyper-V virtualization host server and you're ready to begin using Dynamic Memory for your virtualization guest machines (VM's). Listed below is the minimum amount of changes required for your virtualization guest machines (VM’s) to be able to use dynamic memory: Set the VM to use Dynamic Memory by specifying a minimum and maximum amount of memory. The VM will need to be shutdown in order to change this setting and the settings will only Read more [...]

Number of Supported Virtual CPU’s for a Guest on Hyper-V

Question: How many virtual processors (virtual CPU's) are officially supported by Microsoft for a guest virtual machine (VM) running on Hyper-V? Answer: You may be thinking the answer to this question is four since that is the number you can assign to any guest VM, but the answer like many others in IT is that it depends. It depends on what guest operating system you're running. Windows Server 2003, Windows Vista, and Windows XP SP3 all officially support a maximum of two virtualized processors Read more [...]

Configure the Page File Size on Windows 2008 Server Core

I recently ran into an issue where I couldn't start any additional virtual machines on a Hyper-V server that was running Windows Server 2008 R2 Enterprise Edition - Core Installation (no GUI). After a little research, I determined that the operating system had created a pagefile of over 100 gigabytes in size which was using up the majority of the DAS in the server. The server has 96GB of RAM which is the reason why the operating system automatically configured such a large pagefile. The VM's are Read more [...]

Running the Dell System E-Support Tool (DSET) on Server Core

There are multiple reasons why you might want to run the Dell System E-Support Tool (DSET) on your Dell PowerEdge server. It could be because Dell Support has requested it or you’re trying to diagnose a problem or you simply want to know what version of BIOS your server is running without having to reboot it. This tool is especially useful when it comes to Windows Server 2008 R2 core installation since many other utilities will not run on server core. The DSET utility can be installed on server Read more [...]

Enabling Jumbo Frames for iSCSI on Server Core

I recommend following the instructions in my “Rename a Network Interface from the Command Line” so you can easily distinguish the difference in the network interfaces. Once the network interfaces are renamed, they should look similar to the ones in this image: If you attempt to ping your SAN at this point with a 8972 byte ping (9000 bytes minus a 20 byte IP header and a 8 byte ICMP header), you’ll receive a message stating “Packet needs to be fragmented but DF set.”: In this example, Read more [...]

MultiPath I/O on Server Core with the EqualLogic HIT Kit

I’ve written a few other blogs about iSCSI and Multipath I/O on Windows Servers, but this one focuses on installing the EqualLogic Host Integration Tool (HIT) Kit on Windows Server 2008 R2 Core (no GUI). If you are using an EqualLogic SAN, I recommend installing the HIT kit before doing any of the iSCSI or Multipath I/O configuration. It will make your life a lot easier. It’s also not a problem to install the HIT kit after you’ve done some or all of the configuration, just keep in mind there Read more [...]