versions: Update cloud-hypervisor to release v0.14.1

Highlights for cloud-hypervisor version 0.14.0 include: 1) Structured
event monitoring; 2) MSHV improvements; 3) Improved aarch64 platform; 4)
Updated hotplug documentation; 6) PTY control for serial and
virtio-console; 7) Block device rate limiting; 8) Plan to deprecate the
support of "LinuxBoot" protocol and support PVH protocol only.

Highlights for cloud-hypervisor version 0.13.0 include: 1) Wider VFIO
device support; 2) Improve huge page support; 3) MACvTAP support; 4) VHD
disk image support; 5) Improved Virtio device threading; 6) Clean
shutdown support via synthetic power button.

Details can be found:
https://github.com/cloud-hypervisor/cloud-hypervisor/releases

Note: The client code of cloud-hypervisor's OpenAPI is automatically
generated by `openapi-generator` [1-2]. As the API changes do not
impact usages in Kata, no additional changes in kata's runtime are
needed to work with the latest version of cloud-hypervisor.

[1] https://github.com/OpenAPITools/openapi-generator
[2] https://github.com/kata-containers/kata-containers/blob/main/src/runtime/virtcontainers/pkg/cloud-hypervisor/README.md

Fixes: #1591

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen 2021-03-31 11:06:49 -07:00
parent ed2e736df7
commit 84b62dc3b1
46 changed files with 584 additions and 234 deletions

View File

