Offline Upgrade of the Virtual Machine Module¶
This page explains how to install or upgrade the Virtual Machine module after downloading it from the Download Center.
Info
The term "virtnest" appearing in the following commands or scripts is the internal development code name for the Virtual Machine module.
Load Images from the Installation Package¶
You can load the images using one of the following two methods. When there is an container registry available in your environment, it is recommended to choose the chart-syncer method for synchronizing the images to the container registry, as it is more efficient and convenient.
Synchronize Images to the container registry using chart-syncer¶
-
Create load-image.yaml file.
Note
All parameters in this YAML file are mandatory. You need a private container registry and modify the relevant configurations.
If the chart repo is already installed in your environment, chart-syncer also supports exporting the chart as a tgz file.
load-image.yamlsource: intermediateBundlesPath: virtnest-offline # (1) target: containerRegistry: 10.16.10.111 # (2) containerRepository: release.daocloud.io/virtnest # (3) repo: kind: HARBOR # (4) url: http://10.16.10.111/chartrepo/release.daocloud.io # (5) auth: username: "admin" # (6) password: "Harbor12345" # (7) containers: auth: username: "admin" # (8) password: "Harbor12345" # (9)
- The relative path to run the charts-syncer command, not the relative path between this YAML file and the offline package.
- Change to your container registry URL.
- Change to your container registry.
- It can also be any other supported Helm Chart repository type.
- Change to the chart repo URL.
- Your container registry username.
- Your container registry password.
- Your container registry username.
- Your container registry password.
If the chart repo is not installed in your environment, chart-syncer also supports exporting the chart as a tgz file and storing it in the specified path.
load-image.yamlsource: intermediateBundlesPath: virtnest-offline # (1) target: containerRegistry: 10.16.10.111 # (2) containerRepository: release.daocloud.io/virtnest # (3) repo: kind: LOCAL path: ./local-repo # (4) containers: auth: username: "admin" # (5) password: "Harbor12345" # (6)
- The relative path to run the charts-syncer command, not the relative path between this YAML file and the offline package.
- Change to your container registry URL.
- Change to your container registry.
- Local path of the chart.
- Your container registry username.
- Your container registry password.
-
Run the command to synchronize the images.
Load Images Directly using Docker or containerd¶
Unpack and load the image files.
-
Unpack the tar archive.
After successful extraction, you will have three files:
- hints.yaml
- images.tar
- original-chart
-
Load the images from the local file to Docker or containerd.
Note
Perform the Docker or containerd image loading operation on each node. After loading is complete, tag the images to match the Registry and Repository used during installation.
Upgrade¶
There are two upgrade methods available. You can choose the appropriate upgrade method based on the prerequisites:
-
Check if the Virtual Machine Helm repository exists.
If the result is empty or shows the following message, proceed to the next step. Otherwise, skip the next step.
-
Add the Virtual Machine Helm repository.
-
Update the Virtual Machine Helm repository.
- If the helm version is too low, it may fail. If it fails, try executing
helm update repo
.
- If the helm version is too low, it may fail. If it fails, try executing
-
Choose the version of the Virtual Machine you want to install (it is recommended to install the latest version).
-
Back up the
--set
parameters.Before upgrading the Virtual Machine version, it is recommended to run the following command to backup the
--set
parameters of the previous version. -
Update the virtnest CRDs.
-
Run
helm upgrade
.Before upgrading, it is recommended to replace the
global.imageRegistry
field in bak.yaml with the current container registry address.
-
Back up the
--set
parameters.Before upgrading the Virtual Machine version, it is recommended to run the following command to backup the
--set
parameters of the previous version. -
Update the virtnest CRDs.
-
Run
helm upgrade
.Before upgrading, it is recommended to replace the
global.imageRegistry
field in bak.yaml with the current container registry address.