You are browsing the archive for hyper-v.

Problem with “IP Address Already Assigned” in a Hyper-V Virtual Machine

6:49 pm in Hyper-V by Wim Matthyssen

In my third blog post I will tell you how to solve an issue you can get when setting a fixed IP address on a Virtual Machine (VM). Like you see in the screenshot below there is already another “Microsoft Hyper-V Network Adapter” with the same IP address assigned to the VM. Simply said this ghosted virtual network adapter (vNIC) has the same IP address as the one you try to set.


This problem can have several causes. In most cases it occurs when you delete a vNIC with a fixed IP address and later on try to set it back. But it can also take place when a VM is not migrated properly between Hyper-V hosts or when a backup of a VM is set back to another host. Nevertheless don’t worry in this post I will show you how to repair this. You can fix this by uninstalling the ghosted network adapter. There are several ways to do this, one of them is by use of the registry but there is also a quicker fix. This one I will show you below:

1) First of all answer No to the question in the pop-up.

2) Now open up a command prompt with Run and type in cmd.


3) Type set devmgr_show_nonpresent_devices=1, and press Enter.

4) Type devmgmt.msc, and press Enter.


5) When “Device Manager” is open, click View, and then click Show Hidden Devices.


6) Expand the Network adapters tree.

7) Right-click the dimmed network adapter, and then click Uninstall.


8) Click OK to Confirm Device Removal.


9) When the device is removed, set the IP address to the vNIC. This should work.

10) Finally check the right settings, by running ipconfig in a command prompt.


As you can see the fixed IP address is set. This concludes this blog past. Keep tuned and I’ll be back soon.

Wim Matthyssen (@wmatthyssen)

How to perform a P2V with disk2vhd

10:20 pm in Hyper-V, scvmm by Wim Matthyssen

On a regular base I need to do physical-to-virtual (P2V) conversions at clients, to turn physical machines into virtual machines (VMs). The only problem is that in the current SCVMM version, namely SCVMM 2012 R2, the P2V functionality has been removed. As a solution you can install a down-level version of SCVMM, like the 2012 SP1 version, but in this blog post I will explain you how to do it with use of the disk2vhd tool from Microsoft.

You will need to follow the steps below:

1) First of all clean up the server that will be converted to a VM and remove all unnecessary software. Check the Event Viewer for critical problems and fix them. Also run Windows Updates and install all necessary updates.

2) Secondly open a command prompt and run “sfc /scannow”.This command will inspect all of the important Windows files on the server, including Windows DLL files. If the System File Checker finds an issue with any of these protected files, it will replace it.


3) As a third step run “chkdsk /f c:”.Check Disk will then perform an analysis of the disk and repairs all errors on the C: drive. If the volume is in use (like the C: drive always is) chkdsk will run on start-up. So close all applications and reboot the system.


4) When the chkdsk is completed, boot into the operating system and defrag your C: drive with “defrag /f c:


5) As a next step first download “Contig v 1.7” here. Contig is designed to defragment individual files, or specified groups of files, and does not attempt to move files to the beginning of the partition. Combined usage of the -s parameter and the wildcard symbol * allows whole directories and drives to be defragmented. Run “contig –s c:\*


6) When the contig has finished, use the Microsoft Virtual Disk Pre-Compactor tool to write out all of the free space to zeros. You can download the Precompact tool here. Run “precompact.exe




7) Now we are ready to use Disk2vhd v2.01 to make a new, dynamic-sized VHDX file. You can download the tool here. Preferably create the new disk on another disk then the C: because the tool uses a lot of IOPS.



8) When the new VHDX is created, copy it to the preferred location. It’s best you copy it to the Clustered Shared Volume (CSV) where the VM will reside on. In my example I copied it to: C:\ClusterStorage\Volume4\”VM folder”


9) As you can see in the screenshot below the disk now has a size of 125 GB.


10) The next step is to create a new VM (same name as the physical server) with SCVMM and attach the VHDX as the drive where the OS resides on. Then shut down the physical machine and boot up the VM. It should start, adjust the IP address to the one of the physical and the P2V should be done.

11) Now open up a Hyper-V Manager on the host and install the Integration Services. I always do this from the Hyper-V host and not from SCVMM, simply because it’s faster.





12) An important step is to convert the dynamic VHDX to a fixed-sized VHDX (only fixed-sized VHDX are supported by Microsoft in a production environment). So in SCVMM open the properties of the VM, and go to Hardware Configuration. Here you change the dynamic disk to a fixed one. When running you see the following job in progress.


13) As a last step you can adjust the size of the VM, so it uses less disk space on your CSV. To do this you need to RDP to it. When connected open run and type “diskmgmt.msc”. This command will open Disk Management. There you can shrink the volume. Shrink it as most as possible. When shrinked there will be unallocated disk space. In my case around 325,31 GB.




14) After the shrink, go back to SCVMM and reopen the properties of the VM, go to Hardware Configuration and select “Compact virtual hard disk”.


15) The result you can see below. The fixed VHDX now only uses 140,45 GB instead of 465,42 GB.


This concludes this blog post, hope it helps!

Keep tuned and I will be back with more.

Wim Matthyssen (@wmatthyssen)

How to extend system partition on Hyper-V Windows Server 2003 VM

9:55 am in Hyper-V, scvmm, win2003 by Wim Matthyssen


Last month, I worked at a customer who had a problem with low disk space on the system partition (C: drive) of a Virtual Machine (VM) runnig Windows Server 2003 as operating system. He received the “Low Disk Space” alert and wasn’t able to defragment or install any new software. He was also concerned that whitout enoug space for the system, the server would not work efficiently and stable. So in my first blog post I will explain how I fixed this.

First of all, you need to expand the virtual hard disk (VHD) of the VM. In the post I will use System Center Virtual Machine Manager 2012 R2 (SCVMM) but you can also do this from the Hyper-V manager. To fix this issue you need to go trough the following steps:

1) Shutdown the VM

2) Open Properties of the stopped VM

3) Go to Hardware Configuration and locate the disk in question

4) Select Expand virtual hard disk (GB): and enter the new size

5) Click OK


6) In the job window you will see following action:


7) If the job is all done, start up the VM.

8) When the VM is started, open Run and type in following command diskmgmt.msc to open Disk Management

9) Click OK


The problem that you face at this point is that because it’s a Windows Server 2003 you can’t use “Disk Management” to extend the system disk with the 8 GB unallocated space. Like you can see in the screenshot below the option “Extend Volume” isn’t available.


10) So to expand the SYSTEM disk we will use a tool called Dell ExtPart Utility. You can download it from here

11) Save the zip file to a folder (like example Temp) and extract it. I’ve extracted it to the folder C:\Dell\Expart

12) Next open a Command Prompt and go to the above folder

13) Type in the command extpart “drive:” “size to extend”. In my example this is extpart c: 8192

14) Click Enter


15) Now if we open up Disk Management again, you can see the system drive has a size of 20 GB instead of the 12 GB from before. After the extend, the previously unallocated space has been combined with the system drive to form a single larger drive. In the end the extra space is available to install new software or install Windows Updates. Also the server will run stable again.


This concludes my first blog post. I hope it’s a fine start and that you will keep following me. So keep tuned and I’ll be back soon.