Wednesday, 6 November 2013

How to Install and Run the Windows 8.1 Preview in Hyper-V

The big announcement from //BUILD 2013 is the pending arrival of Windows 8.1, aka “Windows Blue,” and Microsoft made Windows 8.1 available for download immediately following the //BUILD keynote on Wednesday.
Like many developers, the MarkedUp Analytics team is naturally excited to try new things; that being said – we also don’t like having to wipe a dev machine and re-image it in the event that a beta release of Windows isn’t compatible with tools we use for doing our jobs every day.
So, we use Hyper-V or VirtualBox and run Windows 8.1 in a VM until it’s released to market.
Here’s how to get Windows 8.1 running in Hyper-V:

1. Download the Windows 8.1 Preview ISO

Download any of the Windows 8.1 Preview ISO images here. Pick whichever one best suits your needs. I’m going to use the English 64-bit .ISO.

2. Open Hyper-V and create a new virtual machine

If you’re running Windows 8 already, Hyper-V comes built into the operating system. Once the Windows 8.1 preview ISO is finished downloading you’ll want to create a new VM.
step1 - new VM
We’ll name our VM “Windows 8.1 Preview” and use the default storage location.
step2 - name VM
Windows 8 needs at least 2GB of RAM on a 64-bit system; I’m going to give this VM 4GB since I plan on running Visual Studio and some other RAM-intensive software on it later.
step3 - allocate RAM to VM
For now we’re going to leave the VM’s network as “Not Connected” – we’ll create a Virtual Network Adapter for it later.
If you already have a Hyper-V virtual network adapter that can share Internet connectivity with the host machine, use it here. Otherwise we’ll add one later after the OS installation on the VM is complete.
step4 - set VM network to not connected
Windows 8 needs at least 20GB of disk space on a 64-bit system. I’m going to give this VM 40GB and I’m going to use a dynamically expanding disk.
Dynamically expanding disks will be slow initially, but it saves room on the host machine in the event that you don’t occupy the entire VHD volume immediately.
If speed is an issue, you can create a fixed-size disk up front.
step5 - set VHD creation options for VM

3. Install Windows 8.1 Preview from ISO

Now we’re going to use the Windows 8.1 Preview .ISO file we downloaded earlier to install the operating system while we finalize our VM.
stp6 - install OS via Windows 8.1 ISO
This option will have you complete the Windows 8.1 Preview installation the first time the VM boots, using the .ISO file you downloaded earlier as the bootable media.
With all of those steps complete, you should now see the “Windows 8.1 Preview” VM on your Hyper-V list:
step7 - verify that Windows 8.1 VM is available in Hyper-V
Select the Windows 8.1 Preview VM and start it, and you should see the first “Install Windows” screen after a few seconds:
step8 - start the Windows 8.1 VM and install the OS
Click next.
You’ll need to enter in a product key for Windows 8.1 Preview during the first part of the installation process.
The product key for Windows 8.1 Preview is NTTX3-RV7VB-T7X7F-WQYYY-9Y92F, according to Microsoft’s official Windows 8.1 Preview installation instructions.
step9 - enter product key for Windows 8.1 Preview
If you see the following message and it asks you to choose between an upgrade and a custom installation, Select “Custom: Install Windows only.”
step10 - select custom install for Windows 8.1 Preview
Install Windows 8.1 on the VHD that we created earlier.
step11 - install Windows 8.1 preview on VHD created earlier
Let the Windows 8.1 Preview installation run to completion. And after 30 minutes or so you should be able to create a local Windows account and log in.
step12 - verify Windows 8.1 installation

4. If you don’t have one already, create a Virtual Network Adapter for Windows 8.1

If you didn’t have a Virtual Network Adapter ready during step 2, we’ll create one now.
First, shut down your Windows 8.1 Preview VM and turn it off – we’re about to make some changes to it.
step13 - shut off Windows 8.1 VM
Open up the Hyper-V manager and go to “Virtual Switch Manager.”
step14 - go Virtual Switch Manager in Hyper-V
Select “New virtual network switch.” Give the switch a name and make it an External Network. If you have multiple physical network adapters (i.e. ethernet and WiFi), use whichever one you use most often. Check the “allow management operating system to share this network adapter” box.
step15 - create new Virtual Adapter in HyperV
Apply changes.
Go back to your VMs and right click on the “Windows 8.1 Preview” VM you created – select “Settings,” then select “Network Adapter.”
step16 - Windows 8.1 VM network adapter settings
Change the Virtual switch to the new switch you just created; mine is called “Magical Switch.”
step17 - set virtual switch on Windows 8.1 Preview VM
Apply changes. Before we try starting the VM, let’s make sure that our switch was set up correctly – I often have trouble getting Hyper-V’s network adapters to behave properly the first time around.
Go to Control Panel and then to View Network Connections. Right click on the new switch you just created and select Properties.
step18 - verify virtual switch properties
Only the following properties should be set:
  • Client for Microsoft Networks
  • QoS Packet Scheduler
  • File and Printer Sharing for Microsoft Networks
  • Microsoft LLDP Protocol Driver
  • Link-layer Topology Discovery Mapper I/O Driver
  • Link-layer Topology Discovery Responder
  • Internet Protocol Version 6 (TCP/IPv6) and
  • Internet Protocol Version 4 (TCP/IPv4)
You will likely need to reboot your host machine in order to get the Internet working again. Go ahead and do that now.

5. Start Windows 8.1 Preview; Profit

You now should be able to start your Windows 8.1 VM in Hyper-V and connect to the Internet.
Install complete

No comments:

Post a Comment