VirtualMachineClone [virtualmachineclones.clone.kubevirt.io/v1beta1]

描述
VirtualMachineClone is a CRD that clones one VM into another.
类型
object
必填
spec

规格

属性类型描述
apiVersionstring

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kindstring

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadataObjectMeta

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

specobject
statusobject

.spec

类型
object
必填
source
属性类型描述
annotationFiltersarray

Example use: "!some/key*". For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.

labelFiltersarray

Example use: "!some/key*". For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.

newMacAddressesobject

NewMacAddresses manually sets that target interfaces' mac addresses. The key is the interface name and the value is the new mac address. If this field is not specified, a new MAC address will be generated automatically, as for any interface that is not included in this map.

newSMBiosSerialstring

NewSMBiosSerial manually sets that target's SMbios serial. If this field is not specified, a new serial will be generated automatically.

patchesarray

Patches holds JSON patches to apply to target. Patches should fit the target's Kind. Example: '{"op": "add", "path": "/spec/template/metadata/labels/example", "value": "new-label"}'

sourceobject

Source is the object that would be cloned. Currently supported source types are: VirtualMachine of kubevirt.io API group, VirtualMachineSnapshot of snapshot.kubevirt.io API group

targetobject

Target is the outcome of the cloning process. Currently supported source types are:

  • VirtualMachine of kubevirt.io API group
  • Empty (nil). If the target is not provided, the target type would default to VirtualMachine and a random name would be generated for the target. The target's name can be viewed by inspecting status "TargetName" field below.
templateobject

For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.

.spec.annotationFilters

描述
Example use: "!some/key*". For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.
类型
array

.spec.annotationFilters[]

类型
string

.spec.labelFilters

描述
Example use: "!some/key*". For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.
类型
array

.spec.labelFilters[]

类型
string

.spec.newMacAddresses

描述
NewMacAddresses manually sets that target interfaces' mac addresses. The key is the interface name and the value is the new mac address. If this field is not specified, a new MAC address will be generated automatically, as for any interface that is not included in this map.
类型
object

.spec.patches

描述
Patches holds JSON patches to apply to target. Patches should fit the target's Kind. Example: '{"op": "add", "path": "/spec/template/metadata/labels/example", "value": "new-label"}'
类型
array

.spec.patches[]

类型
string

.spec.source

描述
Source is the object that would be cloned. Currently supported source types are: VirtualMachine of kubevirt.io API group, VirtualMachineSnapshot of snapshot.kubevirt.io API group
类型
object
必填
kindname
属性类型描述
apiGroupstring

APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.

kindstring

Kind is the type of resource being referenced

namestring

Name is the name of resource being referenced

.spec.target

描述
Target is the outcome of the cloning process. Currently supported source types are: - VirtualMachine of kubevirt.io API group - Empty (nil). If the target is not provided, the target type would default to VirtualMachine and a random name would be generated for the target. The target's name can be viewed by inspecting status "TargetName" field below.
类型
object
必填
kindname
属性类型描述
apiGroupstring

APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.

kindstring

Kind is the type of resource being referenced

namestring

Name is the name of resource being referenced

.spec.template

描述
For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.
类型
object
属性类型描述
annotationFiltersarray

Example use: "!some/key*". For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.

labelFiltersarray

Example use: "!some/key*". For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.

.spec.template.annotationFilters

描述
Example use: "!some/key*". For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.
类型
array

.spec.template.annotationFilters[]

类型
string

.spec.template.labelFilters

描述
Example use: "!some/key*". For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.
类型
array

.spec.template.labelFilters[]

类型
string

.status

类型
object
属性类型描述
conditionsarray
creationTimestring
phasestring
restoreNamestring
snapshotNamestring
targetNamestring

.status.conditions

类型
array

.status.conditions[]

描述
Condition defines conditions
类型
object
必填
statustype
属性类型描述
lastProbeTimestring
lastTransitionTimestring
messagestring
reasonstring
statusstring
typestring

ConditionType is the const type for Conditions

API 端点

可用的 API 端点如下:

  • /apis/clone.kubevirt.io/v1beta1/namespaces/{namespace}/virtualmachineclones
    • DELETE: delete collection of VirtualMachineClone
    • GET: list objects of kind VirtualMachineClone
    • POST: create a new VirtualMachineClone
  • /apis/clone.kubevirt.io/v1beta1/namespaces/{namespace}/virtualmachineclones/{name}
    • DELETE: delete the specified VirtualMachineClone
    • GET: read the specified VirtualMachineClone
    • PATCH: partially update the specified VirtualMachineClone
    • PUT: replace the specified VirtualMachineClone
  • /apis/clone.kubevirt.io/v1beta1/namespaces/{namespace}/virtualmachineclones/{name}/status
    • GET: read status of the specified VirtualMachineClone
    • PATCH: partially update status of the specified VirtualMachineClone
    • PUT: replace status of the specified VirtualMachineClone

/apis/clone.kubevirt.io/v1beta1/namespaces/{namespace}/virtualmachineclones

HTTP 方法
DELETE
描述
delete collection of VirtualMachineClone
HTTP 响应
HTTP 状态码响应体
200 - OKStatus schema
401 - UnauthorizedEmpty
HTTP 方法
GET
描述
list objects of kind VirtualMachineClone
HTTP 响应
HTTP 状态码响应体
200 - OKVirtualMachineCloneList schema
401 - UnauthorizedEmpty
HTTP 方法
POST
描述
create a new VirtualMachineClone
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
请求体参数
参数类型描述
bodyVirtualMachineClone schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKVirtualMachineClone schema
201 - CreatedVirtualMachineClone schema
202 - AcceptedVirtualMachineClone schema
401 - UnauthorizedEmpty

/apis/clone.kubevirt.io/v1beta1/namespaces/{namespace}/virtualmachineclones/{name}

HTTP 方法
DELETE
描述
delete the specified VirtualMachineClone
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
HTTP 响应
HTTP 状态码响应体
200 - OKStatus schema
202 - AcceptedStatus schema
401 - UnauthorizedEmpty
HTTP 方法
GET
描述
read the specified VirtualMachineClone
HTTP 响应
HTTP 状态码响应体
200 - OKVirtualMachineClone schema
401 - UnauthorizedEmpty
HTTP 方法
PATCH
描述
partially update the specified VirtualMachineClone
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
HTTP 响应
HTTP 状态码响应体
200 - OKVirtualMachineClone schema
401 - UnauthorizedEmpty
HTTP 方法
PUT
描述
replace the specified VirtualMachineClone
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
请求体参数
参数类型描述
bodyVirtualMachineClone schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKVirtualMachineClone schema
201 - CreatedVirtualMachineClone schema
401 - UnauthorizedEmpty

/apis/clone.kubevirt.io/v1beta1/namespaces/{namespace}/virtualmachineclones/{name}/status

HTTP 方法
GET
描述
read status of the specified VirtualMachineClone
HTTP 响应
HTTP 状态码响应体
200 - OKVirtualMachineClone schema
401 - UnauthorizedEmpty
HTTP 方法
PATCH
描述
partially update status of the specified VirtualMachineClone
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
HTTP 响应
HTTP 状态码响应体
200 - OKVirtualMachineClone schema
401 - UnauthorizedEmpty
HTTP 方法
PUT
描述
replace status of the specified VirtualMachineClone
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
请求体参数
参数类型描述
bodyVirtualMachineClone schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKVirtualMachineClone schema
201 - CreatedVirtualMachineClone schema
401 - UnauthorizedEmpty