Building a Home Lab

Building a Home Lab

There are many reasons why IT professionals build home labs, from testing and development to learning and certifications. It used to be that we needed server hardware for building a home lab, not only is the equipment expensive but the electricity bill could take a hit as well and don’t get me started on the noise some servers create. All this is pretty impractical for most but what else do you do when you need to improve your skills and why should the home lab be the reserve of the guys already getting paid the big money?

Well thankfully several advancements in technology have made it so we don’t need server hardware for building a home lab anymore. In fact the same things we want to learn about in our home labs are whats made them possible on a budget and without turning the spare room into a hot wind tunnel. So here’s my guide on building a home lab:

What hardware do I need?

So we need some hardware… Or do we? Not necessarily, but for this section lets pretend we do. One of the advancements in technology I alluded to above is in the hardware itself. As recently as six years ago a server might have had a quad core processor and be maxed out at 32GB of RAM, maybe it had two quad core CPUs. Fast forward to today and I’m pretty sure I’m not the only one with a home PC running an eight core CPU and 32GB of RAM. Well actually that’s an exaggeration, I have a 6 core CPU but if I wasn’t so cheap it’d be 8 core. On top of that chances are our home PC’s are running new generations of CPU’s and memory that makes the old stuff look steam powered.

Sure in six years our production workloads are going to have gone up but for the purposes of our home labs the Windows Server OS isn’t really any more hungry than it was back then. On top of that bare in mind that we aren’t going to be generating any real work for our test servers so they can run on less resources than recommended.

What I’m getting at is that your home PC with a few upgrades is going to be man enough to lab most stuff. So enough rambling, here’s my minimum recommended spec:

  • 1x Quad core CPU
  • 16GB RAM
  • 250GB SSD

You can buy that for easily under £500 off the shelf and add the SSD for well under £100. This is enough to lab out absolutely loads of stuff, you can even lab a vSphere cluster on that! For some things that need a lot of separate servers or are very memory hungry you might find yourself running low on memory. If you use your PC for gaming or other home stuff you might find the disk space an issue.

If you can afford to splash out a bit more then a better spec to aim for is:

  • 1x Hex core or above CPU (to be honest an Intel quad core is fine for most situations)
  • 32GB RAM (or more, a DDR4 compatible chipset if you can afford it will let you max out a desktop with way more than that)
  • 500GB SSD (Or better yet multiple SSD’s)

That could cost you upwards of £1000 and will probably work out cheaper to build yourself than buying off the shelf. To take the hassle out of shopping around for parts check out PCPartPicker. There isn’t going to be much you can’t lab with that spec.

Basically when it comes to spec you are most likely going to run out of IOPS/disk space and memory so concentrate the budget in that area. CPU tends not to be the bottle neck in my experience. Remember as well that we aren’t going to get the Exchange sizing calculator out for our Exchange labs we are going to give it just enough to run, not even the minimum recommended spec.

Now you definitely won’t be buying a new server with those specs for that sort of money, at least not a branded one. A quick browse around Ebay and you can find loads of second hand HP DL360’s (G7’s are about the newest affordable ones it seems). These get sold en masse as there are data centers across the land full of em and every few years they get thrown out and replaced. By the time you’ve found one for a good price and stuck in some compatible disks and upgraded the memory you will be up to similar prices as above. The difference is you are running a noisy, hot, used piece of hardware that doesn’t exactly sit nicely under the desk and odds are you still need your home PC and will have payed for that anyway. I’d personally rather run one decent PC that doubles conveniently as my home lab.

What Software/Operating System?

The next advancement that helps make our home lab viable for the masses is virtualisation (not exactly breaking news). As we should all know by now virtualisation is going to let us actually use all that hardware by running multiple virtual servers on our PC, the average computer game isn’t going to dent those specs on it’s own.

