Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from davidvossel/registry-disk-update
Registry Disk user-guide update
- Loading branch information
Showing
3 changed files
with
85 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
## Registry Disk | ||
|
||
The Registry Disk feature provides the ability to store and distribute Virtual | ||
Machine disks in the container image registry. Registry Disks can be assigned | ||
to Virtual Machines in the disks section of the Virtual Machine spec. | ||
|
||
No network shared storage devices are utilized by Registry Disks. The disks are | ||
pulled from the container registry and reside on the local node hosting the | ||
Virtual Machines that consume the disks. | ||
|
||
## When to use a Registry Disk | ||
|
||
Registry Disks are ephemeral storage devices that can be assigned to any number | ||
of active Virtual Machines. This makes them an ideal tool for users who want | ||
to replicate a large number of Virtual Machine workloads that do not require | ||
persistent data. Registry Disks are commonly used in conjunction with Virtual | ||
Machine Replica Sets. | ||
|
||
## When Not to use a Registry Disk | ||
|
||
Registry Disks are not a good solution for any workload that requires persistent | ||
disks across Virtual Machine restarts, or workloads that require Virtual | ||
Machine live migration support. It is possible Registry Disks may gain live | ||
migration support in the future, but at the moment live migrations are | ||
incompatible with Registry Disks. | ||
|
||
## Registry Disk Workflow Example | ||
|
||
Users push Virtual Machine disks into the container registry using a KubeVirt | ||
base designed to work with the Registry Disk feature. The latest base container | ||
image is **kubevirt.io/registry-disk-v1alpha**. | ||
|
||
Using this base image, users can inject a Virtual Machine disk into a container | ||
image in a way that is consumable by the KubeVirt runtime. Disks placed into | ||
the base container must be placed into the /disk directory. Raw and qcow2 | ||
formats are supported. Qcow2 is recommended in order to reduce the container | ||
image's size. | ||
|
||
Example: Inject a Virtual Machine disk into a container image. | ||
``` | ||
cat << END > Dockerfile | ||
FROM kubevirt.io/registry-disk-v1alpha | ||
ADD fedora25.qcow2 /disk | ||
END | ||
docker build -t vmdisks/fedora25:latest . | ||
``` | ||
|
||
Example: Upload the RegistryDisk container image to a registry. | ||
``` | ||
docker push vmdisks/fedora25:latest | ||
``` | ||
|
||
Example: Attach the RegistryDisk as an ephemeral disk to a virtual machine. | ||
``` | ||
metadata: | ||
name: testvm-ephemeral | ||
apiVersion: kubevirt.io/v1alpha1 | ||
kind: VirtualMachine | ||
spec: | ||
domain: | ||
devices: | ||
disks: | ||
- type: RegistryDisk:v1alpha | ||
source: | ||
name: vmdisks/fedora25:latest | ||
target: | ||
dev: vda | ||
interfaces: | ||
- source: | ||
network: default | ||
type: network | ||
memory: | ||
unit: MB | ||
value: 1024 | ||
os: | ||
type: | ||
os: hvm | ||
type: qemu | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters