Posts

Showing posts from February, 2015

Hyper-V Disk Resize

One of the cool features with Hyper-V 3 and Windows Server 2012 R2 is the ability to resize virtual hard disks without the need to shutdown the virtual machine, use diskpart and WinPE etc...

You just have to open up Hyper-V Manager and use the edit wizard on the hard disk that needs more space.

The more "cool" way to do this is to use powershell of course! You can use the following command on the parent partition (this is the Hyper-V host) to extend the hard disk:

Get-VM "WindowsServer2012" | Get-VMHardDiskDrive -ControllerType SCSI | Resize-VHD -SizeBytes 100GB

There are some limitations though... You won't be able to use the edit hard disk wizard when the virtual machine has snapshots. This is also supported only on VHDX virtual disks connected to SCSI adapters.

I can't say I haven't resized the virtual hard disk of a snapshot with the above command but you should not do this because you will break the chain. You shouldn't have snapshots anyway!

Grea…

Windows Server DHCP Migration

With Microsoft Windows Server 2003 End Of Live coming up in a few months, a growing number of companies start to examine the migration plans. Most times the DHCP in installed on the 2003 server and has to be migrated.

In case you do not have a complicated DHCP configuration with many reservations or options it may be easier to just install the DHCP role on the new server and configure it from scratch. You should be very careful though when having both servers active because this will result in IP conflicts.

To avoid conflicts I use exclusion ranges. I just exclude let's say half of the IPs from one server and the other half from the other. Even after that, there might be conflicts also because there might be clients that have already got an IP from the range that you excluded on the old server. Thus you should wait for a period of time longer than the lease time.

If you want to migrate the entire DHCP configuration, there is a great article on Technet that describes the process go…