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>
(cherry picked from commit 84b62dc3b1)
This commit is contained in:
Bo Chen 2021-03-31 11:06:49 -07:00
parent b26e94ffba
commit ec0424e153
18 changed files with 473 additions and 96 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* | [**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* | [**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* | [**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* | [**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* | [**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. *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) - [NumaDistance](docs/NumaDistance.md)
- [PciDeviceInfo](docs/PciDeviceInfo.md) - [PciDeviceInfo](docs/PciDeviceInfo.md)
- [PmemConfig](docs/PmemConfig.md) - [PmemConfig](docs/PmemConfig.md)
- [RateLimiterConfig](docs/RateLimiterConfig.md)
- [RestoreConfig](docs/RestoreConfig.md) - [RestoreConfig](docs/RestoreConfig.md)
- [RngConfig](docs/RngConfig.md) - [RngConfig](docs/RngConfig.md)
- [SgxEpcConfig](docs/SgxEpcConfig.md) - [SgxEpcConfig](docs/SgxEpcConfig.md)
- [TokenBucket](docs/TokenBucket.md)
- [VmAddDevice](docs/VmAddDevice.md) - [VmAddDevice](docs/VmAddDevice.md)
- [VmConfig](docs/VmConfig.md) - [VmConfig](docs/VmConfig.md)
- [VmInfo](docs/VmInfo.md) - [VmInfo](docs/VmInfo.md)

View File

@ -123,6 +123,18 @@ paths:
"405": "405":
description: The VM instance could not reboot because it is not booted. description: The VM instance could not reboot because it is not booted.
summary: Reboot the VM instance. 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: /vm.resize:
put: put:
requestBody: requestBody:
@ -332,7 +344,7 @@ components:
VmInfo: VmInfo:
description: Virtual Machine information description: Virtual Machine information
example: example:
memory_actual_size: 2 memory_actual_size: 3
state: Created state: Created
config: config:
console: console:
@ -340,54 +352,75 @@ components:
file: file file: file
iommu: false iommu: false
balloon: balloon:
size: 4 size: 9
memory: memory:
hugepages: false hugepages: false
shared: false shared: false
hugepage_size: 4
mergeable: false mergeable: false
size: 9 size: 9
hotplugged_size: 2 hotplugged_size: 2
zones: zones:
- hugepages: false - hugepages: false
shared: false shared: false
hugepage_size: 1
mergeable: false mergeable: false
file: file file: file
size: 4 size: 7
hotplugged_size: 1 hotplugged_size: 6
host_numa_node: 7 host_numa_node: 1
id: id id: id
hotplug_size: 1 hotplug_size: 1
- hugepages: false - hugepages: false
shared: false shared: false
hugepage_size: 1
mergeable: false mergeable: false
file: file file: file
size: 4 size: 7
hotplugged_size: 1 hotplugged_size: 6
host_numa_node: 7 host_numa_node: 1
id: id id: id
hotplug_size: 1 hotplug_size: 1
hotplug_size: 3 hotplug_size: 3
hotplug_method: acpi hotplug_method: acpi
disks: disks:
- path: path - path: path
num_queues: 1 num_queues: 7
readonly: false readonly: false
iommu: false iommu: false
queue_size: 6 queue_size: 1
vhost_socket: vhost_socket vhost_socket: vhost_socket
vhost_user: false vhost_user: false
direct: false direct: false
poll_queue: true 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 id: id
- path: path - path: path
num_queues: 1 num_queues: 7
readonly: false readonly: false
iommu: false iommu: false
queue_size: 6 queue_size: 1
vhost_socket: vhost_socket vhost_socket: vhost_socket
vhost_user: false vhost_user: false
direct: false direct: false
poll_queue: true 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 id: id
cpus: cpus:
topology: topology:
@ -409,25 +442,25 @@ components:
path: path path: path
numa: numa:
- distances: - distances:
- distance: 1 - distance: 3
destination: 6 destination: 6
- distance: 1 - distance: 3
destination: 6 destination: 6
cpus: cpus:
- 3 - 5
- 3 - 5
memory_zones: memory_zones:
- memory_zones - memory_zones
- memory_zones - memory_zones
guest_numa_id: 6 guest_numa_id: 6
- distances: - distances:
- distance: 1 - distance: 3
destination: 6 destination: 6
- distance: 1 - distance: 3
destination: 6 destination: 6
cpus: cpus:
- 3 - 5
- 3 - 5
memory_zones: memory_zones:
- memory_zones - memory_zones
- memory_zones - memory_zones
@ -437,20 +470,20 @@ components:
src: /dev/urandom src: /dev/urandom
sgx_epc: sgx_epc:
- prefault: false - prefault: false
size: 9 size: 6
- prefault: false - prefault: false
size: 9 size: 6
fs: fs:
- num_queues: 5 - num_queues: 6
queue_size: 9 queue_size: 3
cache_size: 9 cache_size: 6
dax: true dax: true
tag: tag tag: tag
socket: socket socket: socket
id: id id: id
- num_queues: 5 - num_queues: 6
queue_size: 9 queue_size: 3
cache_size: 9 cache_size: 6
dax: true dax: true
tag: tag tag: tag
socket: socket socket: socket
@ -463,13 +496,13 @@ components:
pmem: pmem:
- mergeable: false - mergeable: false
file: file file: file
size: 6 size: 1
iommu: false iommu: false
id: id id: id
discard_writes: false discard_writes: false
- mergeable: false - mergeable: false
file: file file: file
size: 6 size: 1
iommu: false iommu: false
id: id id: id
discard_writes: false discard_writes: false
@ -485,31 +518,37 @@ components:
path: path path: path
net: net:
- tap: tap - tap: tap
num_queues: 7 num_queues: 9
iommu: false iommu: false
queue_size: 1 queue_size: 6
vhost_socket: vhost_socket vhost_socket: vhost_socket
vhost_user: false vhost_user: false
ip: 192.168.249.1 ip: 192.168.249.1
id: id id: id
mac: mac mac: mac
fd:
- 8
- 8
mask: 255.255.255.0 mask: 255.255.255.0
- tap: tap - tap: tap
num_queues: 7 num_queues: 9
iommu: false iommu: false
queue_size: 1 queue_size: 6
vhost_socket: vhost_socket vhost_socket: vhost_socket
vhost_user: false vhost_user: false
ip: 192.168.249.1 ip: 192.168.249.1
id: id id: id
mac: mac mac: mac
fd:
- 8
- 8
mask: 255.255.255.0 mask: 255.255.255.0
device_tree: device_tree:
key: key:
children: children:
- children - children
- children - children
pci_bdf: 6 pci_bdf: 7
resources: resources:
- '{}' - '{}'
- '{}' - '{}'
@ -540,7 +579,7 @@ components:
children: children:
- children - children
- children - children
pci_bdf: 6 pci_bdf: 7
resources: resources:
- '{}' - '{}'
- '{}' - '{}'
@ -589,54 +628,75 @@ components:
file: file file: file
iommu: false iommu: false
balloon: balloon:
size: 4 size: 9
memory: memory:
hugepages: false hugepages: false
shared: false shared: false
hugepage_size: 4
mergeable: false mergeable: false
size: 9 size: 9
hotplugged_size: 2 hotplugged_size: 2
zones: zones:
- hugepages: false - hugepages: false
shared: false shared: false
hugepage_size: 1
mergeable: false mergeable: false
file: file file: file
size: 4 size: 7
hotplugged_size: 1 hotplugged_size: 6
host_numa_node: 7 host_numa_node: 1
id: id id: id
hotplug_size: 1 hotplug_size: 1
- hugepages: false - hugepages: false
shared: false shared: false
hugepage_size: 1
mergeable: false mergeable: false
file: file file: file
size: 4 size: 7
hotplugged_size: 1 hotplugged_size: 6
host_numa_node: 7 host_numa_node: 1
id: id id: id
hotplug_size: 1 hotplug_size: 1
hotplug_size: 3 hotplug_size: 3
hotplug_method: acpi hotplug_method: acpi
disks: disks:
- path: path - path: path
num_queues: 1 num_queues: 7
readonly: false readonly: false
iommu: false iommu: false
queue_size: 6 queue_size: 1
vhost_socket: vhost_socket vhost_socket: vhost_socket
vhost_user: false vhost_user: false
direct: false direct: false
poll_queue: true 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 id: id
- path: path - path: path
num_queues: 1 num_queues: 7
readonly: false readonly: false
iommu: false iommu: false
queue_size: 6 queue_size: 1
vhost_socket: vhost_socket vhost_socket: vhost_socket
vhost_user: false vhost_user: false
direct: false direct: false
poll_queue: true 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 id: id
cpus: cpus:
topology: topology:
@ -658,25 +718,25 @@ components:
path: path path: path
numa: numa:
- distances: - distances:
- distance: 1 - distance: 3
destination: 6 destination: 6
- distance: 1 - distance: 3
destination: 6 destination: 6
cpus: cpus:
- 3 - 5
- 3 - 5
memory_zones: memory_zones:
- memory_zones - memory_zones
- memory_zones - memory_zones
guest_numa_id: 6 guest_numa_id: 6
- distances: - distances:
- distance: 1 - distance: 3
destination: 6 destination: 6
- distance: 1 - distance: 3
destination: 6 destination: 6
cpus: cpus:
- 3 - 5
- 3 - 5
memory_zones: memory_zones:
- memory_zones - memory_zones
- memory_zones - memory_zones
@ -686,20 +746,20 @@ components:
src: /dev/urandom src: /dev/urandom
sgx_epc: sgx_epc:
- prefault: false - prefault: false
size: 9 size: 6
- prefault: false - prefault: false
size: 9 size: 6
fs: fs:
- num_queues: 5 - num_queues: 6
queue_size: 9 queue_size: 3
cache_size: 9 cache_size: 6
dax: true dax: true
tag: tag tag: tag
socket: socket socket: socket
id: id id: id
- num_queues: 5 - num_queues: 6
queue_size: 9 queue_size: 3
cache_size: 9 cache_size: 6
dax: true dax: true
tag: tag tag: tag
socket: socket socket: socket
@ -712,13 +772,13 @@ components:
pmem: pmem:
- mergeable: false - mergeable: false
file: file file: file
size: 6 size: 1
iommu: false iommu: false
id: id id: id
discard_writes: false discard_writes: false
- mergeable: false - mergeable: false
file: file file: file
size: 6 size: 1
iommu: false iommu: false
id: id id: id
discard_writes: false discard_writes: false
@ -734,24 +794,30 @@ components:
path: path path: path
net: net:
- tap: tap - tap: tap
num_queues: 7 num_queues: 9
iommu: false iommu: false
queue_size: 1 queue_size: 6
vhost_socket: vhost_socket vhost_socket: vhost_socket
vhost_user: false vhost_user: false
ip: 192.168.249.1 ip: 192.168.249.1
id: id id: id
mac: mac mac: mac
fd:
- 8
- 8
mask: 255.255.255.0 mask: 255.255.255.0
- tap: tap - tap: tap
num_queues: 7 num_queues: 9
iommu: false iommu: false
queue_size: 1 queue_size: 6
vhost_socket: vhost_socket vhost_socket: vhost_socket
vhost_user: false vhost_user: false
ip: 192.168.249.1 ip: 192.168.249.1
id: id id: id
mac: mac mac: mac
fd:
- 8
- 8
mask: 255.255.255.0 mask: 255.255.255.0
properties: properties:
cpus: cpus:
@ -858,11 +924,12 @@ components:
example: example:
hugepages: false hugepages: false
shared: false shared: false
hugepage_size: 1
mergeable: false mergeable: false
file: file file: file
size: 4 size: 7
hotplugged_size: 1 hotplugged_size: 6
host_numa_node: 7 host_numa_node: 1
id: id id: id
hotplug_size: 1 hotplug_size: 1
properties: properties:
@ -882,6 +949,9 @@ components:
hugepages: hugepages:
default: false default: false
type: boolean type: boolean
hugepage_size:
format: int64
type: integer
host_numa_node: host_numa_node:
format: int32 format: int32
type: integer type: integer
@ -899,26 +969,29 @@ components:
example: example:
hugepages: false hugepages: false
shared: false shared: false
hugepage_size: 4
mergeable: false mergeable: false
size: 9 size: 9
hotplugged_size: 2 hotplugged_size: 2
zones: zones:
- hugepages: false - hugepages: false
shared: false shared: false
hugepage_size: 1
mergeable: false mergeable: false
file: file file: file
size: 4 size: 7
hotplugged_size: 1 hotplugged_size: 6
host_numa_node: 7 host_numa_node: 1
id: id id: id
hotplug_size: 1 hotplug_size: 1
- hugepages: false - hugepages: false
shared: false shared: false
hugepage_size: 1
mergeable: false mergeable: false
file: file file: file
size: 4 size: 7
hotplugged_size: 1 hotplugged_size: 6
host_numa_node: 7 host_numa_node: 1
id: id id: id
hotplug_size: 1 hotplug_size: 1
hotplug_size: 3 hotplug_size: 3
@ -945,6 +1018,9 @@ components:
hugepages: hugepages:
default: false default: false
type: boolean type: boolean
hugepage_size:
format: int64
type: integer
zones: zones:
items: items:
$ref: '#/components/schemas/MemoryZoneConfig' $ref: '#/components/schemas/MemoryZoneConfig'
@ -980,17 +1056,78 @@ components:
required: required:
- args - args
type: object 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: DiskConfig:
example: example:
path: path path: path
num_queues: 1 num_queues: 7
readonly: false readonly: false
iommu: false iommu: false
queue_size: 6 queue_size: 1
vhost_socket: vhost_socket vhost_socket: vhost_socket
vhost_user: false vhost_user: false
direct: false direct: false
poll_queue: true 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 id: id
properties: properties:
path: path:
@ -1018,6 +1155,8 @@ components:
poll_queue: poll_queue:
default: true default: true
type: boolean type: boolean
rate_limiter_config:
$ref: '#/components/schemas/RateLimiterConfig'
id: id:
type: string type: string
required: required:
@ -1026,14 +1165,17 @@ components:
NetConfig: NetConfig:
example: example:
tap: tap tap: tap
num_queues: 7 num_queues: 9
iommu: false iommu: false
queue_size: 1 queue_size: 6
vhost_socket: vhost_socket vhost_socket: vhost_socket
vhost_user: false vhost_user: false
ip: 192.168.249.1 ip: 192.168.249.1
id: id id: id
mac: mac mac: mac
fd:
- 8
- 8
mask: 255.255.255.0 mask: 255.255.255.0
properties: properties:
tap: tap:
@ -1063,6 +1205,11 @@ components:
type: string type: string
id: id:
type: string type: string
fd:
items:
format: int32
type: integer
type: array
type: object type: object
RngConfig: RngConfig:
example: example:
@ -1080,7 +1227,7 @@ components:
type: object type: object
BalloonConfig: BalloonConfig:
example: example:
size: 4 size: 9
properties: properties:
size: size:
format: int64 format: int64
@ -1090,9 +1237,9 @@ components:
type: object type: object
FsConfig: FsConfig:
example: example:
num_queues: 5 num_queues: 6
queue_size: 9 queue_size: 3
cache_size: 9 cache_size: 6
dax: true dax: true
tag: tag tag: tag
socket: socket socket: socket
@ -1128,7 +1275,7 @@ components:
example: example:
mergeable: false mergeable: false
file: file file: file
size: 6 size: 1
iommu: false iommu: false
id: id id: id
discard_writes: false discard_writes: false
@ -1163,6 +1310,7 @@ components:
mode: mode:
enum: enum:
- "false" - "false"
- Pty
- Tty - Tty
- File - File
- null - null
@ -1216,7 +1364,7 @@ components:
SgxEpcConfig: SgxEpcConfig:
example: example:
prefault: false prefault: false
size: 9 size: 6
properties: properties:
size: size:
format: int64 format: int64
@ -1229,7 +1377,7 @@ components:
type: object type: object
NumaDistance: NumaDistance:
example: example:
distance: 1 distance: 3
destination: 6 destination: 6
properties: properties:
destination: destination:
@ -1245,13 +1393,13 @@ components:
NumaConfig: NumaConfig:
example: example:
distances: distances:
- distance: 1 - distance: 3
destination: 6 destination: 6
- distance: 1 - distance: 3
destination: 6 destination: 6
cpus: cpus:
- 3 - 5
- 3 - 5
memory_zones: memory_zones:
- memory_zones - 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 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. RebootVM Reboot the VM instance.
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

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. [**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. [**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. [**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. [**RebootVM**](DefaultApi.md#RebootVM) | **Put** /vm.reboot | Reboot the VM instance.
[**ResumeVM**](DefaultApi.md#ResumeVM) | **Put** /vm.resume | Resume a previously paused 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. [**ShutdownVM**](DefaultApi.md#ShutdownVM) | **Put** /vm.shutdown | Shut the VM instance down.
@ -145,6 +146,34 @@ No authorization required
[[Back to README]](../README.md) [[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
> RebootVM(ctx, ) > RebootVM(ctx, )

View File

@ -13,6 +13,7 @@ Name | Type | Description | Notes
**VhostUser** | **bool** | | [optional] [default to false] **VhostUser** | **bool** | | [optional] [default to false]
**VhostSocket** | **string** | | [optional] **VhostSocket** | **string** | | [optional]
**PollQueue** | **bool** | | [optional] [default to true] **PollQueue** | **bool** | | [optional] [default to true]
**RateLimiterConfig** | [**RateLimiterConfig**](RateLimiterConfig.md) | | [optional]
**Id** | **string** | | [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) [[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] **HotplugMethod** | **string** | | [optional] [default to acpi]
**Shared** | **bool** | | [optional] [default to false] **Shared** | **bool** | | [optional] [default to false]
**Hugepages** | **bool** | | [optional] [default to false] **Hugepages** | **bool** | | [optional] [default to false]
**HugepageSize** | **int64** | | [optional]
**Zones** | [**[]MemoryZoneConfig**](MemoryZoneConfig.md) | | [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) [[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] **Mergeable** | **bool** | | [optional] [default to false]
**Shared** | **bool** | | [optional] [default to false] **Shared** | **bool** | | [optional] [default to false]
**Hugepages** | **bool** | | [optional] [default to false] **Hugepages** | **bool** | | [optional] [default to false]
**HugepageSize** | **int64** | | [optional]
**HostNumaNode** | **int32** | | [optional] **HostNumaNode** | **int32** | | [optional]
**HotplugSize** | **int64** | | [optional] **HotplugSize** | **int64** | | [optional]
**HotpluggedSize** | **int64** | | [optional] **HotpluggedSize** | **int64** | | [optional]

View File

@ -14,6 +14,7 @@ Name | Type | Description | Notes
**VhostUser** | **bool** | | [optional] [default to false] **VhostUser** | **bool** | | [optional] [default to false]
**VhostSocket** | **string** | | [optional] **VhostSocket** | **string** | | [optional]
**Id** | **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) [[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

@ -19,5 +19,6 @@ type DiskConfig struct {
VhostUser bool `json:"vhost_user,omitempty"` VhostUser bool `json:"vhost_user,omitempty"`
VhostSocket string `json:"vhost_socket,omitempty"` VhostSocket string `json:"vhost_socket,omitempty"`
PollQueue bool `json:"poll_queue,omitempty"` PollQueue bool `json:"poll_queue,omitempty"`
RateLimiterConfig RateLimiterConfig `json:"rate_limiter_config,omitempty"`
Id string `json:"id,omitempty"` Id string `json:"id,omitempty"`
} }

View File

@ -17,5 +17,6 @@ type MemoryConfig struct {
HotplugMethod string `json:"hotplug_method,omitempty"` HotplugMethod string `json:"hotplug_method,omitempty"`
Shared bool `json:"shared,omitempty"` Shared bool `json:"shared,omitempty"`
Hugepages bool `json:"hugepages,omitempty"` Hugepages bool `json:"hugepages,omitempty"`
HugepageSize int64 `json:"hugepage_size,omitempty"`
Zones []MemoryZoneConfig `json:"zones,omitempty"` Zones []MemoryZoneConfig `json:"zones,omitempty"`
} }

View File

@ -16,6 +16,7 @@ type MemoryZoneConfig struct {
Mergeable bool `json:"mergeable,omitempty"` Mergeable bool `json:"mergeable,omitempty"`
Shared bool `json:"shared,omitempty"` Shared bool `json:"shared,omitempty"`
Hugepages bool `json:"hugepages,omitempty"` Hugepages bool `json:"hugepages,omitempty"`
HugepageSize int64 `json:"hugepage_size,omitempty"`
HostNumaNode int32 `json:"host_numa_node,omitempty"` HostNumaNode int32 `json:"host_numa_node,omitempty"`
HotplugSize int64 `json:"hotplug_size,omitempty"` HotplugSize int64 `json:"hotplug_size,omitempty"`
HotpluggedSize int64 `json:"hotplugged_size,omitempty"` HotpluggedSize int64 `json:"hotplugged_size,omitempty"`

View File

@ -20,4 +20,5 @@ type NetConfig struct {
VhostUser bool `json:"vhost_user,omitempty"` VhostUser bool `json:"vhost_user,omitempty"`
VhostSocket string `json:"vhost_socket,omitempty"` VhostSocket string `json:"vhost_socket,omitempty"`
Id string `json:"id,omitempty"` Id string `json:"id,omitempty"`
Fd []int32 `json:"fd,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

@ -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

@ -134,6 +134,18 @@ paths:
405: 405:
description: The VM instance could not reboot because it is not booted. 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: /vm.resize:
put: put:
summary: Resize the VM summary: Resize the VM
@ -386,7 +398,7 @@ components:
pci_bdf: pci_bdf:
type: integer type: integer
format: int32 format: int32
VmCounters: VmCounters:
type: object type: object
additionalProperties: additionalProperties:
@ -522,6 +534,9 @@ components:
hugepages: hugepages:
type: boolean type: boolean
default: false default: false
hugepage_size:
type: integer
format: int64
host_numa_node: host_numa_node:
type: integer type: integer
format: int32 format: int32
@ -559,6 +574,9 @@ components:
hugepages: hugepages:
type: boolean type: boolean
default: false default: false
hugepage_size:
type: integer
format: int64
zones: zones:
type: array type: array
items: items:
@ -589,6 +607,48 @@ components:
args: args:
type: string 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: DiskConfig:
required: required:
- path - path
@ -619,6 +679,8 @@ components:
poll_queue: poll_queue:
type: boolean type: boolean
default: true default: true
rate_limiter_config:
$ref: '#/components/schemas/RateLimiterConfig'
id: id:
type: string type: string
@ -652,6 +714,11 @@ components:
type: string type: string
id: id:
type: string type: string
fd:
type: array
items:
type: integer
format: int32
RngConfig: RngConfig:
required: required:
@ -735,7 +802,7 @@ components:
type: string type: string
mode: mode:
type: string type: string
enum: [Off, Tty, File, Null] enum: [Off, Pty, Tty, File, Null]
iommu: iommu:
type: boolean type: boolean
default: false default: false

View File

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