New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registry Disk user-guide update #4
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
## 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. | ||
|
||
## 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regarding to restarts, if it is just a restart on the same node, will it keep the data? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nope, the only case where data will be reused is if the process was allowed to recover within the same virt-launcher cgroup. |
||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you highlight There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yup |
||
|
||
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 | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is clear, if one thinks about the container registry re-use, but could you add one or two sentences, which make it more explicit, that no shared storage is needed, after the images are pulled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll add some more about this