The easiest, most affordable option here is just run Windows 8 (Pro or Enterprise) or above and install the included Hyper-V feature. For those doggedly refusing to upgrade from Windows 7 citing reasons of Windows 8/8.1/10 is rubbish I can’t help you there, I don’t really agree (apart from 8 maybe) time to accept change is a part of IT for better or worse 😛 If that little dig didn’t persuade you then I suppose you can run VMware Workstation. VMware Workstation is not free (unless you are a VCP) but it does come with some convenient features like USB pass through, better console window and better networking options. I was running VMware Workstation until recently, I just decided to give Hyper-V a go after some people suggested it would be less disk and memory hungry (I have my reservations about the memory but we will see, if we were talking ESXi vs Hyper-V in production I would laugh milk right out my nose).

A common objection to just running a Hypervisor on your home PC is “but I need to lab a cluster”. If you want to lab a vSphere or Hyper-V cluster this is perfectly possible using one PC and nesting your Hypervisors and you can use things like a FreeNAS VM to present iSCSI storage. If you want to do this I recommend VMware Workstation, I haven’t tried nesting under Hyper-V but apparently it’s possible although trickier.

I don’t really recommend running server operating systems on your bare metal for the home lab. If this is also doubling as your home PC you will find plenty of irritations running Windows Server and running ESXi is going to be a non starter for obvious reasons. On top of that I’m going to pretend you all go out and buy correct licensing and licensing a Windows Server OS is going to cost you a lot more.

What about licensing?

Buying a license for everything we wanted to lab would be prohibitively expensive to say the least. Most businesses find it prohibitively expensive let alone an individual studying for an exam.

Don’t worry we don’t need to break any laws to do our labs. Most vendors appreciate that expecting anyone to invest in thousands of pounds worth of software with no ability to evaluate it first would leave them struggling for sales. You can run evaluations of pretty much anything, Micrososft, VMware, Citrix, Kemp, the list goes on and all offer trials and evaluations of their products. Some people find expiring trials or evaluations a nuisance but I argue that re-deploying things is good for practice. The first time you deploy something you probably followed a guide so doing it again a few times on your own is no bad thing. In addition most people don’t need to run the same lab 24/7. Build it, break it, fix it, turn it inside out and scrap it to make way for the next thing you want to learn, your labs aren’t generally going to be permanent.

It’s worth also speaking to your employer as things like MSDN subscriptions entitle you to certain non-production uses of various OS’s and applications and they may be happy for you to use this as it’s to their benefit as well. In addition consider approaching some vendors for NFR (not for resale) licenses, if you blog about them or resell them then they will usually be amenable. Some certificate authorities have been known to give away SSL certificates for non-production purposes, which can be very handy for certain testing scenarios.

What about the cloud?

Yes the cloud, which is a word that between the weather forecast and confused execs wanting to backup their iThings you won’t have gone five seconds without hearing. To be more specific we can spin up some virtual machines on a hosted infrastructure of some kind and avoid hardware altogether. Take Microsoft Azure for example, we can have a months trial and Microsoft will give us some tokens to play with, the more we run and the more hours we run it for the quicker we whittle them down. Once the trial is up we can buy tokens on a pay as you go basis and a handy calculator will help us work out what our workloads should cost us.

Personally I think Azure is great but for a home lab it’s going to get a tad more expensive than a Netflix subscription so unless you’ve got the money to spare or a very short term need I’d stick with hardware. Where trials of cloud stuff do come in very handy is when we want to actually do some testing with say Microsoft Azure or Office 365. Quite frankly getting your head around all that either of those can do and how they can integrate with on premise requires you to have a play so I do recommend you take a look.

Summary

In summary we can build a perfectly serviceable home lab for under £600 (and no doubt much less than that) and that’s assuming you don’t have the makings of a home lab already. All you need is a half decent PC with an SSD and a little more than average memory, nothing more. With this modest hardware we can lab just about anything. Gone are the days of having your own server rack full of noisy, expensive hardware sucking down the electricity and making a south facing conservatory look arctic.

As always thanks for reading Building a Home Lab and I hope this has been of use to someone.

