NetworkSydney

Author Archive

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...


Powershell - List Disks with Location, Size and Device ID

by Harry on Apr.08, 2010, under Microsoft

Here is a quick one line powershell command to spit out the Location (port, bus, scsi target id, lun id), size (in GB) and Device ID (also known as disk number in the windows gui) into a file.

Get-WmiObject Win32_DiskDrive | select-object DeviceID,{$_.size/1024/1024/1024},scsiport,scsibus,scsitargetid,scsilogicalunit | out-file -FilePath c:\output.txt

Note: This command is one line, watchout for wordwrap!

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

Powershell: List NIC with IP, MAC and Description

by Harry on Mar.26, 2010, under Development, Microsoft

Hi Y’all, Just a quick entry for list the IP, MAC and Description fields of the NIC that are IP enabled on a system using Powershell. Might be handy for when the network team asks for MAC addresses to trace ports.

Get-WMIObject Win32_NetworkAdapterConfiguration | where{$_.IPEnabled -eq “TRUE”} | Select-Object MACAddress,caption,description,IPAddress

Note: This command is all on one line, so beware of the word wrapping.

Update: this one is little better, it gets the network connection name as seen by Network Connections Window

Get-WmiObject win32_networkadapter | where {$_.physicaladapter -eq $true} | Select-Object macaddress,netconnectionid

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

No! Don’t touch it!

by Harry on Feb.15, 2010, under General

You know, after working with virtualisation for over 2 years and many virtualisation projects, the biggest pain point about doing this job is dealing with the “No! Don’t touch it, its not your server”. I just feel there is no sense of “hey, this may be beneficial for the company” let’s take a look at it. But, unfortunately some laid back, overpaid, uninterested, useless people have this enormous amount of hidden energy to do anything to stop. Maybe I should take a sales course, maybe my emails are scary and make people feel unstable or maybe I should use another word instead of virtualisation - something like “synergise your server”.

oh well, such is life I guess.

1 Comment more...

Setting the Idle timeout settings in a XenDesktop VDI environment

by Harry on Jan.22, 2010, under Server Based Computing, Virtualization

If you need to configure timeout settings for your XP desktops in a VDI solution when using Citrix XenDesktop, take a look at the artice CTX117446 at the Citrix website. This article lists the registry entries that need to be modified to enable and set the Idle timer and disconnected idle timer. Unfortunately there is not ICA connection properties similar to Presentation Server configurations. These registry settings can then be transformed into a ADM file and deployed via group policy.

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

Windows 7 Ultimate

by Harry on Jan.08, 2010, under Microsoft

Hi All,

Finally got around to installing Windows 7 onto some old piece of hardware. Overall, the experience went quite well with things such as RAID controller drivers already included and not needing to supply drivers. I installed the 64x bit version and it seems to run well on my old Athlon 64. The graphics are onboard so video isn’t the best especially on a 24″ Dell wide monitor. The sound controller is giving me a headache, Windows Update found the drivers for the onboard sound controller but is refusing to cooperate, it seems confused thinking that I only have rear speakers in a 5.1 configuration. I think I might just do without it for a now and get a cheapy Sound Blaster card later on.

Software wise it seems to be good overally, I still think however Microsoft just shuffled icons around and repackaged it. So far I have received a few popups regarding the application compatibility thing which might get annoying down the track. Apart from that I think I might keep using it and see how things go.

Ciao!

2 Comments :, more...

Process Monitor

by Harry on Dec.17, 2009, under Microsoft

If you found regmon and filemon useful well wait till you see Process Monitor. It is regmon and filemon blended together then put on steroids to include network mon and a whole heap of othe stuff, all driven by the simple filtering options. Download from Microsoft today and take a look, I am sure I will need it in the future.

Leave a Comment :, , , more...

Cool new feature for Windows 2008

by Harry on Oct.21, 2009, under Microsoft

Just noticed that it is possible to extend the boot partition on a Windows 2008 R1 server without the need to use a boot disk. Although I tried this on a physical x64 server, I assume it will work on a x86 and virtual machines as well. The same process applies with the use of Diskpart, selecting the volume and entering the extend command.

Cool!

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...