<commit_before># KubeVirt Registry Disk Base Container

The KubeVirt Registry Disk Base Container allows users to store VM disks in
a container registry and attach those disk to VMs automatically using the
KubeVirt runtime.

This Base Container is compatible with disk type RegistryDisk:v1alpha

# RegistryDisk:v1alpha
## Storing Disks in Container Registry

VM disks can be stored in either qcow2 format or raw format by copying the vm
disk into a container image and uploading that container image to a container
registry.

Example: Place a bootable VM disk into a container image in the /disk directory
and upload to the container registry.
```
cat << END > Dockerfile 
FROM kubevirt.io:registry-disk-v1alpha
ADD fedora25.qcow2 /disk
END

docker build -t vmdisks/fedora25:latest .
docker push vmdisks/fedora25:latest
```

## Assigning Ephemeral Disks to VMs

Assign an ephemeral disk backed by an image in the container registry by
adding a RegistryDisk:v1alpha disk to the VM definition and supplying
the container image as the disk's source name.

Example: Create a KubeVirt VM definition with container backed ephemeral disk.

```
cat << END > vm.yaml
metadata:
  name: testvm-ephemeral
apiVersion: kubevirt.io/v1alpha1
kind: VirtualMachine
spec:
  domain:
    devices:
      disks:
      - type: RegistryDisk:v1alpha
        source:
          name: vmdisks/fedora25:devel
        target:
          dev: vda
      interfaces:
      - source:
          network: default
        type: network
    memory:
      unit: MB
      value: 64
    os:
      type:
        os: hvm
    type: qemu
END
```

After creating the VM definition, starting the VM is as simple starting a pod.
 
```
kubectl create -f vm.yaml
```

<commit_msg>update registry disk doc example to reflect new api<commit_after># KubeVirt Registry Disk Base Container

The KubeVirt Registry Disk Base Container allows users to store VM disks in
a container registry and attach those disk to VMs automatically using the
KubeVirt runtime.

This Base Container is compatible with disk type RegistryDisk:v1alpha

# RegistryDisk:v1alpha
## Storing Disks in Container Registry

VM disks can be stored in either qcow2 format or raw format by copying the vm
disk into a container image and uploading that container image to a container
registry.

Example: Place a bootable VM disk into a container image in the /disk directory
and upload to the container registry.
```
cat << END > Dockerfile 
FROM kubevirt.io:registry-disk-v1alpha
ADD fedora25.qcow2 /disk
END

docker build -t vmdisks/fedora25:latest .
docker push vmdisks/fedora25:latest
```

## Assigning Ephemeral Disks to VMs

Assign an ephemeral disk backed by an image in the container registry by
adding a RegistryDisk:v1alpha disk to the VM definition and supplying
the container image as the disk's source name.

Example: Create a KubeVirt VM definition with container backed ephemeral disk.

```
cat << END > vm.yaml
apiVersion: kubevirt.io/v1alpha1
kind: VirtualMachine
metadata:
  creationTimestamp: null
  name: vm-ephemeral
spec:
  domain:
    devices:
      disks:
      - disk:
          bus: virtio
        name: registrydisk
        volumeName: registryvolume
    machine:
      type: ""
    resources:
      requests:
        memory: 64M
  terminationGracePeriodSeconds: 0
  volumes:
  - name: registryvolume
    registryDisk:
      image: kubevirt/cirros-registry-disk-demo:devel
status: {}
END
```

After creating the VM definition, starting the VM is as simple starting a pod.
 
```
kubectl create -f vm.yaml
```


{'fraction_non_alphanumeric': 0.05472496473906911, 'fraction_numerical': 0.010155148095909733, 'mean_word_length': 3.55198973042362, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '955286', 'n_tokens_mistral': 1075, 'n_tokens_neox': 1004, 'n_words': 445}