Progressing a Career in IT

Progressing a Career in IT

Recently I have been asked by a couple of people for some advice on progressing a career in IT in particular how they can get out of a rut and improve their skills enough to move up. I’ve not been in IT a huge amount of time myself but so far I have managed not to get stuck in a role for too long and have always progressed regular as clockwork to the next rung of the IT career ladder. More luck than judgement I suspect but I have learned a few things along the way that might be of benefit to others wandering about progressing a career in IT.

1. Define Your Career Path

We are fortunate in IT that there are some pretty well defined career paths, if you know where you want to end up it’s often very clear what position you have to work towards next. My first piece of advice is this, think about where you want to end up and look at what positions you need to work up through to get there. Don’t just wait around for any old promotion to come along, work hard towards the specific job you want next. Personally I have always progressed along the technical career path, I haven’t left the technical side behind so I will focus on technical career progression for this post.

Be careful when thinking about your career path, there needs to be a balance between personal and work life. You should think about what balance will be comfortable for you, many roles involve travel and staying away from home and that’s not for everyone. Set your sites based on lifestyle as well as the financial, insert cliche about money not buying happiness.

Beware the offer of promotion if it deviates from your desired career path. Increased money is a huge temptation but if you go too far down say a management path but you wanted to progress a technical path you may find it hard to get back on course later.

2. Where are you working

I was lucky that very early in my IT career I went to work for a managed services provider (MSP) providing outsourced IT support and err…managed services. At the time I didn’t even know what an MSP was but it turned out to be a good move for me. I got massive exposure to a broad range of IT technology that would never have happened had I stayed where I was working in house IT.

So my second piece of advice is this, look at where you are working. How big is the company? How big is the IT department? How varied are the IT systems? Are the systems current and industry standard?

If your current place of employment is too small you will get very limited exposure to technologies and limited opportunities to move up. If the systems are antiquated or not very industry typical the experience you gain may be of little value elsewhere. If this is true of where you are working you should bite the bullet now and dust off the CV. The next employer doesn’t have to be the last one and probably won’t be but make sure the experience you’re gaining is sending you in the right direction. MSP’s can be a good choice as they will often offer formal training and certifications as they need to maintain competencies for Microsoft and other vendor partnerships.

3. Identify what skills you need and work on them

By now hopefully you have your career path firmly visualised and you’ve positioned yourself with an employer who can help you get there. Now you can focus on your skills.

Do some research and figure out what each step on your chosen career path requires from you. Appraise your own skills honestly and see where the shortfall is and make a list of the things you need to learn.

If you got step two right your day-to-day responsibilities should see you gaining valuable experience and learning new things. However, everyone hits a plateau in their learning at some point where the job just isn’t throwing anything new at you. Sometimes this plateau is going to leave you short of the skills and confidence you need to step up. This is where you need to take some responsibility for your own learning and do some self training, you cannot rely solely on employer provided training if you’re going to get anywhere fast.

I can’t stress this enough setup up a home lab and start installing and configuring things, there are a huge number of guides and articles on the internet to help you install and administer just about anything. Have a play, break it and fix it again until you can throw away the guide. It is important that you find the time for this, make your home lab your hobby, it’s much easier if you enjoy it. “I don’t have time” is an excuse I have heard from way too many people who have spent years stagnating in low level support roles, in the next breath they are telling me about their marathon gaming session or their binge watch of some TV show. If you are worried about the expense of setting up a home lab fear not, it need not be prohibitively expensive and it’s never been easier. I will be following this up with an article on that very subject.

I would also caution here that focusing too heavily on book learning for certifications and not on hands on experience and real world application can be a mistake. You should try to maintain certifications but ensure you can actually apply the skills the qualification suggests you posses. I can promise you that most employers will be far more interested in experience, unfortunately certifications have been devalued by the amount of brain dump sites out there and even boot camp style training is highly questionable. An MCSE to your name won’t exempt you from the technical questions in an interview or getting the boot during probation.

4. I have the skills what do I do to move up

Keep assessing your skills as they grow and don’t be over critical of yourself, many people put off going for a promotion because they lack confidence, I know I have. Sure you shouldn’t bite off more than you can chew but at some point you have to take the plunge and go for it. Even if you do find yourself slightly out of your depth to start with your on-the-job learning will be back to the satisfying pace it was when you started the last role you outgrew. Before you know it you will be more than up to speed and thinking about the next promotion. If you are getting step two and three right you should be looking to move up service desk roles every 12-18 months quite comfortably.

If you are anything like me then you won’t be wanting to spend any longer on the service desk than necessary, for others though they are happiest in a support role but I think most would like to reach 3rd line (or whatever the highest tier is where you are). Moving out of a support role and into consultancy can be a particularly daunting step up but if you’ve been working hard on step three you may actually find consultancy easier than 3rd line support, you will look back and wander what all the fuss was about.

So you worked hard and you’ve got your skills to the place they need to be for a promotion? Make sure your boss knows it, don’t be shy about your extra curricular learning and make sure they know you want to move up. If it comes to it be brave and ask for a promotion outright, if you are turned down ask why, they may feel you aren’t ready and you can work on that together. If there simply isn’t an opening it’s up to you if you want to wait, if staff turn over is very low though I advise not to wait around for someone to retire.

When it comes to internal promotion different employers are better than others. Some will happily promote and reward while others prefer having an over qualified person filling a role or my personal most hated, they promote but avoid reward (yes this is a thing). You need to recognise which you work for, loyalty swings both ways and a good employer should be looking to do right by you. If they aren’t looking after you then you owe them nothing and it’s time to revisit step two and dust off the CV again.

The important thing here is you are ready so make it happen, even if that means moving employers. Don’t hang around too long or you are delaying reaching your end goal!

5. Additional pointers

Following these steps should see you quickly progressing a career in IT through support and on to consultancy. Beyond that career direction can be somewhat murky and there are people far better positioned to proffer advice than I. Here are a few additional pointers, every little helps:

  • Involve yourself in the wider IT community, start a blog and/or contribute to IT forums
  • Use social networking to build contacts and get job offers, Linkedin is good for this
  • Beware over specializing in something too niche or risk finding yourself suddenly obsolete
  • Keep up with trends in technology and don’t be over cynical, the cloud naysayers of today may be the unemployed of tomorrow
  • Aim for higher level certifications. The kind where far fewer professionals attain them so the qualification still carries weight.

 

Installing Exchange 2016

Installing Exchange 2016

Exchange 2016 was released to market earlier this week so I thought I would make a quick video on Installing Exchange 2016. This was actually recorded a few weeks ago using the Exchange 2016 preview but I hadn’t gotten around to editing it and in the meantime Microsoft went ahead and released it so here it is using the preview installation source. There is no difference in the method when using the RTM installation source.

So here’s the video, apologies for the mic volume, hopefully a few more of these and my video editing skills will improve…maybe.

So very similar to past versions of Exchange, there is nothing here that should give anyone who has installed Exchange before any trouble. Here are a couple of links to the Technet resources where you will find details on the system requirements, the pre-requisites and the unattended installation commands.

System Requirements:

https://technet.microsoft.com/en-us/library/aa996719(v=exchg.160).aspx

Pre-requisites:

https://technet.microsoft.com/en-us/library/bb691354(v=exchg.160).aspx

Unattended mode:

https://technet.microsoft.com/en-us/library/aa997281(v=exchg.160).aspx

The specific method used to install Exchange 2016 in the demonstration was as follows:

To install the pre-requisite roles and features I first ran:

Install-WindowsFeature AS-HTTP-Activation, Desktop-Experience, NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Clustering-CmdInterface, RSAT-Clustering-Mgmt, RSAT-Clustering-PowerShell, Web-Mgmt-Console, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, Windows-Identity-Foundation, RSAT-ADDS

