Introducing the Host Compute Service (HCS)

Summary

This post introduces a low level container management API in Hyper-V called the Host Compute Service (HCS).  It tells the story behind its creation, and links to a few open source projects that make it easier to use.

Motivation and Creation

Building a great management API for Docker was important for Windows Server Containers.  There’s a ton of really cool low-level technical work that went into enabling containers on Windows, and we needed to make sure they were easy to use.  This seems very simple, but figuring out the right approach was surprisingly tricky.

Our first thought was to extend our existing management technologies (e.g. WMI, PowerShell) to containers.  After investigating, we concluded that they weren’t optimal for Docker, and started looking at other options.

Next, we considered mirroring the way Linux exposes containerization primitives (e.g. control groups, namespaces, etc.).  Under this model, we could have exposed each underlying feature independently, and asked Docker to call into them individually.  However, there were a few questions about that approach that caused us to consider alternatives:

  1. The low level APIs were evolving (and improving) rapidly.  Docker (and others) wanted those improvements, but also needed a stable API to build upon.  Could we stabilize the underlying features fast enough to meet our release goals?
  2. The low level APIs were interesting and useful because they made containers possible.  Would anyone actually want to call them independently?

After a bit of thinking, we decided to go with a third option.  We created a new management service called the Host Compute Service (HCS), which acts as a layer of abstraction above the low level functionality.  The HCS was a stable API Docker could build upon, and it was also easier to use.  Making a Windows Server Container with the HCS is just a single API call.  Making a Hyper-V Container instead just means adding a flag when calling into the API.  Figuring out how those calls translate into actual low-level implementation is something the Hyper-V team has already figured out.

linux-arch windows-arch

Getting Started with the HCS

If you think this is nifty, and would like to play around with the HCS, here’s some infomation to help you get started.  Instead of calling our C API directly, I recommend using one the friendly wrappers we’ve built around the HCS.  These wrappers make it easy to call the HCS from higher level languages, and are released open source on GitHub.  They’re also super handy if you want to figure out how to use the C API.  We’ve released two wrappers thus far.  One is written in Go (and used by Docker), and the other is written in C#.

You can find the wrappers here:

If you want to use the HCS (either directly or via a wrapper), or you want to make a Rust/Haskell/InsertYourLanguage wrapper around the HCS, please drop a comment below.  I’d love to chat.

For a deeper look at this topic, I recommend taking a look at John Stark’s DockerCon presentation: https://www.youtube.com/watch?v=85nCF5S8Qok

John Slack
Program Manager
Hyper-V Team

Mid-'14 MacBook Pro (Retina) – 2.8Ghz Core i5/512Gb SSD/16GB

Hi

Looking to sell my MacBook Pro 13″ version.

Current running MacOS Sierra, it’s in excellent condition, comes boxed with charger.

This is the maxed out version of this model, as shown in the title.

  • 2.8Ghz Core i5
  • 512GB SSD
  • 16GB RAM
  • Intel Iro 1536MB

The screen is perfect, no dead pixels. The body is almost perfect, I say almost because there is a tiny ding in the bezel around the screen – hardly noticeable but worth mentioning. This is the only imperfection…

Mid-’14 MacBook Pro (Retina) – 2.8Ghz Core i5/512Gb SSD/16GB

(Wanted) Gtx 1070 Gpu.

As per title i’m looking to purchase a retail gtx 1070, must come boxed with accessories and be in as new condition if it is a used card,

payment via Paypal goods, or cash on collection if within a reasonable distance.

Ez.

Location: Bournemouth / Dorset

______________________________________________________
This message is automatically inserted in all classifieds forum threads.
By replying to this thread you agree to abide by the trading rules detailed…

(Wanted) Gtx 1070 Gpu.

Bulk changing virtual hard disk path

I received this in email today:

“I have XCOPY’d a bunch of VHDX files from one volume to another on WS2016.    What’s the easiest / fastest way to fix up the paths for the VM’s???”

The answer to this is quite simple.  Open PowerShell and run:

$oldPath = "C:UsersPublicDocumentsHyper-VVirtual Hard Disks"
$newPath = "D:"
get-vm | Get-VMHardDiskDrive | ? path -Like $oldPath* | %{Set-VMHardDiskDrive -VMHardDiskDrive $_ -Path $_.path.Replace($oldPath, $newPath)}

A couple of details on this answer:

  1. PowerShell is wonderful for these kinds of bulk operations
  2. While we do not allow you to edit the virtual hard disk path on a saved virtual machine using Hyper-V manager – we do allow you to do this through PowerShell.  In fact – there are a lot of things that are blocked in Hyper-V manager that are possible through PowerShell.

Cheers,
Ben

This Week on Windows: Resident Evil 7, Xbox app tips and more

This Week on Windows, we’re talking about Resident Evil 7 biohazard Deluxe Edition, now available on Windows 10 and Xbox One! Catch up on all the new Windows 10 Creators Update gaming features arriving this week for Windows Insiders, head over here for three tips for on-the-go gaming with the Xbox app or keep reading to see what’s new in the Windows Store.

Here’s what’s new in the Windows Store this week:

Resident Evil 7 biohazard Deluxe Edition

Resident Evil 7 biohazard Deluxe Edition

Menace and desperation seethe through the rotting walls of an abandoned southern plantation. Resident Evil 7 biohazard Deluxe Edition ($89.99) marks a new beginning for survival horror with a shift to an immersive first-person perspective. Powered by the RE Engine, graphics reach new heights of incredible photorealism to further draw players into the disturbing game world.

Siegecraft Commander

 Siegecraft Commander

The all-new Siegecraft Commander ($19.99) delivers high-stakes excitement as you plan, build and defend your towers – then strategize to take down those of your enemies. Play in turn-based matches, thinking tactically and aiming precisely – or play in real-time games, quickly constructing a base to win the war and start an all-out offensive.

Sketchable

Sketchable

Sketchable (Free, with IAP options) brings together the best aspects of a physical notebook and the flexibility of the digital world in an app that’s part journal, part canvas. The latest update adds grids to help you divide your canvas and position your elements for more pleasing compositions. And with new Surface Dial, more tools and shortcuts are at your fingertips: manipulate images, adjust volume, change color hues and more, all with simple gestures.

Have a great weekend!