Recently, I’ve been getting more and more interested in Chef, and decided it was time to build out a testlab in my Hyper-V.
I started imaging a new VM using the 14.10 LTS release of Ubuntu, one of the supported environments for Chef Server.
However, during install, my VM would freeze here:
At the same time, I noticed a critical level event from Hyper-V.
‘Chef’ was faulted because the guest executed an intercepting instruction not supported by Hyper-V instruction emulation. If the problem persists, contact Product Support. (Virtual machine ID 8895146E-C175-4CA5-B7A6-57E1D6E48290)
I did a bunch of googling and found…almost no one with this same issue, and I thought it was related to Hyper-V on Windows 10 Tech Preview. As it turns out, this is caused by some generation 2 Virtual Machine features, namely Dynamic Memory.
Install of Ubuntu or other *Nix distro freezes during install on Hyper-V, as a Gen 2 VM
Dynamic Memory does not appear to be supported during install of Ubuntu, and will manifest as errors during OS Install and Parititoning
Disable Dynamic Memory until install is completed. After installing, run ‘sudo apt-get update’ to ensure drivers are up to date, for optimum VM sveltness.
Super quicky here. With Windows Server Tech preview 4 shipping now, we have a new release of Server Nano to play with. Ben Armstrong wrote a guide for tech preview 3, but the cmdlets have changed since then, so I figured I’d write this out to help you as well!
Step 1: Get the Server tech preview 4 media here
Step 2: Launch PowerShell, browse to the media\NanoServer folder. (In my case, Drive F:)
Step 3: In PowerShell run the following:
New-NanoServerImage -MediaPath F:\ -BasePath X:\Nano -TargetPath 'X:\Nano\VHD\NanoServer.vhd' -GuestDr
ivers -Containers -EnableEMS -ComputerName Nano
Let’s break down those parameters:
- MediaPath – the Server TP 4 drive, in my case F:\
- BasePath – the staging directory, this cmdlet will dump a lot of stuff here to do its magic to convert the WIM into a VHD
- TargetPath – where to put the completed VHD
- GuestDrivers – this switch injects the Hyper-V guest Drivers
- Containers – want to try Docker Containers? Put this param in!
- EnableEms – want to play with the new Emergency Management Console for Nano? Sure you do, include this one too!
- ComputerName – Whatcha wanna call this new computer?
These are probaby the most important params.
If it worked, you’ll see something like the following
Now, be warned that this will create a .vhd, so you’re stuck with a Gen 1 VM, which really isn’t so bad, given how little Nano can do today :p
To boot her up:
My next step is to do domain join, and see what all we can load up on her!
This was kicking my butt today, but turns out that it had an easy work around.
I learned a long-time ago that if you’re running Hyper-V on your Device, you should not install a VPN client on the host, but rather should be doing this within child VMs. The reason for this is that sometimes the drivers associated with a VPN adapter don’t play nicely with a hypervisor, and can often result in a blue screen error when they attempt to make changes to the virtual adapters displayed to the parent partition.
So, I made a Windows 10 VM to run my VPN client…however, I was getting errors of ‘Session Ended’, along with tons of murky stuff in my Event Viewer, related to missing devices, etc. It looked pretty scary.
As it turns out this is a simple resolution. Continue reading
Last week, I had an amazing time at the Microsoft MVP Summit, it was a dream come true! Speaking of true, I even got to meet Jim Truher and Bruce Payette! Simply a wonderful, wonderful time.
Probably my favorite part about being there was getting to be on a live podcast recording for TWiT network’s Coding 101 show, along with Sarah Dutkiewicz, Adam Bertram, Jeremy Clark, June Blender, & Jeff Wouters! We got to talk about what got us into coding, how to become an MVP, and our favorite (and worst) interview questions. I feel like I did pretty well, despite my heart trying to pound out of my chest.
Let me know how you think I did!
If you’re reading this, you’re sneaky! I’ve got something really cool coming down the pipe about how to use Appveyor and Pester, so keep checking in!
Like most of my posts here, I’m going to try to make something sound easy, when in reality I’ve spent months crying into my coffee trying to understand it. In truth, I’ve been trying to get oAuth to work for more than a year now.
It all started with a simple goal, I just wanted to check my blog stats easily using WordPress’s REST API, and I wanted to do it from PowerShell, should be simple, right? WRONG
My initial issue was that I didn’t want to understand oAuth, I just wanted to copy and paste some stuff and hope that it worked. I can tell you now that I’ve worked it out, it really isn’t that difficult, but knowing what’s happening will make it all much easier.
What is oAuth?
oAuth was made to solve a problem, that of sharing information between two different web services. We need oAuth because a user may want to right click a file from Dropbox.com and post it on Facebook with one click, for instance. Or have their Twitter send a Tweet when they update their Blog on WordPress. oAuth is a crucial verification step when tying two services together, and it’s worth the time to spend learning how it works. Furthermore, most of the coolest REST APIs out there require you to authenticate using oAuth in order to even use them.
Now, let’s see what the steps are to get your application (or script) linked to a service that uses oAuth.