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

Description
VirtualMachineClone is a CRD that clones one VM into another.
Type
object
Required
spec

Specification

PropertyTypeDescription
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

Type
object
Required
source
PropertyTypeDescription
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

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

.spec.annotationFilters[]

Type
string

.spec.labelFilters

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

.spec.labelFilters[]

Type
string

.spec.newMacAddresses

Description
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.
Type
object

.spec.patches

Description
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"}'
Type
array

.spec.patches[]

Type
string

.spec.source

Description
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
Type
object
Required
kindname
PropertyTypeDescription
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

Description
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.
Type
object
Required
kindname
PropertyTypeDescription
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

Description
For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.
Type
object
PropertyTypeDescription
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

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

.spec.template.annotationFilters[]

Type
string

.spec.template.labelFilters

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

.spec.template.labelFilters[]

Type
string

.status

Type
object
PropertyTypeDescription
conditionsarray
creationTimestring
phasestring
restoreNamestring
snapshotNamestring
targetNamestring

.status.conditions

Type
array

.status.conditions[]

Description
Condition defines conditions
Type
object
Required
statustype
PropertyTypeDescription
lastProbeTimestring
lastTransitionTimestring
messagestring
reasonstring
statusstring
typestring

ConditionType is the const type for Conditions

API Endpoints

The following API endpoints are available:

  • /apis/clone.kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachineclones
    • DELETE: delete collection of VirtualMachineClone
    • GET: list objects of kind VirtualMachineClone
    • POST: create a new VirtualMachineClone
  • /apis/clone.kubevirt.io/v1alpha1/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/v1alpha1/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/v1alpha1/namespaces/{namespace}/virtualmachineclones

HTTP method
DELETE
Description
delete collection of VirtualMachineClone
HTTP responses
HTTP codeResponse body
200 - OKStatus schema
401 - UnauthorizedEmpty
HTTP method
GET
Description
list objects of kind VirtualMachineClone
HTTP responses
HTTP codeResponse body
200 - OKVirtualMachineCloneList schema
401 - UnauthorizedEmpty
HTTP method
POST
Description
create a new VirtualMachineClone
Query parameters
ParameterTypeDescription
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.
Body parameters
ParameterTypeDescription
bodyVirtualMachineClone schemaapplication/json formatted
HTTP responses
HTTP codeResponse body
200 - OKVirtualMachineClone schema
201 - CreatedVirtualMachineClone schema
202 - AcceptedVirtualMachineClone schema
401 - UnauthorizedEmpty

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

HTTP method
DELETE
Description
delete the specified VirtualMachineClone
Query parameters
ParameterTypeDescription
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 responses
HTTP codeResponse body
200 - OKStatus schema
202 - AcceptedStatus schema
401 - UnauthorizedEmpty
HTTP method
GET
Description
read the specified VirtualMachineClone
HTTP responses
HTTP codeResponse body
200 - OKVirtualMachineClone schema
401 - UnauthorizedEmpty
HTTP method
PATCH
Description
partially update the specified VirtualMachineClone
Query parameters
ParameterTypeDescription
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 responses
HTTP codeResponse body
200 - OKVirtualMachineClone schema
401 - UnauthorizedEmpty
HTTP method
PUT
Description
replace the specified VirtualMachineClone
Query parameters
ParameterTypeDescription
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.
Body parameters
ParameterTypeDescription
bodyVirtualMachineClone schemaapplication/json formatted
HTTP responses
HTTP codeResponse body
200 - OKVirtualMachineClone schema
201 - CreatedVirtualMachineClone schema
401 - UnauthorizedEmpty

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

HTTP method
GET
Description
read status of the specified VirtualMachineClone
HTTP responses
HTTP codeResponse body
200 - OKVirtualMachineClone schema
401 - UnauthorizedEmpty
HTTP method
PATCH
Description
partially update status of the specified VirtualMachineClone
Query parameters
ParameterTypeDescription
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 responses
HTTP codeResponse body
200 - OKVirtualMachineClone schema
401 - UnauthorizedEmpty
HTTP method
PUT
Description
replace status of the specified VirtualMachineClone
Query parameters
ParameterTypeDescription
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.
Body parameters
ParameterTypeDescription
bodyVirtualMachineClone schemaapplication/json formatted
HTTP responses
HTTP codeResponse body
200 - OKVirtualMachineClone schema
201 - CreatedVirtualMachineClone schema
401 - UnauthorizedEmpty