Skip to content
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

Merged
merged 3 commits into from Oct 4, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions SUMMARY.md
Expand Up @@ -8,6 +8,7 @@
* [Creation](vm-creation.md)
* [Life-cycle](vm-life-cycle.md)
* [Access](access.md)
* [Ephemeral Registry Disks](registry-disk.md)
* Controllers
* [Live-Migration](live-migration.md)
* [Virtual Machine Replica Set](replicaset.md)
Expand Down
77 changes: 77 additions & 0 deletions registry-disk.md
@@ -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
Copy link
Member

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?

Copy link
Member Author

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

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
Copy link
Member

Choose a reason for hiding this comment

The 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?

Copy link
Member Author

Choose a reason for hiding this comment

The 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you highlight kubevirt.io/registry-disk-v1alpha1?

Copy link
Member Author

Choose a reason for hiding this comment

The 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

```
6 changes: 3 additions & 3 deletions replicaset.md
Expand Up @@ -63,7 +63,7 @@ A workload redistributor needs to be aware of KubeVirt and create Migrations,
instead of `evicting` VirtualMachines by deletion.

> **Note:** The simplest form of having a migratable ephemeral VirtualMachine,
> will be to use local storage based on `ContainerRegistryDisks` in combination
> will be to use local storage based on `RegistryDisks` in combination
> with a file based backing store. However, migratable backing store
> support did not yet land in KubeVirt.

Expand Down Expand Up @@ -96,7 +96,7 @@ spec:
video:
- type: qxl
disks:
- type: ContainerRegistryDisk:v1alpha
- type: RegistryDisk:v1alpha
source:
name: kubevirt/cirros-registry-disk-demo:devel
target:
Expand Down Expand Up @@ -152,7 +152,7 @@ Spec:
Name: kubevirt/cirros-registry-disk-demo:devel
Target:
Dev: vda
Type: ContainerRegistryDisk:v1alpha
Type: RegistryDisk:v1alpha
Graphics:
Listen:
Type:
Expand Down