Tag Archives: Hyper-V

R2-releases for that rainy summer!

Ah, the joy of new releses! Now we’ve released R2-versions of both Windows Server 2012 and System Center. You can find it all over at TechNet as usual. http://technet.microsoft.com/en-US/evalcenter/dn205295

And hot from the press you’ll find the Azure pack too, complete with an eval guide to get you all cloudy from the start! http://www.microsoft.com/en-us/download/details.aspx?id=39297#tm


Your own virtual machine in Windows Azure!

Ah, no more setting up internal demo enviroments worrying about if it’ll be up once you’re going to demo it. No more worrying about “colleagues” reconfiguring stuff while your busy preparing slides. Now Microsoft launches virtual machines in Azure, and you can connect those to your internal environment too. Or just upload your own VHD to Azure if you don’t want to use the preconfigured ones.

Check out this blog post for more information!

Self managing lab environment using Hyper-V and SCVMM 2012

In january when I started my new job at Transcendent Group there were developers that needed a test / lab environment for testing Team Foundation Server and other products. Since we’re only ~40 employees we don’t have the manpower to manage stuff like this manually. What better way to solve this problem than building a private cloud with Hyper-V and System Center Virtual Machine Manager 2012?!

I started off with installing Windows Server 2008 R2 complete with all patches and drivers. After activating Hyper-V I attached an iSCSI-disk to the server for storage of virtual machines. This is also for future possibility to build a cluster, easily converting that storage to a CSV.

The first thing I did was to create a new VM and installed SCVMM 2012 in that one. With that in place I could start configuring both my Hyper-V environment and the SCVMM solution to enable our users to create, use and destroy their own lab environments. I’m actually running my VMM-instance in a virtual machine which makes it easier, and since I’m connecting my data disk through iSCSI it won’t matter if I move the VM to another machine.


I decided to have five different clouds. Three for general use and two “private” since we are two internal users that needed our own environments. I created five internal networks, LabNet01 – 05 and one external that connects to our production network.

In Hyper-V it looks like this:

In each cloud there is one Smoothwall which is a Linux-based firewall with a very small footprint. These are used just for routing but could easily be used to publish services from each cloud. I chose this setup so we could separate services like DHCP and other “disturbing” services from our production network.

There’s also one domain controller in each cloud, with different domain names. The domains are named lab01.local – lab05.local. This gives the users the ability to join their lab computers to a domain, without having to clutter our production AD.

The Clouds

The naming conventions are planned so every user that uses each environment easily knows which lab user has access to which cloud. In the SCVMM self service portal there are five user accounts that are tied to our production Active Directory. These are named labuser01 – labuser05 with a common password known to everyone, the labs are open for everyone and booked as rooms through Outlook.

Cloud Account Firewall DC Subnet
LabNet01 LabUser01 SmoothWall01 LabDC01
LabNet02 LabUser02 SmoothWall02 LabDC02
LabNet03 LabUser03 SmoothWall03 LabDC03
LabNet04 LabUser04 SmoothWall04 LabDC04
LabNet05 LabUser05 SmoothWall05 LabDC05

Using the clouds

Using the system is a matter of booking a cloud in Outlook, and then logging into the self service portal.

Logged on as LabUser02, which gives access to Cloud02.

Logged on as LabUser03, which gives access to Cloud03.

When the user wants to create a new machine, the wizard for new machine in the portal is used. Since each user only has access to one cloud there won’t be any users creating VM’s in each others environments.

Access to the lab environment

Reaching the VM’s on the internal networks is either done through the portal, or for the users not wanting to use a browser, through an RDS Gateway. The gateway is connected to each of the internal networks witch makes it possible to connect to any computer on the inside once it has an IP address.

In this case we’re not using the same credentials for the remote computer as we’re doing for the gateway. This is because the gateway belongs to our production domain, but the remote server belongs to the lab domain. The RDS gateway settings can be found under the Advanced tab in the RDP-client.

With that we’ve constructed an enviroment which lets the users logon, create, use and destroy their own lab. In the next post we’ll take a look at more specific settings and group policies which makes life easier for both administrators and users of this environment.

[socialwrap align=”left” ] [socialicon name=”fb” /] [socialicon name=”linkedin” /] [socialicon name=”twitter” /] [socialicon name=”google” /] [/socialwrap]

Lots of stuff happening!

At the moment there are lots of stuff happening, both in our industry and at home.

This week I’ve started programming PowerShell seriously, trying to convert an “advanced” script to PowerShell since it’s supposed to be fewer lines of code. I bet it is, once you get past the initial irritation… Like why can’t I set the error message that validateset throws? Would’ve been nice.

If you’re a programmer you might wanna check out the developer resources for Mango over at Channel 9: http://channel9.msdn.com/posts/Mango-Jump-Start-01-Building-Windows-Phone-Apps-with-Visual-Studio-2010

Speaking of Channel 9 you could also take a look at the behind-the-scenes to see what’s going on over there: http://news.cnet.com/8301-10805_3-20103036-75/behind-the-scenes-at-microsofts-channel-9/

Apart from that I’m just as curious as everyone else about Microsofts new initiative with Hyper-V in Windows 8, which most likely will take the market away from Parallells and VmWare workstation. And hopefully kill that thing called XP-mode which is totally hopeless. Read more over at Building 8: http://blogs.msdn.com/b/b8/archive/2011/09/07/bringing-hyper-v-to-windows-8.aspx

At home we’ve bought a new apartment and selling the old one. You know the drill: Take 50% of the furniture away, clean. Take pictures. Wait, wait some more and so on. So that’s where my heads been at lately. I’ll be back with a vengeance.

