Skip to content

Commit

Permalink
update iron and cobalt release for HCS APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Fay Meng committed Dec 22, 2021
1 parent 657b255 commit 02864f7
Show file tree
Hide file tree
Showing 12 changed files with 1,386 additions and 69 deletions.
7 changes: 7 additions & 0 deletions virtualization/api/hcs/Reference/APIOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ The following section contains the definitions of the Host Compute System APIs.
|Function|Description|
|---|---|
|[HcsCreateComputeSystem](./HcsCreateComputeSystem.md)|Create a new compute system|
|[HcsCreateComputeSystemInNamespace](./HcsCreateComputeSystemInNamespace.md)|Create a new compute system in a given namespace|
|[HcsOpenComputeSystem](./HcsOpenComputeSystem.md)|Open a handle to an existing compute system|
|[HcsOpenComputeSystemInNamespace](./HcsOpenComputeSystemInNamespace.md)|Open a handle to an existing compute system in a given namespace|
|[HcsCloseComputeSystem](./HcsCloseComputeSystem.md)|Close a handle to a compute system|
|[HcsStartComputeSystem](./HcsStartComputeSystem.md)|Start a compute system|
|[HcsShutDownComputeSystem](./HcsShutDownComputeSystem.md)|Cleanly Shut down a compute system|
Expand All @@ -86,6 +88,8 @@ The following section contains the definitions of the Host Compute System APIs.
|[HcsModifyComputeSystem](./HcsModifyComputeSystem.md)|Modify setting of a compute system|
|[HcsSetComputeSystemCallback](./HcsSetComputeSystemCallback.md)|Register a callback function to receive notifications for the compute system|
|[HcsEnumerateComputeSystems](./HcsEnumerateComputeSystems.md)|Enumerate existing compute systems|
|[HcsEnumerateComputeSystemsInNamespace](./HcsEnumerateComputeSystemsInNamespace.md)|Enumerate existing compute systems in a given namespace|
|[HcsWaitForComputeSystemExit](./HcsWaitForComputeSystemExit.md)|Wait compute system to exit|


## Process Execution
Expand All @@ -103,6 +107,7 @@ The following functions enable applications to execute a process in a compute sy
|[HcsGetProcessProperties](./HcsGetProcessProperties.md)|Return properties a process in a compute system |
|[HcsModifyProcess](./HcsModifyProcess.md)|Modify the parameters in a process of a compute system |
|[HcsSetProcessCallback](./HcsSetProcessCallback.md)|Register a callback function to receive notifications for a process in a compute system |
|[HcsWaitForProcessExit](./HcsWaitForProcessExit.md)|Wait a process in a compute system to exit|

## Host Service Operations

Expand All @@ -126,6 +131,7 @@ The following set of functions allow applications to set up the environment to r
|[HcsRevokeVmAccess](./HcsRevokeVmAccess.md)|Remove an entry to a file's ACL that granted access for a VM|
|[HcsGrantVmGroupAccess](./HcsGrantVmGroupAccess.md)|Grant VM group access (R/O) to the specified file.|
|[HcsRevokeVmGroupAccess](./HcsRevokeVmGroupAccess.md)|Remove VM group access for the specified file.|
|[HcsGetProcessorCompatibilityFromSavedState](./HcsGetProcessorCompatibilityFromSavedState.md)|Get the processor compatibility from runtime-state file (.vmrs)|

## Storage Utility Functions for Containers

Expand All @@ -138,6 +144,7 @@ The following functions allow applications to create and manage the file system
|[HcsExportLegacyWritableLayer](./HcsExportLegacyWritableLayer.md)|Export a legacy container writable layer|
|[HcsDestroyLayer](./HcsDestroyLayer.md)|Delete a container layer from the host|
|[HcsSetupBaseOSLayer](./HcsSetupBaseOSLayer.md)|Set up a layer that contains a base OS for a container|
|[HcsSetupBaseOSVolume](./HcsSetupBaseOSVolume.md)|Set up the base OS layer based on the mounted volume|
|[HcsInitializeWritableLayer](./HcsInitializeWritableLayer.md)|Initialize the writable layer for a container (i.e. the layer that captures the filesystem)|
|[HcsInitializeLegacyWritableLayer](./HcsInitializeLegacyWritableLayer.md)|Initialize the writable layer for a container using the legacy hive folder format|
|[HcsAttachLayerStorageFilter](./HcsAttachLayerStorageFilter.md)|Set up the layer storage filter on a writable container layers|
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
title: HcsCreateComputeSystemInNamespace
description: HcsCreateComputeSystemInNamespace
author: faymeng
ms.author: qiumeng
ms.topic: reference
ms.prod: virtualization
ms.technology: virtualization
ms.date: 06/09/2021
api_name:
- HcsCreateComputeSystemInNamespace
api_location:
- computecore.dll
api_type:
- DllExport
topic_type:
- apiref
---
# HcsCreateComputeSystemInNamespace

