This post was originally written for the Canadian IT Pro Connection blog, and can be seen there at Trying it Out- How to prepare to test your new operating system.
This is a really exciting season for IT Pros across Canada. Last week Microsoft released Windows Server 2012 to the public, and on October 26th they will release Windows 8. As an IT Pro you are going to want to test these out, whether that be in your own environment at home or at the office, or at an IT Camp or install fest like the ones we are holding in cities across the country.
Although we will be holding full day IT Camps with teams and challenges and prizes like we did earlier in the year for Virtualization and Private Cloud, if you are coming out to one of our Launch Events (and yes, they are all sold out!) in Vancouver, Edmonton, Ottawa, or Montreal we are dividing the events into two parts: the keynote sessions in the morning, and an install-fest in the afternoon. So if you bring your laptops you will have the chance to install Windows Server 2012 along with us.
At the Toronto event there were a number of people who did bring their laptops, but were still unable to install Windows Server 2012. Here are some of the reasons:
- Did not want to wipe out their laptops, and did not have enough room to create a new 32 GB partition on their drive;
- Did not have 64-bit hardware
- Had four partitions on their physical drive
- Were trying to use a client-side hypervisor incompatible with our install media
We understand that most of us do not have spare laptops to dedicate to testing new operating systems, but in each case there could have been a solution, had they known in advance a few tips.
Whether you are preparing to come to one of our Install-Fests or IT Camps, or if you are just planning to install the OS at home or at work to try it out, there are a few steps you can take to prepare for the task that will increase your chances of success:
- Make sure your hardware is compatible. While Windows is very forgiving for different brands and such, it is important to remember that Windows Server 2012 is a 64-bit operating system, and cannot be installed on 32-bit hardware. Of course most laptops that you would have purchased in the last four years would be 64-bit, there are people who like and continue to use their older systems, and if that older system is 32-bit then you will be out of luck. As well, some less expensive systems (especially netbooks) have Atom processors, most of which are still 32-bit.
- Ensuring you have enough free space on your hard drive is not sufficient; you need to be able to create a partition big enough to install the OS (Microsoft recommends a minimum of 32 Gigabytes). Most people do not think about partitioning their drives anymore, but remember that there are a number of reasons your drive may be partitioned anyways – including a Recovery Partition from your hardware manufacturer, as well as many other tools that would necessitate extra partitions. Disk Managerwill not always show the partition table, so if you are not sure what you have, follow these steps to check:
Open a command prompt with elevated permissions.
- Type diskpart to launch the Disk Partition Tool.
- Type list disk to see the disks in your system. In most laptops you will only have one disk, but connected external devices (such as USB keys and hard drives) will be listed as well, so unplugging them will simplify your task.
- Type select disk # (Where # is the number of the hard drive you wish to use)
- Type list partition. This will list out your partitions. If you have fewer than four then you are okay.
- Type exit to close the Disk Partition Tool.
- Type exit to close the command prompt.
- Ensure you have sufficient unallocated space on the drive to create a new partition. Most of us, when we install our OS, simply allocate the entire free drive to the primary partition, whether we need that space or not. Note that in my screen shot above the Disk 0 is listed as having 0 B free space. There are several ways of shrinking a partition, but the easiest is within Disk Manager. Simply right-click on your partition and click Shrink Volume… (Note: If you have plenty of free space but it is not letting you shrink it enough, run a disk defragmenting tool, then try again).
- Create a Boot-from-VHD partition and then install the OS to a VHD. I outline the steps to do this in my article ‘Creating a Multi-OS Environment with Boot from VHD’ several months ago. If your host OS is Windows 8 then don’t worry… the steps will work just as well!
- Installing into a virtual machine on a client-side hypervisor can be tricky in some cases with our install media because we are providing the OS on USB installation media, and not the ISO file. Make sure your client-side hypervisor has the ability to boot from a USB key. A simple workaround for this issue would be to download the ISO file for the evaluation in advance (here) and use that instead of the install key that we will be handing out.
- When installing in a virtual machine you have to make sure that your VM has the same minimum hardware requirements as a physical machine. You can review the Windows Server 2012 requirements here.
- Whatever hypervisor you use, make sure that you have the latest version and patches. Some hypervisors will require you remove virtual floppy drives; if your hypervisor asks what OS will be installed in the VM, assuming Windows Server 2012 is not an option, select Windows 7 64-bit.
Scripting away: How to accomplish this with PowerShell?
Sean Kearney, the premiere Canadian PowerShell enthusiast and Microsoft MVP, has this to add:
If you’d like to automate the DiskPart Query you can pull off the following
diskpart /s c:\script.txt
Script.txt is a text file that contains the following
list disk
select disk 0
list partition
diskpart /s c:\scripts\script.txt > c:\scripts\diskinfo.txt
Or in PowerShell (my personal favorite) you can get the same information doing including getting the available free space on the partitions!
Get-WmiObject -query ‘select * from win32_diskdrive where MediaType=”Fixed hard disk media”‘ | ft
Get-WmiObject -query ‘select * from win32_logicaldisk where DriveType=”3″‘ | ft DeviceID,FreeSpace,Size
If you’d like to automate the defragmentation of the C: and shrinking you could do the following in Diskpart
defrag C: /X
diskpart /s c:\shrink.txt
Shrink.txt is a text file that contains the following
Select volume=c
shrink MAXIMUM=50000 DESIRED=25000
This will attempt to get you 50 gig of free space but will shrink of 25 gig is at least available.
But are you the IMPATIENT type? If you’re in DISKPART just enter the command
Shrink QUERYMAX
This will tell you how much you COULD shrink it by. This could be quicker and let you run to the local computer shop to buy that new drive to take Server 2012 for a test.
Which option is right for you?
My first choice for testing any operating system used to be directly on the physical hardware. However virtualizing the OS does have its advantages, such as being able to snapshot and roll back if you make a mistake; as well the performance of virtual machines (in Hyper-V, as well as in some competitive products) is nearly as good as it would be on the physical server. Balance that with the fact that more planning is required, and a working knowledge of the hypervisor is critical to your success.
Booting from VHD is a good hybrid between these two. You are installing mostly on the physical hardware, with the only exception being storage. While you cannot snapshot a Boot-from-VHD, you can make an occasional copy of the VHD file (not when booted into that VHD) and revert back when necessary. It does require a few extra steps, but it works well, and the only feature that I have found that does not work in this scenario is the Windows Experience Index (see article). However for most of us this is a small price to pay for the convenience.
In short, the right option for you is the one that you find best. My students often hear me refer to the Universal Consultant’s Answer (UCA): It Depends. There is no right or wrong answer here, but based on what you have and what your preferences are, isn’t it great that there are so many options for you to choose from?
Related articles
- Making Your Windows 8 ISO work for You (garvis.ca)
- Client-Side Hyper-V: How Microsoft is changing the game (garvis.ca)
Leave a Reply