VirtualMachineRestore [virtualmachinerestores.snapshot.kubevirt.io/v1beta1]

Description
VirtualMachineRestore defines the operation of restoring a VM
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

VirtualMachineRestoreSpec is the spec for a VirtualMachineRestore resource

statusobject

VirtualMachineRestoreStatus is the status for a VirtualMachineRestore resource

.spec

Description
VirtualMachineRestoreSpec is the spec for a VirtualMachineRestore resource
Type
object
Required
targetvirtualMachineSnapshotName
PropertyTypeDescription
patchesarray

If the target for the restore does not exist, it will be created. Patches holds JSON patches that would be applied to the target manifest before it's created. Patches should fit the target's Kind.

Example for a patch: {"op": "replace", "path": "/metadata/name", "value": "new-vm-name"}

targetobject

initially only VirtualMachine type supported

targetReadinessPolicystring

TargetReadinessPolicy defines how to handle the restore in case the target is not ready

virtualMachineSnapshotNamestring
volumeOwnershipPolicystring

VolumeOwnershipPolicy defines what owns volumes once they're restored

volumeRestoreOverridesarray

VolumeRestoreOverrides gives the option to change properties of each restored volume For example, specifying the name of the restored volume, or adding labels/annotations to it

volumeRestorePolicystring

VolumeRestorePolicy defines how to handle the restore of snapshotted volumes

.spec.patches

Description
If the target for the restore does not exist, it will be created. Patches holds JSON patches that would be applied to the target manifest before it's created. Patches should fit the target's Kind. Example for a patch: {"op": "replace", "path": "/metadata/name", "value": "new-vm-name"}
Type
array

.spec.patches[]

Type
string

.spec.target

Description
initially only VirtualMachine type supported
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.volumeRestoreOverrides

Description
VolumeRestoreOverrides gives the option to change properties of each restored volume For example, specifying the name of the restored volume, or adding labels/annotations to it
Type
array

.spec.volumeRestoreOverrides[]

Description
VolumeRestoreOverride specifies how a volume should be restored from a VirtualMachineSnapshot
Type
object
PropertyTypeDescription
annotationsobject
labelsobject
restoreNamestring
volumeNamestring

.spec.volumeRestoreOverrides[].annotations

Type
object

.spec.volumeRestoreOverrides[].labels

Type
object

.status

Description
VirtualMachineRestoreStatus is the status for a VirtualMachineRestore resource
Type
object
PropertyTypeDescription
completeboolean
conditionsarray
deletedDataVolumesarray
restoreTimestring
restoresarray

.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

.status.deletedDataVolumes

Type
array

.status.deletedDataVolumes[]

Type
string

.status.restores

Type
array

.status.restores[]

Description
VolumeRestore contains the data needed to restore a PVC
Type
object
Required
persistentVolumeClaimvolumeNamevolumeSnapshotName
PropertyTypeDescription
dataVolumeNamestring
persistentVolumeClaimstring
volumeNamestring
volumeSnapshotNamestring

API Endpoints

The following API endpoints are available:

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

/apis/snapshot.kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinerestores

HTTP method
DELETE
Description
delete collection of VirtualMachineRestore
HTTP responses
HTTP codeResponse body
200 - OKStatus schema
401 - UnauthorizedEmpty
HTTP method
GET
Description
list objects of kind VirtualMachineRestore
HTTP responses
HTTP codeResponse body
200 - OKVirtualMachineRestoreList schema
401 - UnauthorizedEmpty
HTTP method
POST
Description
create a new VirtualMachineRestore
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
bodyVirtualMachineRestore schemaapplication/json formatted
HTTP responses
HTTP codeResponse body
200 - OKVirtualMachineRestore schema
201 - CreatedVirtualMachineRestore schema
202 - AcceptedVirtualMachineRestore schema
401 - UnauthorizedEmpty

/apis/snapshot.kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinerestores/{name}

HTTP method
DELETE
Description
delete the specified VirtualMachineRestore
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 VirtualMachineRestore
HTTP responses
HTTP codeResponse body
200 - OKVirtualMachineRestore schema
401 - UnauthorizedEmpty
HTTP method
PATCH
Description
partially update the specified VirtualMachineRestore
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 - OKVirtualMachineRestore schema
401 - UnauthorizedEmpty
HTTP method
PUT
Description
replace the specified VirtualMachineRestore
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
bodyVirtualMachineRestore schemaapplication/json formatted
HTTP responses
HTTP codeResponse body
200 - OKVirtualMachineRestore schema
201 - CreatedVirtualMachineRestore schema
401 - UnauthorizedEmpty

/apis/snapshot.kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinerestores/{name}/status

HTTP method
GET
Description
read status of the specified VirtualMachineRestore
HTTP responses
HTTP codeResponse body
200 - OKVirtualMachineRestore schema
401 - UnauthorizedEmpty
HTTP method
PATCH
Description
partially update status of the specified VirtualMachineRestore
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 - OKVirtualMachineRestore schema
401 - UnauthorizedEmpty
HTTP method
PUT
Description
replace status of the specified VirtualMachineRestore
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
bodyVirtualMachineRestore schemaapplication/json formatted
HTTP responses
HTTP codeResponse body
200 - OKVirtualMachineRestore schema
201 - CreatedVirtualMachineRestore schema
401 - UnauthorizedEmpty