## Description

Creates a new compute system in a given namespace.

## Syntax

```cpp
HRESULT WINAPI
HcsCreateComputeSystemInNamespace(
_In_ PCWSTR idNamespace,
_In_ PCWSTR id,
_In_ PCWSTR configuration,
_In_ HCS_OPERATION operation,
_In_opt_ const HCS_CREATE_OPTIONS* options,
_Out_ HCS_SYSTEM* computeSystem
);
```
## Parameters
`idNamespace`
The string of the namespace to create the compute system.
`id`
Unique Id identifying the compute system.
`configuration`
JSON document specifying the settings of the [compute system](./../SchemaReference.md#ComputeSystem). The compute system document is expected to have a `Container`, `VirtualMachine` or `HostedSystem` property set since they are mutually exclusive.
`operation`
The handle to the operation that tracks the create operation.
`securityDescriptor`
Reserved for future use, must be `NULL`.
`computeSystem`
Receives a handle to the newly created compute system. It is the responsibility of the caller to release the handle using [HcsCloseComputeSystem](./HcsCloseComputeSystem.md) once it is no longer in use.
## Return Values
The function returns [HRESULT](./HCSHResult.md).
If the return value is `S_OK`, it means the operation started successfully. Callers are expected to get the operation's result using [`HcsWaitForOperationResult`](./HcsWaitForOperationResult.md) or [`HcsGetOperationResult`](./HcsGetOperationResult.md).
## Operation Results
The return value of [`HcsWaitForOperationResult`](./HcsWaitForOperationResult.md) or [`HcsGetOperationResult`](./HcsGetOperationResult.md) based on current operation listed as below.
| Operation Result Value | Description |
| -- | -- |
| `S_OK` | The compute system was created successfully |
| `HCS_E_OPERATION_PENDING` | The compute system has not been fully created yet |
| Other Windows `HRESULT` value | If something went wrong when creating the compute system, the return value here will give hints on what could have gone wrong |
If the operation's result is not `S_OK`, then it's possible the result document might contain the error message.
## Requirements
|Parameter|Description|
|---|---|
| **Minimum supported client** | Windows 10, version 2004 |
| **Minimum supported server** | Windows Server, version 2004 |
| **Target Platform** | Windows |
| **Header** | ComputeCore.h |
| **Library** | ComputeCore.lib |
| **Dll** | ComputeCore.dll |
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: HcsEnumerateComputeSystemsInNamespace
description: HcsEnumerateComputeSystemsInNamespace
author: faymeng
ms.author: qiumeng
ms.topic: reference
ms.prod: virtualization
ms.technology: virtualization
ms.date: 06/09/2021
api_name:
- HcsEnumerateComputeSystemsInNamespace
api_location:
- computecore.dll
api_type:
- DllExport
topic_type:
- apiref
---
# HcsEnumerateComputeSystemsInNamespace

## Description

Enumerates existing compute systems in a given namespace.

## Syntax

```cpp
HRESULT WINAPI
HcsEnumerateComputeSystemsInNamespace(
_In_ PCWSTR idNamespace,
_In_opt_ PCWSTR query,
_In_ HCS_OPERATION operation
);
```
## Parameters
`idNamespace`
The string contains the queried namespace.
`query`
Optional JSON document of [SystemQuery](./../SchemaReference.md#SystemQuery) specifying a query for specific compute systems.
`operation`
The handle to the operation that tracks the enumerate operation.
## Return Values
The function returns [HRESULT](./HCSHResult.md).
If the return value is `S_OK`, it means the operation started successfully. Callers are expected to get the operation's result using [`HcsWaitForOperationResult`](./HcsWaitForOperationResult.md) or [`HcsGetOperationResult`](./HcsGetOperationResult.md)
## Operation Results
The return value of [`HcsWaitForOperationResult`](./HcsWaitForOperationResult.md) or [`HcsGetOperationResult`](./HcsGetOperationResult.md) based on current operation listed as below.
| Operation Result Value | Description |
| -- | -- |
| `S_OK` | The operation was finished successfully, the result document returned by the hcs operation is a JSON document representing an array of compute system [Properties](./../SchemaReference.md#Properties) |
## Requirements
|Parameter|Description|
|---|---|
| **Minimum supported client** | Windows 10, version 2004 |
| **Minimum supported server** | Windows Server, version 2004 |
| **Target Platform** | Windows |
| **Header** | ComputeCore.h |
| **Library** | ComputeCore.lib |
| **Dll** | ComputeCore.dll |
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ The return value of [`HcsWaitForOperationResult`](./HcsWaitForOperationResult.md
| Operation Result Value | Description |
| -- | -- |
| `S_OK` | The operation was finished successfully, the result document returned by the hcs operation is a JSON document representing a compute system's [Properties](./../SchemaReference.md#Properties) |
| `S_OK` | The operation was finished successfully, the result document returned by the hcs operation is a JSON document representing a compute system's [Properties](./../SchemaReference.md#Properties). Compute system Id and [SystemType](./../SchemaReference.md#SystemType) will always be returned.|
## Requirements
|Parameter|Description|
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: HcsGetProcessorCompatibilityFromSavedState
description: HcsGetProcessorCompatibilityFromSavedState
author: faymeng
ms.author: qiumeng
ms.topic: reference
ms.prod: virtualization
ms.technology: virtualization
ms.date: 12/21/2021
api_name:
- HcsGetProcessorCompatibilityFromSavedState
api_location:
- computecore.dll
api_type:
- DllExport
topic_type:
- apiref
---
# HcsGetProcessorCompatibilityFromSavedState

## Description

Returns processor compatibility fields in JSON string format.

## Syntax

```cpp
HRESULT WINAPI
HcsGetProcessorCompatibilityFromSavedState(
PCWSTR RuntimeFileName,
_Outptr_opt_ PCWSTR* ProcessorFeaturesString
);
```
## Parameters
`RuntimeFileName`
The path to the vmrs file.
`ProcessorFeaturesString`
JSON document of the processor compatibilities as [VmProcessorRequirements](./../SchemaReference.md#VmProcessorRequirements).
The caller is responsible for releasing the returned string using [`LocalFree`](https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-localfree).
## Return Values
The function returns [HRESULT](./HCSHResult.md).
## Requirements
|Parameter|Description|
|---|---|
| **Minimum supported client** | Windows 10, version 2104|
| **Minimum supported server** | Windows Server 2022 |
| **Target Platform** | Windows |
| **Header** | ComputeCore.h |
| **Library** | ComputeCore.lib |
| **Dll** | ComputeCore.dll |
4 changes: 2 additions & 2 deletions virtualization/api/hcs/Reference/HcsGrantVmGroupAccess.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ The function returns [HRESULT](./HCSHResult.md).
|Parameter|Description|
|---|---|
| **Minimum supported client** | Windows 10, version 1809 |
| **Minimum supported server** | Windows Server 2019 |
| **Minimum supported client** | Windows 10, version 2004 |
| **Minimum supported server** | Windows Server, version 2004 |
| **Target Platform** | Windows |
| **Header** | ComputeCore.h |
| **Library** | ComputeCore.lib |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: HcsOpenComputeSystemInNamespace
description: HcsOpenComputeSystemInNamespace
author: faymeng
ms.author: qiumeng
ms.topic: reference
ms.prod: virtualization
ms.technology: virtualization
ms.date: 06/09/2021
api_name:
- HcsOpenComputeSystemInNamespace
api_location:
- computecore.dll
api_type:
- DllExport
topic_type:
- apiref
---
# HcsOpenComputeSystemInNamespace

## Description

Opens a handle to an existing compute system in a given namespace.

## Syntax

```cpp
HRESULT WINAPI
HcsOpenComputeSystemInNamespace(
_In_ PCWSTR idNamespace,
_In_ PCWSTR id,
_In_ DWORD requestedAccess,
_Out_ HCS_SYSTEM* computeSystem
);
```
## Parameters
`idNamespace`
The string contains the namespace of the compute system to open.
`id`
Unique Id identifying the compute system.
`requestedAccess`
Reserved for future use, must be `GENERIC_ALL`.
`computeSystem`
Receives a handle to the compute system. It is the responsibility of the caller to release the handle using [HcsCloseComputeSystem](./HcsCloseComputeSystem.md) once it is no longer in use.
## Return Values
The function returns [HRESULT](./HCSHResult.md).
## Requirements
|Parameter|Description|
|---|---|
| **Minimum supported client** | Windows 10, version 2004 |
| **Minimum supported server** | Windows Server, version 2004 |
| **Target Platform** | Windows |
| **Header** | ComputeCore.h |
| **Library** | ComputeCore.lib |
| **Dll** | ComputeCore.dll |
4 changes: 2 additions & 2 deletions virtualization/api/hcs/Reference/HcsRevokeVmGroupAccess.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ The function returns [HRESULT](./HCSHResult.md).
|Parameter|Description|
|---|---|
| **Minimum supported client** | Windows 10, version 1809 |
| **Minimum supported server** | Windows Server 2019 |
| **Minimum supported client** | Windows 10, version 2004 |
| **Minimum supported server** | Windows Server, version 2004 |
| **Target Platform** | Windows |
| **Header** | ComputeCore.h |
| **Library** | ComputeCore.lib |
Expand Down
Loading

0 comments on commit 02864f7

Please sign in to comment.