@ -36,6 +36,7 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**CreateVM**](docs/DefaultApi.md#createvm) | **Put** /vm.create | Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created.
*DefaultApi* | [**DeleteVM**](docs/DefaultApi.md#deletevm) | **Put** /vm.delete | Delete the cloud-hypervisor Virtual Machine (VM) instance.
*DefaultApi* | [**PauseVM**](docs/DefaultApi.md#pausevm) | **Put** /vm.pause | Pause a previously booted VM instance.
*DefaultApi* | [**PowerButtonVM**](docs/DefaultApi.md#powerbuttonvm) | **Put** /vm.power-button | Trigger a power button in the VM
*DefaultApi* | [**RebootVM**](docs/DefaultApi.md#rebootvm) | **Put** /vm.reboot | Reboot the VM instance.
*DefaultApi* | [**ResumeVM**](docs/DefaultApi.md#resumevm) | **Put** /vm.resume | Resume a previously paused VM instance.
*DefaultApi* | [**ShutdownVM**](docs/DefaultApi.md#shutdownvm) | **Put** /vm.shutdown | Shut the VM instance down.
@ -76,9 +77,11 @@ Class | Method | HTTP request | Description
- [NumaDistance](docs/NumaDistance.md)
- [PciDeviceInfo](docs/PciDeviceInfo.md)
- [PmemConfig](docs/PmemConfig.md)
- [RateLimiterConfig](docs/RateLimiterConfig.md)
- [RestoreConfig](docs/RestoreConfig.md)
- [RngConfig](docs/RngConfig.md)
- [SgxEpcConfig](docs/SgxEpcConfig.md)
- [TokenBucket](docs/TokenBucket.md)
- [VmAddDevice](docs/VmAddDevice.md)
- [VmConfig](docs/VmConfig.md)
- [VmInfo](docs/VmInfo.md)

View File

@ -123,6 +123,18 @@ paths:
"405":
description: The VM instance could not reboot because it is not booted.
summary: Reboot the VM instance.
/vm.power-button:
put:
operationId: power-buttonVM
responses:
"204":
description: Power button successfully triggered in the VM
"404":
description: The button could not be triggered because it is not created
yet
"405":
description: The button could not be triggered because it is not booted.
summary: Trigger a power button in the VM
/vm.resize:
put:
requestBody:
@ -332,7 +344,7 @@ components:
VmInfo:
description: Virtual Machine information
example:
memory_actual_size: 2
memory_actual_size: 3
state: Created
config:
console:
@ -340,54 +352,75 @@ components:
file: file
iommu: false
balloon:
size: 4
size: 9
memory:
hugepages: false
shared: false
hugepage_size: 4
mergeable: false
size: 9
hotplugged_size: 2
zones:
- hugepages: false
shared: false
hugepage_size: 1
mergeable: false
file: file
size: 4
hotplugged_size: 1
host_numa_node: 7
size: 7
hotplugged_size: 6
host_numa_node: 1
id: id
hotplug_size: 1
- hugepages: false
shared: false
hugepage_size: 1
mergeable: false
file: file
size: 4
hotplugged_size: 1
host_numa_node: 7
size: 7
hotplugged_size: 6
host_numa_node: 1
id: id
hotplug_size: 1
hotplug_size: 3
hotplug_method: acpi
disks:
- path: path
num_queues: 1
num_queues: 7
readonly: false
iommu: false
queue_size: 6
queue_size: 1
vhost_socket: vhost_socket
vhost_user: false
direct: false
poll_queue: true
rate_limiter_config:
ops:
size: 0
one_time_burst: 0
refill_time: 0
bandwidth:
size: 0
one_time_burst: 0
refill_time: 0
id: id
- path: path
num_queues: 1
num_queues: 7
readonly: false
iommu: false
queue_size: 6
queue_size: 1
vhost_socket: vhost_socket
vhost_user: false
direct: false
poll_queue: true
rate_limiter_config:
ops:
size: 0
one_time_burst: 0
refill_time: 0
bandwidth:
size: 0
one_time_burst: 0
refill_time: 0
id: id
cpus:
topology:
@ -409,25 +442,25 @@ components:
path: path
numa:
- distances:
- distance: 1
- distance: 3
destination: 6
- distance: 1
- distance: 3
destination: 6
cpus:
- 3
- 3
- 5
- 5
memory_zones:
- memory_zones
- memory_zones
guest_numa_id: 6
- distances:
- distance: 1
- distance: 3
destination: 6
- distance: 1
- distance: 3
destination: 6
cpus:
- 3
- 3
- 5
- 5
memory_zones:
- memory_zones
- memory_zones
@ -437,20 +470,20 @@ components:
src: /dev/urandom
sgx_epc:
- prefault: false
size: 9
size: 6
- prefault: false
size: 9
size: 6
fs:
- num_queues: 5
queue_size: 9
cache_size: 9
- num_queues: 6
queue_size: 3
cache_size: 6
dax: true
tag: tag
socket: socket
id: id
- num_queues: 5
queue_size: 9
cache_size: 9
- num_queues: 6
queue_size: 3
cache_size: 6
dax: true
tag: tag
socket: socket
@ -463,13 +496,13 @@ components:
pmem:
- mergeable: false
file: file
size: 6
size: 1
iommu: false
id: id
discard_writes: false
- mergeable: false
file: file
size: 6
size: 1
iommu: false
id: id
discard_writes: false
@ -485,31 +518,37 @@ components:
path: path
net:
- tap: tap
num_queues: 7
num_queues: 9
iommu: false
queue_size: 1
queue_size: 6
vhost_socket: vhost_socket
vhost_user: false
ip: 192.168.249.1
id: id
mac: mac
fd:
- 8
- 8
mask: 255.255.255.0
- tap: tap
num_queues: 7
num_queues: 9
iommu: false
queue_size: 1
queue_size: 6
vhost_socket: vhost_socket
vhost_user: false
ip: 192.168.249.1
id: id
mac: mac
fd:
- 8
- 8
mask: 255.255.255.0
device_tree:
key:
children:
- children
- children
pci_bdf: 6
pci_bdf: 7
resources:
- '{}'
- '{}'
@ -540,7 +579,7 @@ components:
children:
- children
- children
pci_bdf: 6
pci_bdf: 7
resources:
- '{}'
- '{}'
@ -589,54 +628,75 @@ components:
file: file
iommu: false
balloon:
size: 4
size: 9
memory:
hugepages: false
shared: false
hugepage_size: 4
mergeable: false
size: 9
hotplugged_size: 2
zones:
- hugepages: false
shared: false
hugepage_size: 1
mergeable: false
file: file
size: 4
hotplugged_size: 1
host_numa_node: 7
size: 7
hotplugged_size: 6
host_numa_node: 1
id: id
hotplug_size: 1
- hugepages: false
shared: false
hugepage_size: 1
mergeable: false
file: file
size: 4
hotplugged_size: 1
host_numa_node: 7
size: 7
hotplugged_size: 6
host_numa_node: 1
id: id
hotplug_size: 1
hotplug_size: 3
hotplug_method: acpi
disks:
- path: path
num_queues: 1
num_queues: 7
readonly: false
iommu: false
queue_size: 6
queue_size: 1
vhost_socket: vhost_socket
vhost_user: false
direct: false
poll_queue: true
rate_limiter_config:
ops:
size: 0
one_time_burst: 0
refill_time: 0
bandwidth:
size: 0
one_time_burst: 0
refill_time: 0
id: id
- path: path
num_queues: 1
num_queues: 7
readonly: false
iommu: false
queue_size: 6
queue_size: 1
vhost_socket: vhost_socket
vhost_user: false
direct: false
poll_queue: true
rate_limiter_config:
ops:
size: 0
one_time_burst: 0
refill_time: 0
bandwidth:
size: 0
one_time_burst: 0
refill_time: 0
id: id
cpus:
topology:
@ -658,25 +718,25 @@ components:
path: path
numa:
- distances:
- distance: 1
- distance: 3
destination: 6
- distance: 1
- distance: 3
destination: 6
cpus:
- 3
- 3
- 5
- 5
memory_zones:
- memory_zones
- memory_zones
guest_numa_id: 6
- distances:
- distance: 1
- distance: 3
destination: 6
- distance: 1
- distance: 3
destination: 6
cpus:
- 3
- 3
- 5
- 5
memory_zones:
- memory_zones
- memory_zones
@ -686,20 +746,20 @@ components:
src: /dev/urandom
sgx_epc:
- prefault: false
size: 9
size: 6
- prefault: false
size: 9
size: 6
fs:
- num_queues: 5
queue_size: 9
cache_size: 9
- num_queues: 6
queue_size: 3
cache_size: 6
dax: true
tag: tag
socket: socket
id: id
- num_queues: 5
queue_size: 9
cache_size: 9
- num_queues: 6
queue_size: 3
cache_size: 6
dax: true
tag: tag
socket: socket
@ -712,13 +772,13 @@ components:
pmem:
- mergeable: false
file: file
size: 6
size: 1
iommu: false
id: id
discard_writes: false
- mergeable: false
file: file
size: 6
size: 1
iommu: false
id: id
discard_writes: false
@ -734,24 +794,30 @@ components:
path: path
net:
- tap: tap
num_queues: 7
num_queues: 9
iommu: false
queue_size: 1
queue_size: 6
vhost_socket: vhost_socket
vhost_user: false
ip: 192.168.249.1
id: id
mac: mac
fd:
- 8
- 8
mask: 255.255.255.0
- tap: tap
num_queues: 7
num_queues: 9
iommu: false
queue_size: 1
queue_size: 6
vhost_socket: vhost_socket
vhost_user: false
ip: 192.168.249.1
id: id
mac: mac
fd:
- 8
- 8
mask: 255.255.255.0
properties:
cpus:
@ -858,11 +924,12 @@ components:
example:
hugepages: false
shared: false
hugepage_size: 1
mergeable: false
file: file
size: 4
hotplugged_size: 1
host_numa_node: 7
size: 7
hotplugged_size: 6
host_numa_node: 1
id: id
hotplug_size: 1
properties:
@ -882,6 +949,9 @@ components:
hugepages:
default: false
type: boolean
hugepage_size:
format: int64
type: integer
host_numa_node:
format: int32
type: integer
@ -899,26 +969,29 @@ components:
example:
hugepages: false
shared: false
hugepage_size: 4
mergeable: false
size: 9
hotplugged_size: 2
zones:
- hugepages: false
shared: false
hugepage_size: 1
mergeable: false
file: file
size: 4
hotplugged_size: 1
host_numa_node: 7
size: 7
hotplugged_size: 6
host_numa_node: 1
id: id
hotplug_size: 1
- hugepages: false
shared: false
hugepage_size: 1
mergeable: false
file: file
size: 4
hotplugged_size: 1
host_numa_node: 7
size: 7
hotplugged_size: 6
host_numa_node: 1
id: id
hotplug_size: 1
hotplug_size: 3
@ -945,6 +1018,9 @@ components:
hugepages:
default: false
type: boolean
hugepage_size:
format: int64
type: integer
zones:
items:
$ref: '#/components/schemas/MemoryZoneConfig'
@ -980,17 +1056,78 @@ components:
required:
- args
type: object
TokenBucket:
description: Defines a token bucket with a maximum capacity (_size_), an initial
burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_).
The refill-rate is derived from _size_ and _refill_time_, and it is the constant
rate at which the tokens replenish. The refill process only starts happening
after the initial burst budget is consumed. Consumption from the token bucket
is unbounded in speed which allows for bursts bound in size by the amount
of tokens available. Once the token bucket is empty, consumption speed is
bound by the refill-rate.
example:
size: 0
one_time_burst: 0
refill_time: 0
properties:
size:
description: The total number of tokens this bucket can hold.
format: int64
minimum: 0
type: integer
one_time_burst:
description: The initial size of a token bucket.
format: int64
minimum: 0
type: integer
refill_time:
description: The amount of milliseconds it takes for the bucket to refill.
format: int64
minimum: 0
type: integer
required:
- refill_time
- size
type: object
RateLimiterConfig:
description: Defines an IO rate limiter with independent bytes/s and ops/s limits.
Limits are defined by configuring each of the _bandwidth_ and _ops_ token
buckets.
example:
ops:
size: 0
one_time_burst: 0
refill_time: 0
bandwidth:
size: 0
one_time_burst: 0
refill_time: 0
properties:
bandwidth:
$ref: '#/components/schemas/TokenBucket'
ops:
$ref: '#/components/schemas/TokenBucket'
type: object
DiskConfig:
example:
path: path
num_queues: 1
num_queues: 7
readonly: false
iommu: false
queue_size: 6
queue_size: 1
vhost_socket: vhost_socket
vhost_user: false
direct: false
poll_queue: true
rate_limiter_config:
ops:
size: 0
one_time_burst: 0
refill_time: 0
bandwidth:
size: 0
one_time_burst: 0
refill_time: 0
id: id
properties:
path:
@ -1018,6 +1155,8 @@ components:
poll_queue:
default: true
type: boolean
rate_limiter_config:
$ref: '#/components/schemas/RateLimiterConfig'
id:
type: string
required:
@ -1026,14 +1165,17 @@ components:
NetConfig:
example:
tap: tap
num_queues: 7
num_queues: 9
iommu: false
queue_size: 1
queue_size: 6
vhost_socket: vhost_socket
vhost_user: false
ip: 192.168.249.1
id: id
mac: mac
fd:
- 8
- 8
mask: 255.255.255.0
properties:
tap:
@ -1063,6 +1205,11 @@ components:
type: string
id:
type: string
fd:
items:
format: int32
type: integer
type: array
type: object
RngConfig:
example:
@ -1080,7 +1227,7 @@ components:
type: object
BalloonConfig:
example:
size: 4
size: 9
properties:
size:
format: int64
@ -1090,9 +1237,9 @@ components:
type: object
FsConfig:
example:
num_queues: 5
queue_size: 9
cache_size: 9
num_queues: 6
queue_size: 3
cache_size: 6
dax: true
tag: tag
socket: socket
@ -1128,7 +1275,7 @@ components:
example:
mergeable: false
file: file
size: 6
size: 1
iommu: false
id: id
discard_writes: false
@ -1163,6 +1310,7 @@ components:
mode:
enum:
- "false"
- Pty
- Tty
- File
- null
@ -1216,7 +1364,7 @@ components:
SgxEpcConfig:
example:
prefault: false
size: 9
size: 6
properties:
size:
format: int64
@ -1229,7 +1377,7 @@ components:
type: object
NumaDistance:
example:
distance: 1
distance: 3
destination: 6
properties:
destination:
@ -1245,13 +1393,13 @@ components:
NumaConfig:
example:
distances:
- distance: 1
- distance: 3
destination: 6
- distance: 1
- distance: 3
destination: 6
cpus:
- 3
- 3
- 5
- 5
memory_zones:
- memory_zones
- memory_zones

View File

@ -279,6 +279,69 @@ func (a *DefaultApiService) PauseVM(ctx _context.Context) (*_nethttp.Response, e
return localVarHTTPResponse, nil
}
/*
PowerButtonVM Trigger a power button in the VM
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
*/
func (a *DefaultApiService) PowerButtonVM(ctx _context.Context) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/vm.power-button"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
localVarHTTPResponse, err := a.client.callAPI(r)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarHTTPResponse, newErr
}
return localVarHTTPResponse, nil
}
/*
RebootVM Reboot the VM instance.
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

View File

@ -157,12 +157,13 @@ func parameterToJson(obj interface{}) (string, error) {
return string(jsonBuf), err
}
// callAPI do the request.
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
if c.cfg.Debug {
dump, err := httputil.DumpRequestOut(request, true)
dump, err := httputil.DumpRequestOut(request, true)
if err != nil {
return nil, err
return nil, err
}
log.Printf("\n%s\n", string(dump))
}

View File

@ -37,6 +37,7 @@ var (
// ContextAPIKey takes an APIKey as authentication for the request
ContextAPIKey = contextKey("apikey")
)
// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
@ -51,6 +52,7 @@ type APIKey struct {
Prefix string
}
// ServerVariable stores the information about a server variable
type ServerVariable struct {
Description string
@ -60,9 +62,9 @@ type ServerVariable struct {
// ServerConfiguration stores the information about a server
type ServerConfiguration struct {
Url string
Url string
Description string
Variables map[string]ServerVariable
Variables map[string]ServerVariable
}
// Configuration stores the configuration of the API client
@ -84,9 +86,9 @@ func NewConfiguration() *Configuration {
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Servers: []ServerConfiguration{
Servers: []ServerConfiguration{
{
Url: "http://localhost/api/v1",
Url: "http://localhost/api/v1",
Description: "No description provided",
},
},
@ -102,7 +104,7 @@ func (c *Configuration) AddDefaultHeader(key string, value string) {
// ServerUrl returns URL based on server settings
func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error) {
if index < 0 || len(c.Servers) <= index {
return "", fmt.Errorf("Index %v out of range %v", index, len(c.Servers)-1)
return "", fmt.Errorf("Index %v out of range %v", index, len(c.Servers) - 1)
}
server := c.Servers[index]
url := server.Url

View File

@ -8,6 +8,7 @@ Method | HTTP request | Description
[**CreateVM**](DefaultApi.md#CreateVM) | **Put** /vm.create | Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created.
[**DeleteVM**](DefaultApi.md#DeleteVM) | **Put** /vm.delete | Delete the cloud-hypervisor Virtual Machine (VM) instance.
[**PauseVM**](DefaultApi.md#PauseVM) | **Put** /vm.pause | Pause a previously booted VM instance.
[**PowerButtonVM**](DefaultApi.md#PowerButtonVM) | **Put** /vm.power-button | Trigger a power button in the VM
[**RebootVM**](DefaultApi.md#RebootVM) | **Put** /vm.reboot | Reboot the VM instance.
[**ResumeVM**](DefaultApi.md#ResumeVM) | **Put** /vm.resume | Resume a previously paused VM instance.
[**ShutdownVM**](DefaultApi.md#ShutdownVM) | **Put** /vm.shutdown | Shut the VM instance down.
@ -145,6 +146,34 @@ No authorization required
[[Back to README]](../README.md)
## PowerButtonVM
> PowerButtonVM(ctx, )
Trigger a power button in the VM
### Required Parameters
This endpoint does not need any parameter.
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## RebootVM
> RebootVM(ctx, )

View File

@ -13,6 +13,7 @@ Name | Type | Description | Notes
**VhostUser** | **bool** | | [optional] [default to false]
**VhostSocket** | **string** | | [optional]
**PollQueue** | **bool** | | [optional] [default to true]
**RateLimiterConfig** | [**RateLimiterConfig**](RateLimiterConfig.md) | | [optional]
**Id** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -11,6 +11,7 @@ Name | Type | Description | Notes
**HotplugMethod** | **string** | | [optional] [default to acpi]
**Shared** | **bool** | | [optional] [default to false]
**Hugepages** | **bool** | | [optional] [default to false]
**HugepageSize** | **int64** | | [optional]
**Zones** | [**[]MemoryZoneConfig**](MemoryZoneConfig.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -10,6 +10,7 @@ Name | Type | Description | Notes
**Mergeable** | **bool** | | [optional] [default to false]
**Shared** | **bool** | | [optional] [default to false]
**Hugepages** | **bool** | | [optional] [default to false]
**HugepageSize** | **int64** | | [optional]
**HostNumaNode** | **int32** | | [optional]
**HotplugSize** | **int64** | | [optional]
**HotpluggedSize** | **int64** | | [optional]

View File

@ -14,6 +14,7 @@ Name | Type | Description | Notes
**VhostUser** | **bool** | | [optional] [default to false]
**VhostSocket** | **string** | | [optional]
**Id** | **string** | | [optional]
**Fd** | **[]int32** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# RateLimiterConfig
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Bandwidth** | [**TokenBucket**](TokenBucket.md) | | [optional]
**Ops** | [**TokenBucket**](TokenBucket.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,13 @@
# TokenBucket
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Size** | **int64** | The total number of tokens this bucket can hold. |
**OneTimeBurst** | **int64** | The initial size of a token bucket. | [optional]
**RefillTime** | **int64** | The amount of milliseconds it takes for the bucket to refill. |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,7 +8,6 @@
*/
package openapi
// BalloonConfig struct for BalloonConfig
type BalloonConfig struct {
Size int64 `json:"size"`

View File

@ -8,7 +8,6 @@
*/
package openapi
// CmdLineConfig struct for CmdLineConfig
type CmdLineConfig struct {
Args string `json:"args"`

View File

@ -8,10 +8,9 @@
*/
package openapi
// ConsoleConfig struct for ConsoleConfig
type ConsoleConfig struct {
File string `json:"file,omitempty"`
Mode string `json:"mode"`
Iommu bool `json:"iommu,omitempty"`
File string `json:"file,omitempty"`
Mode string `json:"mode"`
Iommu bool `json:"iommu,omitempty"`
}

View File

@ -8,11 +8,10 @@
*/
package openapi
// CpuTopology struct for CpuTopology
type CpuTopology struct {
ThreadsPerCore int32 `json:"threads_per_core,omitempty"`
CoresPerDie int32 `json:"cores_per_die,omitempty"`
CoresPerDie int32 `json:"cores_per_die,omitempty"`
DiesPerPackage int32 `json:"dies_per_package,omitempty"`
Packages int32 `json:"packages,omitempty"`
Packages int32 `json:"packages,omitempty"`
}

View File

@ -8,11 +8,10 @@
*/
package openapi
// CpusConfig struct for CpusConfig
type CpusConfig struct {
BootVcpus int32 `json:"boot_vcpus"`
MaxVcpus int32 `json:"max_vcpus"`
Topology CpuTopology `json:"topology,omitempty"`
MaxPhysBits int32 `json:"max_phys_bits,omitempty"`
BootVcpus int32 `json:"boot_vcpus"`
MaxVcpus int32 `json:"max_vcpus"`
Topology CpuTopology `json:"topology,omitempty"`
MaxPhysBits int32 `json:"max_phys_bits,omitempty"`
}

View File

@ -8,10 +8,9 @@
*/
package openapi
// DeviceConfig struct for DeviceConfig
type DeviceConfig struct {
Path string `json:"path"`
Iommu bool `json:"iommu,omitempty"`
Id string `json:"id,omitempty"`
Path string `json:"path"`
Iommu bool `json:"iommu,omitempty"`
Id string `json:"id,omitempty"`
}

View File

@ -8,11 +8,10 @@
*/
package openapi
// DeviceNode struct for DeviceNode
type DeviceNode struct {
Id string `json:"id,omitempty"`
Id string `json:"id,omitempty"`
Resources []map[string]interface{} `json:"resources,omitempty"`
Children []string `json:"children,omitempty"`
PciBdf int32 `json:"pci_bdf,omitempty"`
Children []string `json:"children,omitempty"`
PciBdf int32 `json:"pci_bdf,omitempty"`
}

View File

@ -8,17 +8,17 @@
*/
package openapi
// DiskConfig struct for DiskConfig
type DiskConfig struct {
Path string `json:"path"`
Readonly bool `json:"readonly,omitempty"`
Direct bool `json:"direct,omitempty"`
Iommu bool `json:"iommu,omitempty"`
NumQueues int32 `json:"num_queues,omitempty"`
QueueSize int32 `json:"queue_size,omitempty"`
VhostUser bool `json:"vhost_user,omitempty"`
Path string `json:"path"`
Readonly bool `json:"readonly,omitempty"`
Direct bool `json:"direct,omitempty"`
Iommu bool `json:"iommu,omitempty"`
NumQueues int32 `json:"num_queues,omitempty"`
QueueSize int32 `json:"queue_size,omitempty"`
VhostUser bool `json:"vhost_user,omitempty"`
VhostSocket string `json:"vhost_socket,omitempty"`
PollQueue bool `json:"poll_queue,omitempty"`
Id string `json:"id,omitempty"`
PollQueue bool `json:"poll_queue,omitempty"`
RateLimiterConfig RateLimiterConfig `json:"rate_limiter_config,omitempty"`
Id string `json:"id,omitempty"`
}

View File

@ -8,14 +8,13 @@
*/
package openapi
// FsConfig struct for FsConfig
type FsConfig struct {
Tag string `json:"tag"`
Socket string `json:"socket"`
NumQueues int32 `json:"num_queues"`
QueueSize int32 `json:"queue_size"`
Dax bool `json:"dax"`
CacheSize int64 `json:"cache_size"`
Id string `json:"id,omitempty"`
Tag string `json:"tag"`
Socket string `json:"socket"`
NumQueues int32 `json:"num_queues"`
QueueSize int32 `json:"queue_size"`
Dax bool `json:"dax"`
CacheSize int64 `json:"cache_size"`
Id string `json:"id,omitempty"`
}

View File

@ -8,7 +8,6 @@
*/
package openapi
// InitramfsConfig struct for InitramfsConfig
type InitramfsConfig struct {
Path string `json:"path"`

View File

@ -8,7 +8,6 @@
*/
package openapi
// KernelConfig struct for KernelConfig
type KernelConfig struct {
Path string `json:"path"`

View File

@ -8,15 +8,15 @@
*/
package openapi
// MemoryConfig struct for MemoryConfig
type MemoryConfig struct {
Size int64 `json:"size"`
HotplugSize int64 `json:"hotplug_size,omitempty"`
HotpluggedSize int64 `json:"hotplugged_size,omitempty"`
Mergeable bool `json:"mergeable,omitempty"`
HotplugMethod string `json:"hotplug_method,omitempty"`
Shared bool `json:"shared,omitempty"`
Hugepages bool `json:"hugepages,omitempty"`
Zones []MemoryZoneConfig `json:"zones,omitempty"`
Size int64 `json:"size"`
HotplugSize int64 `json:"hotplug_size,omitempty"`
HotpluggedSize int64 `json:"hotplugged_size,omitempty"`
Mergeable bool `json:"mergeable,omitempty"`
HotplugMethod string `json:"hotplug_method,omitempty"`
Shared bool `json:"shared,omitempty"`
Hugepages bool `json:"hugepages,omitempty"`
HugepageSize int64 `json:"hugepage_size,omitempty"`
Zones []MemoryZoneConfig `json:"zones,omitempty"`
}

View File

@ -8,16 +8,16 @@
*/
package openapi
// MemoryZoneConfig struct for MemoryZoneConfig
type MemoryZoneConfig struct {
Id string `json:"id"`
Size int64 `json:"size"`
File string `json:"file,omitempty"`
Mergeable bool `json:"mergeable,omitempty"`
Shared bool `json:"shared,omitempty"`
Hugepages bool `json:"hugepages,omitempty"`
HostNumaNode int32 `json:"host_numa_node,omitempty"`
HotplugSize int64 `json:"hotplug_size,omitempty"`
HotpluggedSize int64 `json:"hotplugged_size,omitempty"`
Id string `json:"id"`
Size int64 `json:"size"`
File string `json:"file,omitempty"`
Mergeable bool `json:"mergeable,omitempty"`
Shared bool `json:"shared,omitempty"`
Hugepages bool `json:"hugepages,omitempty"`
HugepageSize int64 `json:"hugepage_size,omitempty"`
HostNumaNode int32 `json:"host_numa_node,omitempty"`
HotplugSize int64 `json:"hotplug_size,omitempty"`
HotpluggedSize int64 `json:"hotplugged_size,omitempty"`
}

View File

@ -8,17 +8,17 @@
*/
package openapi
// NetConfig struct for NetConfig
type NetConfig struct {
Tap string `json:"tap,omitempty"`
Ip string `json:"ip,omitempty"`
Mask string `json:"mask,omitempty"`
Mac string `json:"mac,omitempty"`
Iommu bool `json:"iommu,omitempty"`
NumQueues int32 `json:"num_queues,omitempty"`
QueueSize int32 `json:"queue_size,omitempty"`
VhostUser bool `json:"vhost_user,omitempty"`
Tap string `json:"tap,omitempty"`
Ip string `json:"ip,omitempty"`
Mask string `json:"mask,omitempty"`
Mac string `json:"mac,omitempty"`
Iommu bool `json:"iommu,omitempty"`
NumQueues int32 `json:"num_queues,omitempty"`
QueueSize int32 `json:"queue_size,omitempty"`
VhostUser bool `json:"vhost_user,omitempty"`
VhostSocket string `json:"vhost_socket,omitempty"`
Id string `json:"id,omitempty"`
Id string `json:"id,omitempty"`
Fd []int32 `json:"fd,omitempty"`
}

View File

@ -8,11 +8,10 @@
*/
package openapi
// NumaConfig struct for NumaConfig
type NumaConfig struct {
GuestNumaId int32 `json:"guest_numa_id"`
Cpus []int32 `json:"cpus,omitempty"`
Distances []NumaDistance `json:"distances,omitempty"`
MemoryZones []string `json:"memory_zones,omitempty"`
GuestNumaId int32 `json:"guest_numa_id"`
Cpus []int32 `json:"cpus,omitempty"`
Distances []NumaDistance `json:"distances,omitempty"`
MemoryZones []string `json:"memory_zones,omitempty"`
}

View File

@ -8,9 +8,8 @@
*/
package openapi
// NumaDistance struct for NumaDistance
type NumaDistance struct {
Destination int32 `json:"destination"`
Distance int32 `json:"distance"`
Distance int32 `json:"distance"`
}

View File

@ -8,9 +8,8 @@
*/
package openapi
// PciDeviceInfo Information about a PCI device
type PciDeviceInfo struct {
Id string `json:"id"`
Id string `json:"id"`
Bdf string `json:"bdf"`
}

View File

@ -8,13 +8,12 @@
*/
package openapi
// PmemConfig struct for PmemConfig
type PmemConfig struct {
File string `json:"file"`
Size int64 `json:"size,omitempty"`
Iommu bool `json:"iommu,omitempty"`
Mergeable bool `json:"mergeable,omitempty"`
DiscardWrites bool `json:"discard_writes,omitempty"`
Id string `json:"id,omitempty"`
File string `json:"file"`
Size int64 `json:"size,omitempty"`
Iommu bool `json:"iommu,omitempty"`
Mergeable bool `json:"mergeable,omitempty"`
DiscardWrites bool `json:"discard_writes,omitempty"`
Id string `json:"id,omitempty"`
}

View File

@ -0,0 +1,15 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package openapi
// RateLimiterConfig Defines an IO rate limiter with independent bytes/s and ops/s limits. Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
type RateLimiterConfig struct {
Bandwidth TokenBucket `json:"bandwidth,omitempty"`
Ops TokenBucket `json:"ops,omitempty"`
}

View File

@ -8,9 +8,8 @@
*/
package openapi
// RestoreConfig struct for RestoreConfig
type RestoreConfig struct {
SourceUrl string `json:"source_url"`
Prefault bool `json:"prefault,omitempty"`
Prefault bool `json:"prefault,omitempty"`
}

View File

@ -8,9 +8,8 @@
*/
package openapi
// RngConfig struct for RngConfig
type RngConfig struct {
Src string `json:"src"`
Iommu bool `json:"iommu,omitempty"`
Src string `json:"src"`
Iommu bool `json:"iommu,omitempty"`
}

View File

@ -8,9 +8,8 @@
*/
package openapi
// SgxEpcConfig struct for SgxEpcConfig
type SgxEpcConfig struct {
Size int64 `json:"size"`
Prefault bool `json:"prefault,omitempty"`
Size int64 `json:"size"`
Prefault bool `json:"prefault,omitempty"`
}

View File

@ -0,0 +1,19 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package openapi
// TokenBucket Defines a token bucket with a maximum capacity (_size_), an initial burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_). The refill-rate is derived from _size_ and _refill_time_, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed. Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available. Once the token bucket is empty, consumption speed is bound by the refill-rate.
type TokenBucket struct {
// The total number of tokens this bucket can hold.
Size int64 `json:"size"`
// The initial size of a token bucket.
OneTimeBurst int64 `json:"one_time_burst,omitempty"`
// The amount of milliseconds it takes for the bucket to refill.
RefillTime int64 `json:"refill_time"`
}

View File

@ -8,10 +8,9 @@
*/
package openapi
// VmAddDevice struct for VmAddDevice
type VmAddDevice struct {
Path string `json:"path,omitempty"`
Iommu bool `json:"iommu,omitempty"`
Id string `json:"id,omitempty"`
Path string `json:"path,omitempty"`
Iommu bool `json:"iommu,omitempty"`
Id string `json:"id,omitempty"`
}

View File

@ -8,26 +8,25 @@
*/
package openapi
// VmConfig Virtual machine configuration
type VmConfig struct {
Cpus CpusConfig `json:"cpus,omitempty"`
Memory MemoryConfig `json:"memory,omitempty"`
Kernel KernelConfig `json:"kernel"`
Cpus CpusConfig `json:"cpus,omitempty"`
Memory MemoryConfig `json:"memory,omitempty"`
Kernel KernelConfig `json:"kernel"`
Initramfs *InitramfsConfig `json:"initramfs,omitempty"`
Cmdline CmdLineConfig `json:"cmdline,omitempty"`
Disks []DiskConfig `json:"disks,omitempty"`
Net []NetConfig `json:"net,omitempty"`
Rng RngConfig `json:"rng,omitempty"`
Balloon BalloonConfig `json:"balloon,omitempty"`
Fs []FsConfig `json:"fs,omitempty"`
Pmem []PmemConfig `json:"pmem,omitempty"`
Serial ConsoleConfig `json:"serial,omitempty"`
Console ConsoleConfig `json:"console,omitempty"`
Devices []DeviceConfig `json:"devices,omitempty"`
Vsock VsockConfig `json:"vsock,omitempty"`
SgxEpc []SgxEpcConfig `json:"sgx_epc,omitempty"`
Numa []NumaConfig `json:"numa,omitempty"`
Iommu bool `json:"iommu,omitempty"`
Watchdog bool `json:"watchdog,omitempty"`
Cmdline CmdLineConfig `json:"cmdline,omitempty"`
Disks []DiskConfig `json:"disks,omitempty"`
Net []NetConfig `json:"net,omitempty"`
Rng RngConfig `json:"rng,omitempty"`
Balloon BalloonConfig `json:"balloon,omitempty"`
Fs []FsConfig `json:"fs,omitempty"`
Pmem []PmemConfig `json:"pmem,omitempty"`
Serial ConsoleConfig `json:"serial,omitempty"`
Console ConsoleConfig `json:"console,omitempty"`
Devices []DeviceConfig `json:"devices,omitempty"`
Vsock VsockConfig `json:"vsock,omitempty"`
SgxEpc []SgxEpcConfig `json:"sgx_epc,omitempty"`
Numa []NumaConfig `json:"numa,omitempty"`
Iommu bool `json:"iommu,omitempty"`
Watchdog bool `json:"watchdog,omitempty"`
}

View File

@ -8,11 +8,10 @@
*/
package openapi
// VmInfo Virtual Machine information
type VmInfo struct {
Config VmConfig `json:"config"`
State string `json:"state"`
MemoryActualSize int64 `json:"memory_actual_size,omitempty"`
DeviceTree map[string]DeviceNode `json:"device_tree,omitempty"`
Config VmConfig `json:"config"`
State string `json:"state"`
MemoryActualSize int64 `json:"memory_actual_size,omitempty"`
DeviceTree map[string]DeviceNode `json:"device_tree,omitempty"`
}

View File

@ -8,7 +8,6 @@
*/
package openapi
// VmRemoveDevice struct for VmRemoveDevice
type VmRemoveDevice struct {
Id string `json:"id,omitempty"`

View File

@ -8,7 +8,6 @@
*/
package openapi
// VmResize struct for VmResize
type VmResize struct {
DesiredVcpus int32 `json:"desired_vcpus,omitempty"`

View File

@ -8,7 +8,6 @@
*/
package openapi
// VmResizeZone struct for VmResizeZone
type VmResizeZone struct {
Id string `json:"id,omitempty"`

View File

@ -8,7 +8,6 @@
*/
package openapi
// VmSnapshotConfig struct for VmSnapshotConfig
type VmSnapshotConfig struct {
DestinationUrl string `json:"destination_url,omitempty"`

View File

@ -8,7 +8,6 @@
*/
package openapi
// VmmPingResponse Virtual Machine Monitor information
type VmmPingResponse struct {
Version string `json:"version"`

View File

@ -8,13 +8,12 @@
*/
package openapi
// VsockConfig struct for VsockConfig
type VsockConfig struct {
// Guest Vsock CID
Cid int64 `json:"cid"`
// Path to UNIX domain socket, used to proxy vsock connections.
Socket string `json:"socket"`
Iommu bool `json:"iommu,omitempty"`
Id string `json:"id,omitempty"`
Iommu bool `json:"iommu,omitempty"`
Id string `json:"id,omitempty"`
}

View File

@ -134,6 +134,18 @@ paths:
405:
description: The VM instance could not reboot because it is not booted.
/vm.power-button:
put:
summary: Trigger a power button in the VM
operationId: power-buttonVM
responses:
204:
description: Power button successfully triggered in the VM
404:
description: The button could not be triggered because it is not created yet
405:
description: The button could not be triggered because it is not booted.
/vm.resize:
put:
summary: Resize the VM
@ -522,6 +534,9 @@ components:
hugepages:
type: boolean
default: false
hugepage_size:
type: integer
format: int64
host_numa_node:
type: integer
format: int32
@ -559,6 +574,9 @@ components:
hugepages:
type: boolean
default: false
hugepage_size:
type: integer
format: int64
zones:
type: array
items:
@ -589,6 +607,48 @@ components:
args:
type: string
TokenBucket:
required:
- size
- refill_time
type: object
properties:
size:
type: integer
format: int64
minimum: 0
description: The total number of tokens this bucket can hold.
one_time_burst:
type: integer
format: int64
minimum: 0
description: The initial size of a token bucket.
refill_time:
type: integer
format: int64
minimum: 0
description: The amount of milliseconds it takes for the bucket to refill.
description:
Defines a token bucket with a maximum capacity (_size_), an initial burst size
(_one_time_burst_) and an interval for refilling purposes (_refill_time_).
The refill-rate is derived from _size_ and _refill_time_, and it is the constant
rate at which the tokens replenish. The refill process only starts happening after
the initial burst budget is consumed.
Consumption from the token bucket is unbounded in speed which allows for bursts
bound in size by the amount of tokens available.
Once the token bucket is empty, consumption speed is bound by the refill-rate.
RateLimiterConfig:
type: object
properties:
bandwidth:
$ref: '#/components/schemas/TokenBucket'
ops:
$ref: '#/components/schemas/TokenBucket'
description:
Defines an IO rate limiter with independent bytes/s and ops/s limits.
Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
DiskConfig:
required:
- path
@ -619,6 +679,8 @@ components:
poll_queue:
type: boolean
default: true
rate_limiter_config:
$ref: '#/components/schemas/RateLimiterConfig'
id:
type: string
@ -652,6 +714,11 @@ components:
type: string
id:
type: string
fd:
type: array
items:
type: integer
format: int32
RngConfig:
required:
@ -735,7 +802,7 @@ components:
type: string
mode:
type: string
enum: [Off, Tty, File, Null]
enum: [Off, Pty, Tty, File, Null]
iommu:
type: boolean
default: false

View File

@ -75,7 +75,7 @@ assets:
url: "https://github.com/cloud-hypervisor/cloud-hypervisor"
uscan-url: >-
https://github.com/cloud-hypervisor/cloud-hypervisor/tags.*/v?(\d\S+)\.tar\.gz
version: "v0.12.0"
version: "v0.14.1"
firecracker:
description: "Firecracker micro-VMM"