Useful Hyper-V utilities (for the Core guys)

When setting up demos, labs or just showing customers how to do various stuff in Hyper-V / Server Core / Windows sometimes things get screwed up. Or you need to disable/enable something that’s been turned on/off. In Core this can of course be a challenge, and I’ve lately run across a few different utilities and built in commands that might help you get through your 8 hours with slightly less hassle.

Netcfg can be used to enumerate and show adapters, networking services and protocols. Installation and removal of the same components can also be done with netcfg.

When run in a command prompt just running netcfg won’t show you anything, but to get the syntax you’ll need the netcfg /?.

netcfg [-v] [-e] [-winpe] [-l ] -c -i
-winpe installs TCP/IP, NetBIOS and Microsoft Client for Windows preinstallation envrionment
-l provides the location of INF
-c provides the class of the component to be installed (p == Protocol, s == Service, c == Client)
-i provides the component ID

The arguments must be passed in the order shown.

netcfg -l c:oemdirfoo.inf -c p -i foo
…installs protocol ‘foo’ using c:oemdirfoo.inf

netcfg -c s -i MS_Server
…installs service ‘MS_Server’


netcfg [-v] -winpe
netcfg -v -winpe
…Installs TCP/IP, NetBIOS and Microsoft Client for Windows preinstallation environment


netcfg [-v] -q
netcfg -q MS_IPX
…displays if component ‘MS_IPX’ is installed


netcfg [-v] [-e] -u
netcfg -u MS_IPX
…uninstalls component ‘MS_IPX’


netcfg [-v] -s
-stprovides the type of components to show
ta == adapters, n == net components
netcfg -s n
…shows all installed net components


netcfg [-v] -b
netcfg -b ms_tcpip
…shows binding paths containing ‘MS_TCPIP’

General Notes:n”
-v Run in verbose (detailed) mode
-e Use servicing environment variables during install and uninstall
-? Displays this help information

See the pictures for listing adapters and protocols.

Hvremote lets you configure remote administration of Hyper-V hosts either it be the server or the client that’s not in a domain and so on. On the download page for hvremote they have an excellent 10-second guide so I’m not gonna give you the syntax, I’ll just send you straight over there: http://archive.msdn.microsoft.com/HVRemote.

Nvpsbind lets you enable or disable network protocol bindings on adapters by using the command line. In Server Core or Hyper-V Server this isn’t possible otherwise since the control panel applet isn’t available (that’ll be the ncpl.cpl). Check this out for more information!

And if you use the above utility a little too much, or just happen to remove the Hyper-V role from a Core-box you might need this script to rescue you. It’ll reset the network configuration and remove the Hyper-V networking components. Read more and download!

System Center Virtual Machine Manager + TFS for automatic testing

Spent the last two days setting up a solution at a customer together with Mattias Olausson from Callista. Our customer wants automatic testing of the nightly builds of their software, a task managed manually until now.

The setup consists of two servers, one running TFS (Team Foundation Server) and another one running System Center Virtual Machine Manager 2008 R2. Besides this we have a Hyper-V host for running the workloads. In SCVMM we’ve created four templates for the client operating systems that the tests should be run on, Windows 7 x86/x64 and Windows XP x86/x64. On these virtual machines we’ve installed all the necessary agents needed by TFS, converted them to templates in SCVMM and added sysprep.inf / unattend.xml to each template to enable a zero touch installation of each operating system.

In TFS Lab Manager you then create a testing project with a virtual infrastructure connected to it, and you select the templates you wish to run. TFS will then deploy the VM’s and run the tests you’ve configured. A report from the test will be written to your selected output directory and the VM’s will be destroyed.

If you’re interested in setting it up, the TFS team have a really good series of articles explaining everything in detail: http://blogs.msdn.com/b/lab_management/archive/2010/03/29/setting-up-various-topologies-to-test-with-visual-studio-team-lab.aspx

There’s also a basic concept overview at http://blogs.msdn.com/b/lab_management/archive/2009/05/18/vsts-2010-lab-management-basic-concepts.aspx

As far as SCVMM and Hyper-V goes you’ll find the basic configuration steps over at http://blogs.technet.com/b/scvmm/archive/2009/01/05/scvmm-2008-installation-step-by-step.aspx

And once you’ve got that up and running, you can run all your tests in the middle of the night and be a lot more productive during the days (sounded like straight from marketing, didn’t it…)!

Celebrations and reading

Yey, today is Geek Pride Day, which is celebrated by all geeks/nerds around the world. According to Wikipedia:

“Geek Pride Day is an initiative which claims the right of every person to be a nerd or a geek. It has been celebrated on May 25 since 2006, celebrating the premiere of the first Star Wars movie in 1977.

It shares the same day as two other science-fiction fan ‘holidays’ – Towel Day, for fans of the Hitchhiker’s Guide to the Galaxy Trilogy by Douglas Adams, and the Glorious 25th of May, for fans of Terry Pratchett’s Discworld.”

And for the reading I’ve been reading on the Hyper-V security model at http://blogs.technet.com/b/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx and how to avoid the old “domain could not be contacted”-error which you usually get with snapshots or offline machines at http://www.petri.co.il/working-with-domain-member-virtual-machines-and-snapshots.htm

Currently busy working with my presentation for TechEd and my new job offers some challenges too… Learning all there is to know about Salesforce and administration, and trying to get my head around SCCM (don’t miss the beta 1 of v.Next over at http://blogs.technet.com/b/systemcenter/archive/2010/05/24/the-next-generation-of-client-management.aspx) and Direct Access in multi-site deployments with UAG which isn’t happening until SP 1 apparently.