Creating an OCK Image for the Oracle Linux Virtualization Manager Provider
Create an Oracle Container Host for Kubernetes (OCK) image for the Oracle Linux Virtualization Manager (olvm
) provider. Then upload the image to Oracle Linux Virtualization Manager so it an be used as the boot disk for VM instances.
- Set up the Oracle Linux Virtualization Manager provider.
For information on setting up the provider, see Setting Up the Oracle Linux Virtualization Manager Provider.
- Create a configuration file.
For information on creating a configuration file, see Creating a Configuration File for an Oracle Linux Virtualization Manager Cluster.
- (Optional) Set the location of the
kubeconfig
file for an existing cluster.A Kubernetes cluster is required to perform some steps. You can use an existing cluster for this purpose by setting the location of the
kubeconfig
file.You can set this using the
KUBECONFIG
environment variable, or using the--kubeconfig
option withocne
commands. You could also set this in a configuration file.If you don't set the location of the
kubeconfig
file, an ephemeral cluster is created using thelibvirt
provider when required. - Create an OCK image.
Use the
ocne image create
command to create an OCK image for Oracle Linux Virtualization Manager. The syntax is:ocne image create
{-a|--arch} arch [{-t|--type} provider] [{-v|--version} version]For more information on the syntax options, see Oracle Cloud Native Environment: CLI.
For example:
ocne image create --type olvm --arch amd64
The Kubernetes cluster is used to generate the Qcow2 image, and the image is saved to the
$HOME/.ocne/images/
directory. - Upload the OCK image to Oracle Linux Virtualization Manager.
Use the
ocne image upload
command to upload the image to Oracle Linux Virtualization Manager. The syntax is:ocne image upload
{-a|--arch} arch [{-b|--bucket} name] [{-c|--compartment} name] [--config path] [{-d|--destination} path] {-f|--file} path {-i|--image-name} name {-t|--type} provider {-v|--version} versionFor more information on the syntax options, see Oracle Cloud Native Environment: CLI.
For example:
ocne image upload --type olvm --file $HOME/.ocne/images/boot.qcow2-1.32-amd64.olvm --arch amd64 --config myconfig.yaml
The image is uploaded and can now be used to create Oracle Linux Virtualization Manager VM instances to use in a Kubernetes cluster.