Remember you can omit RSAT-ADDS if you won’t be using the server to prepare AD, so if this is not the first Exchange 2016 server or if your Active Directory structure dictates that domain preparation must be performed elsewhere then you don’t need the Remote Tools Administration Pack.

Although I edited it out to keep the video shorter I also installed the following:

.NET Framework 4.5.2

and

Microsoft Unified Communications Managed API 4.0, Core Runtime 64-bit

After a reboot I proceeded to prepare active directory.

  1. Open an elevated command prompt and change directory to the path where your Exchange 2016 installation source is located
  2. Then run:
Setup.exe /PrepareAD /on:MyOrg /IAcceptExchangeServerLicenseTerms

Once active directory preparation completed I ran the following from the same elevated command prompt:

Setup.exe /mode:Install /role:Mailbox /OrganizationName:MyOrg /IAcceptExchangeServerLicenseTerms

In both of these commands you can change “MyOrg” for a suitable Exchange organization name. If you already have Exchange servers you will need to use the existing organisation name. Remember there is only one role in Exchange 2016 so although the “role” switch would imply there is a choice, there isn’t.

This procedure takes somewhere approaching an hour to complete give or take so once the installation gets off the ground go and have a cup of tea. When the Exchange installation has finished you should give the server a reboot before you continue on to configuring your new Exchange 2016 server.

As always thanks for watching and reading.

Exchange 2016 RTM is here

Exchange 2016 RTM is here

Great news for Exchange admins this week, Exchange 2016 RTM is here. Earlier this week Microsoft released Exchange 2016 to the market so I will be endeavoring to find the time to write a number of posts looking at the new Exchange server and seeing whats new, what our options are for upgrading and how we go about that.

For now here’s Microsoft’s introduction to Exchange 2016.

You can download Exchange 2016 RTM here:

http://www.microsoft.com/en-us/download/details.aspx?id=49161

Graceful Shut Down of vSphere Guests from UPS

Graceful Shut Down of vSphere Guests from UPS

How to initiate graceful shut down of vsphere guests from UPS. This seems to be a frequently asked question in the VMWare forums and a Google of this subject will return a variety of possible solutions. Where this solution differs from most is it allows you to shutdown VM’s in a specific order, which is useful in a lot of situations but is a must if you are using VSA style storage solutions e.g. HP StoreVirtual, Nutanix, etc.

Firstly here’s my usual solution where shutdown order is of no importance. I would simply deploy vMA appliances to each VMware host and install the UPS agent or in the case of APC I would use their preconfigured VMware PCNS appliance. With these I would simply configure them to shut down their respective hosts before the battery runs out. The method to get the VM’s to shutdown gracefully is to configure the virtual machine startup/shutdown settings on each host. Officially these options are not supported in a vSphere cluster, however they do still work to a point. Virtual Machine startup order is lost when VM’s get migrated around the cluster so don’t expect vSphere to observe this configuration but otherwise VM’s will startup. With regard to the shutdown option this is again functioning to a point. VM’s will shutdown but I have found they will ignore the shutdown delay settings. So this is fine for environments where we just want to shut the guests down in no particular order but it’s no good to us if we need to leave some VM’s up until last.

So if for example we are using VSA style storage e.g. HP StoreVirtual VSA or Nutanix we must leave our storage appliances up until last. If we let our hosts blanket shutdown their guests at once our storage will disappear while our VM’s are still running or in the middle of shutting down and this could lead to some serious corruption. So in this instance I would use PowerCLI. So to start with I will pick a server (probably a Windows box depending on UPS support for other OS’s and what you have in your environment) to install the UPS agent on, this could be a VM but would be easier if it was a physical server outside of the vSphere cluster. Next install PowerCLI on the server with the UPS agent.

So now we need a PowerShell script that out UPS agent can execute when utility power is lost to the UPS. Here is an example script you can use as a starting point but every environment is different so you will need to modify this to suite your needs.

