NetworkSydney

Tag: Hyper-v

Shrinking a Windows disk and VHD

by Harry on Jun.30, 2010, under Virtualization

Hi All,

The Microsoft way to P2V a machine is by using Microsoft SCVMM. System Center Virtual Machine Manager has the ability to do online and offline P2V’s using clever boot.ini file modifications. So far both methods work well for me, however, in the field you see a lot of physical servers with over allocated disk space on both boot and data drives/volumes. Since we are all for saving money with virtualisation and that virtualisation offers us greater flexibility, why not reclaim that space and use it for other purposes.

The problem I’ve come across is that you’re not able to reduce the size of the disk when performing a P2V conversion with Microsoft VMM, or any other tool so far for that matter. You can increase the size but can’t decrease. I think this is a huge pitfall for Microsoft if you compare with VMware Converter. After doing some research (googling) I that the following is one way of shrinking the disks. Also note that we are reducing the size of the Windows volume within the VHD and the size of the VHD as well which is different to the compacting option. The compacting option will regain blank space in an ‘inflated’ dynamic disk;

  1. Use diskpart and the shrink command to shrink the last partition on the disk. You can also use shrink querymax to determine how much it can be shrinked.
  2. Use the vhdresizer tool to reduce the size of the vhd.

Note: the shrink command can only shrink upto a certain point, at which point an event is logged in the Application Log described which file is can’t be moved. Sometimes files such as system restore or indexing service may be the owner of these files. Disable such services may get you around diskpart not being able to move these files

Leave a Comment :, , , , , , , more...

VMM Administrative Delegation

by Harry on Sep.16, 2009, under Virtualization

Spent some time today researching how privilege delegation works with Hyper-V and particularly with VMM 2008 R2. It seems to be quite inflexible and limited in that there is only one additional role that you can configure and that is the Self service role. There is also a ”delegated administrator” role however this is the same as a normal administrator except you can limit it to a host group, which is essentially a host container. The problem with the delegated administrator role still is that it still allows for the user to manage network, storage and everything else along with the virtual machine.

There is also Authorization Manager or AzMan, which is has been around since Windows 2003 SP1. The AzMan framework is there to provide a role based security model that can be leveraged by your application. Without going into too much detail you can create roles and define its’ tasks and assign it a scope so that the application will check and ultimately allow the user to perform the associated tasks he/she needs to do. I will try to explain a little more about AzMan and how it works with Hyper-V virtual machines as it does allow you to set per-vm privileges (something easily done in VMware Virtual Center) in the future. But for now I really do give VMM a thumbs down for privilege delegation. And if the industry wants to go completely virtual then we are going to have to break down the roles.

Leave a Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...