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
kubeconfigfile 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
kubeconfigfile.You can set this using the
KUBECONFIGenvironment variable, or using the--kubeconfigoption withocnecommands. You could also set this in a configuration file.If you don't set the location of the
kubeconfigfile, an ephemeral cluster is created using thelibvirtprovider when required. - Create an OCK image.
Use the
ocne image createcommand 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 amd64The 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 uploadcommand 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.yamlNote:
A Kubernetes cluster is required for this step. If you don't have a Kubernetes cluster set, include the
--kubeconfigoption. For example, to set this to an ephemeral cluster you might use:ocne image upload --kubeconfig $HOME/.kube/kubeconfig.ocne.local ...The image is uploaded and can now be used to create Oracle Linux Virtualization Manager VM instances to use in a Kubernetes cluster.