Add-PSSnapin VMware.VimAutomation.Core
$Creds = Get-VICredentialStoreItem -Host vcentre -File C:\temp\credentials.xml
Connect-VIServer vcentre -User $Creds.User -Password $Creds.Password
$vmservers=Get-VM | Where-Object {$_.powerstate -eq ‘PoweredOn’ -and $_.name -notlike "*NTNX*" -and $_.name -notlike "*vCentre*" -and $_.name -notlike "vMA*"}
$novmtools=Get-VM | Where-Object {$_.powerstate -eq ‘PoweredOn’ -and $_.name -notlike "*NTNX*" -and $_.name -notlike "*vCentre*" -and $_.name -notlike "vMA*"} | Get-View | where-object {$_.guest.ToolsVersion -eq "0"}
$vmservers | Shutdown-VMGuest -Confirm $false
$novmtools | Stop-VM -Confirm $false
start-sleep -s 360
$stillon=Get-VM | Where-Object {$_.powerstate -eq ‘PoweredOn’ -and $_.name -notlike "*NTNX*" -and $_.name -notlike "*vCentre*" -and $_.name -notlike "vMA*"}
$stillon | Stop-VM -Confirm $false
start-sleep -s 60
Get-VM vcentre | Shutdown-VMGuest -Confirm $false

So take a copy of this and paste it to notepad (or your favourite text editor)  and modify as required. Save it as a ps1 file and save it somewhere on your chosen server. Depending on whether your UPS agent will directly execute a ps1 script you may need to use a batch file to call the PowerShell script.

What this script is doing is connecting to vCenter which may well be a VM within the cluster, you could also use something similar but connect directly to each host to save having to leave vCenter running. To avoid clear text credentials this script is using an xml file to provide the hashed credentials, details of how to do this can be found here. Once connected it gets all the VM’s running in the cluster except VM’s with certain text in their names, so here we can replace *NTNX* with *VSA* or whatever will work for your storage appliances and their naming convention, the same goes for vCenter if it is a VM and any vMA’s you might be using for the actual host shut down. The script then shuts down all VM’s excepting those with no VMWare Tools installed (because it can’t) and the VM’s we have excluded via their name. At this point we are also grabbing VM’s with no VMware Tools installed and powering them off as we won’t be able to gracefully shut them down from the host, be careful here as again we need to exclude VM’s we want to leave up just encase they don’t support VMware Tools. Now the script waits for 5 minutes before powering off anything that didn’t shut down, again excepting the VM’s we want to leave on. You can change the sleep time here if you have VM’s that usually take longer to shut down. You could omit this step altogether but an ungraceful powering off of a server would likely be preferable to a running VM’s storage disappearing. Lastly we shut down the vCenter server. You can also add a line to the end to shut down the local server as presumably we also want to have our physical servers shut down gracefully.

From here we can either start connecting to hosts with our script and shut them down via PowerCLI or we could have vMA appliances configured with UPS agents to shut down hosts, in the case of vMA’s we need to ensure the shut down delay is sufficient to allow our script to have finished. We still need to configure startup/shut down on each host as we want whatever our script left running to shut down gracefully with the host, hopefully this will just be vMA’s and our VSA appliances, of course if our vMA’s are on the shared VSA storage we could potentially have them getting corrupted but it is minimal effort to restore or rebuild the odd one of these as they probably won’t contain any valuable data.

Lastly you should test whatever script you come up with as best you can on non-production systems rather than waiting for a power outage to find out whether it works. My script is purely an example to give you some ideas so it is highly unlikely it will be fit for purpose in your environment. One way we can test this if we don’t have a suitable test environment is by making a slight modification to connect to a single host only and migrating everything off except the resident storage appliance and some non-critical non-production VM’s and then running your script, most UPS agents have some sort of test shut down facility. VSA style storage tends to suffer the loss of one appliance without losing the storage so this test should verify that the script works as expected without impact to production systems.

Thanks for reading and I hope this is useful to someone.