Mini Hyper-V: Operating System

When we left my project, the new mini server had booted up using Windows Hyper-V Server 2012 R2. This is a server core installation intended to only run Hyper-V, which is perfect for my needs. The server booted up with a temporary name and a DHCP assigned IP address. The next step is configure the server and join it to my test domain.

I could do this all interactively using the sconfig script, but where’s the challenge in that! So I’m going to configure the server from a Windows 8 client with RSAT installed in my target domain. There are ways to configure Hyper-V in workgroup environment but I want to take advantage of domain. It shouldn’t really make any difference but my test domain, Globomantics.local, is running in a Hyper-V environment on my Windows 8 laptop. My mini Hyper-V server will belong to this domain, as will any virtual machines it ends up hosting.

To get started I know the IP address of the new server and credentials for the local administrator account. With this I can use PowerShell remoting, since it is enabled by default in Windows Server 2012. However, on my client, I need to temporarily add the host to the TrustedHosts list. Otherwise, the client won’t trust the server and I won’t be able to connect. In an elevated I’ll run this command.

Using -Force suppresses confirmation prompts. This setting will allow me to connect to any host using an IP address that starts with 172.16. I should now be able to use Invoke-Command or run any configuration workflows. In fact, I’m going to use some basic workflows to set the computer name and IP configuration. First, I’ll verify remote connectivity.

Looks good. Next, I’ll define some PowerShell variables to use with my workflows.

The first workflow I want to run will perform some basic configuration.

Once this workflow is loaded into my session I can run it and configure the new server.

Next, I want to configure the IP configuration. The new server only has a single NIC which simplifies matters a great deal. Here’s the workflow I’m going to use.

To execute, I’ll splat a hashtable of parameters to it.

One caveat here is that when you change the IP address you’ll lose your connection to the remote computer. PowerShell will keep retrying. What I probably should have done was to include some parameters to limit the retry count. Eventually, the command will timeout and I can continue.

Next, I want to rename the computer and join it to the domain.

Again, I’ll splat a hashtable of parameters, this time connecting to the new IP address.

Eventually the computer will reboot and I’ll get a positive result.


Excellent. Now that the server has rebooted it belongs to the domain and I can use the new name to verify a few things.


I used the new server’s FQDN for the CIMSession name as I couldn’t get the NETBIOS name to work. Probably because I didn’t wait long enough for browser stats to get updated. Anyway, it works and I can also verify Hyper-V is working.


The last thing I should do is remove the trusted hosts settings on the client. But because I trust my network and I might need to do this again, I think I’ll leave it for now. But I did it! I now have a Hyper-V server ready for me to use.

Mini Hyper-V: Setup

Now that hardware has been installed on my mini Hyper-V project, next up is to setup the unit and get software installed. The Brix fires up very quickly and of course since nothing is installed I initially see the no operating system found message. Rebooting, pressing F2 gets me into the BIOS setup.


The only thing I need to do on the first page is to adjust the date and time. I was hoping I could change the Project name to something such as Mini Hyper-V, but it doesn’t appear that is possible. On the Advanced tab, I’ll want to enable virtualization.


You can see the Brix has a dual-core i7 processor. On the Advanced tab I can also verify the mSATA drive.


Checking boot options I see that the unit only sees the internal drive.


But the device supports EEFI and legacy boot options so I’m not expecting any problems. After saving my changes I even verified that F12 will bring up a boot menu, should I need it.

Next I need an operating system. I decided to try preview of Windows Server 2012 Hyper-V R2. I realize I’ll need to re-install when it is finally released. I don’t expect to run anything other than Hyper-V on this little box and Server Core keeps the footprint nice and small. But how do I get it onto the unit? Easy. I need to “burn” the ISO to a USB stick. To do that I’ll use the freeware, ISO to USB.

One thing I messed up initially, not really thinking, is that you need a decent size USB device. I foolishly started with 2GB only to realize I need at least a 4GB device.


The utility will reformat the USB device. The one I was using had some pre-existing files and I had to try a couple of times to get the process to work. I think the best approach is to delete any files first, or even “pre-format” the device first. But once I got through that hurdle after about 7 minutes I had a bootable USB device which I inserted into the Brix and fired up.

The unit immediately detected the USB device and started the installation process.


Excellent. I selected a custom install.


By the way, I’m installing without a mouse but the keyboard shortcuts are more than sufficient. Install is very speedy. Copying the install files too literally seconds. Of course I’m installing Server Core but still very impressive.


The overall installation took less than 3 minutes. Reboots are blazingly fast. Within minutes I had the initial screen to change the admin password.


After struggling to get a password typed on my super mini keyboard, I’m eventually rewarded with the Server Core setup windows.


I was wondering if I would need to load any drivers off the CD that came with the Brix, but so far I haven’t seen a need. I notice an occasional ripple in the video, but that could be an artifact from the ancient Dell monitor I’m using or the adapter. In any event it’s no big deal since once this is setup it is going to run headless anyway. The server got a DHCP address which is the most important element so I should be ready to start configuring the OS. I’ll cover that in the next post.

Mini Hyper-V: Hardware Build

So the parts arrived for my mini Hyper-V project. I have to say I’m really excited about this. Everything is so tiny! Here’s what I have to work with.


I have the Brix unit, a 256GB mSATA drive, 16GB of RAM and a video adapter. The Brix unit is amazingly small and fits in the palm of your hand. As you can see, it is not much bigger than a CD-ROM. Oh, and that white spot is actually a reflection from the ceiling light. The only thing on the top, aside from the label is a power button which will glow blue when on.


There is a single USB port on the front. Here’s the business end. Sorry it is a little out of focus but I think you get the idea.


Now to start assembling. All I need is a small phillips-head screwdriver. Turning the unit over there are 4 corner screws. In the upper right there is also a small knob. Turns out when you unscrew everything you use it as a handle of sorts to remove the bottom. Very nice.


The internals are pretty straightforward.


The slots at the top are for memory and the mSATA goes in the bottom. You slide it in to the slot.


It doesn’t lie flat. You need to screw it down.


Even though the drive has holes for 2 screws, the Brix only has one, but it seems to get the job done. Next, I slide in the memory. This is easier to do if you insert the stick that will be on the bottom. The sticks slide in and then lock into place.

Here’s the finished install.


All that remains is to screw the bottom back on. Here I ran into my first minor gotcha. The unit isn’t an exact square so the back can only go on a few ways. But it seemed to me that one way fit better. The bottom has a “This Side Up” label. I think the right way is to have that label pointing to the “back” ports. The Brix is designed to be mounted (it includes a mounting plate), but since I’m not going to do that I think I’m ok.

I hooked up the power and fired it up.


Wow. Other than the blue light on the power button there is no indication that the unit is running. There is a fan, but it is impossible to hear. And of course the mSATA is silent. It is stunningly quiet. I can’t wait to get this bad boy loaded.

Building a Mini Hyper-V Server

Microsoft Hyper-VSince I work at home, I naturally lack the extensive IT infrastructure that you most likely enjoy. However I rely on a mix of virtualized machines delivered through an ESXi server and running Hyper-V on my Windows 8 laptop. The downside, is that even with 8GB or RAM and an SSD in my laptop, I’m still limited by the number of virtual machines I can run, and I also don’t have the ability to test some server-centric Hyper-V concepts like replication. Clearly I need a Hyper-V platform. But I can’t go out buy a used server from eBay. I have no room and my wife would not be too happy with likely noise and added electrical cost. In addition, between my conference appearances and training I would really like something portable. ¬†Yes, there is a trade-off between performance and portability, but that is something I can live with.

After some research, I decided to build a Hyper-V server using the smallest form factor I could find. I decided to try using the Gigabyte Brix.

I originally thought of using an Intel NUC, but it appears they decided not to release an i7 model and I wanted every bit of performance edge I could get. The Brix, an unfortunate name I’ll admit, looked to be a reasonable alternative. I also considered a Mac Mini but the customizations I wanted to do would have been much more difficult in the Mini. Apple doesn’t really intend it to be a user-modified device. You can order a Brix unit from NewEgg for under $500.

I also will need a hard drive, which in this case means a Plextor 256GB mSATA drive which I got for about $200. I also need to max out the RAM at 16GB which added about $150 to the project price. I intend to temporarily use an existing keyboard and monitor for the set up. However, the Brix uses HDMI and a mini display port so I also ordered a mini display port to VGA adapter for another $24. Even though internal storage is limited, the unit sports 2 USB 3.0 ports so that should be more than sufficient. Or if all goes well, the project cost is pretty reasonable and I can build another unit.

So this is the start of my project. I’ll be blogging my experiences. I’m sure I’ll run into obstacles, but I’ll share those as well and how I overcame them. I’m looking forward to this project not only because I’ll learn new things, but because I really need the end result. Check back later for a progress report.

Hyper-V Waiting to Merge

Microsoft Hyper-VIn my Hyper-V environment I have a test domain which I use for pretty much all of my training, writing and video work. As part of my “belt and suspenders” approach, I periodically take a snapshot of all the virtual machines using the theory that if I had to, I could roll back the entire domain.

Today I deleted the old snapshot and was planning on firing off a new one. As I was getting ready to run this command:

I realized disks were still merging from the snapshot deletion I had just done, and that I should wait until this completed. Of course, I didn’t want to constantly run Get-VM to check the status. So I built a simple background job to loop while merging. I used this command:

As long as the Get-VM expression is true, PowerShell will run through the scriptblock. In this case I’m writing a . to indicate progress and then sleeping for 1 second. I probably should have gone 5 or 10 seconds. Anyway, this now runs as a background job. I can periodically check on the job. Or use Wait-Job.

Once I see that the job has completed, I can create my snapshots. And because that too might take time to complete, I’ll use the -AsJob parameter for Checkpoint-VM. I suppose I could have added the command in my waiting job. And maybe next time I will. What I really need to do is write a script to clear the old snapshot, wait for the merge to complete and then take a new snapshot. I suppose it might look like this, although I haven’t tested it yet.

I would run the entire script as a background job. Actually I might even take this a step further and run this as a scheduled PowerShell job so I don’t have to think about this anymore.