diff --git a/docs/upgrade/automatic.md b/docs/upgrade/automatic.md index 8235d4bace..ee4a35eccc 100644 --- a/docs/upgrade/automatic.md +++ b/docs/upgrade/automatic.md @@ -1,6 +1,6 @@ --- id: index -sidebar_position: 1 +sidebar_position: 10 sidebar_label: Upgrading Harvester title: "Upgrading Harvester" keywords: @@ -176,7 +176,16 @@ For write-heavy or business-critical virtual machines that may not converge duri - Do not operate the cluster during an upgrade. For example, creating new VMs, uploading new images, etc. - Make sure your hardware meets the **preferred** [hardware requirements](../install/requirements.md#hardware-requirements). This is due to there will be intermediate resources consumed by an upgrade. - Make sure each node has at least 30 GiB of free system partition space (`df -h /usr/local/`). If any node in the cluster has less than 30 GiB of free system partition space, the upgrade will be denied. Check [free system partition space requirement](#free-system-partition-space-requirement) for more information. -- Run the [pre-check script](https://github.com/harvester/upgrade-helpers/blob/main/pre-check/v1.x/check.sh) on a Harvester control-plane node. Take action on any failed checks before initiating the upgrade process. +- Run the [pre-check script](https://github.com/harvester/upgrade-helpers/tree/main/pre-check) on a Harvester control-plane node. Take action on any failed checks before initiating the upgrade process. + + ``` + # Download the script + $ curl -o /tmp/check.sh https://raw.githubusercontent.com/harvester/upgrade-helpers/refs/heads/main/pre-check/v1.x/check.sh && chmod +x /tmp/check.sh + + # Run the checks + $ /tmp/check.sh + ``` + - A number of one-off privileged pods will be created in the `harvester-system` and `cattle-system` namespaces to perform host-level upgrade operations. If [pod security admission](https://kubernetes.io/docs/concepts/security/pod-security-admission/) is enabled, adjust these policies to allow these pods to run. ::: diff --git a/docs/upgrade/troubleshooting.md b/docs/upgrade/troubleshooting.md index 39e4ffaea5..36ecf1f07f 100644 --- a/docs/upgrade/troubleshooting.md +++ b/docs/upgrade/troubleshooting.md @@ -1,5 +1,5 @@ --- -sidebar_position: 22 +sidebar_position: 205 sidebar_label: Troubleshooting title: "Troubleshooting" --- diff --git a/docs/upgrade/v1-1-2-to-v1-2-0.md b/docs/upgrade/v1-1-2-to-v1-2-0.md index f19774b97c..277dd3cb05 100644 --- a/docs/upgrade/v1-1-2-to-v1-2-0.md +++ b/docs/upgrade/v1-1-2-to-v1-2-0.md @@ -1,5 +1,5 @@ --- -sidebar_position: 22 +sidebar_position: 200 sidebar_label: Upgrade from v1.1.2 to v1.2.0 (not recommended) title: "Upgrade from v1.1.2 to v1.2.0 (not recommended)" --- diff --git a/docs/upgrade/v1-2-0-to-v1-2-1.md b/docs/upgrade/v1-2-0-to-v1-2-1.md index 44fb070219..a1895a73fc 100644 --- a/docs/upgrade/v1-2-0-to-v1-2-1.md +++ b/docs/upgrade/v1-2-0-to-v1-2-1.md @@ -1,5 +1,5 @@ --- -sidebar_position: 21 +sidebar_position: 195 sidebar_label: Upgrade from v1.1.2/v1.1.3/v1.2.0 to v1.2.1 title: "Upgrade from v1.1.2/v1.1.3/v1.2.0 to v1.2.1" --- diff --git a/docs/upgrade/v1-2-1-to-v1-2-2.md b/docs/upgrade/v1-2-1-to-v1-2-2.md index 8227157ca1..574c9e80ef 100644 --- a/docs/upgrade/v1-2-1-to-v1-2-2.md +++ b/docs/upgrade/v1-2-1-to-v1-2-2.md @@ -1,5 +1,5 @@ --- -sidebar_position: 20 +sidebar_position: 190 sidebar_label: Upgrade from v1.2.1 to v1.2.2 title: "Upgrade from v1.2.1 to v1.2.2" --- diff --git a/docs/upgrade/v1-2-2-to-v1-3-1.md b/docs/upgrade/v1-2-2-to-v1-3-1.md index d8bf71ff69..b544c459c6 100644 --- a/docs/upgrade/v1-2-2-to-v1-3-1.md +++ b/docs/upgrade/v1-2-2-to-v1-3-1.md @@ -1,5 +1,5 @@ --- -sidebar_position: 19 +sidebar_position: 185 sidebar_label: Upgrade from v1.2.2/v1.3.0 to v1.3.1 title: "Upgrade from v1.2.2/v1.3.0 to v1.3.1" --- diff --git a/docs/upgrade/v1-3-1-to-v1-3-2.md b/docs/upgrade/v1-3-1-to-v1-3-2.md index 74804b6fc3..c5c80afea1 100644 --- a/docs/upgrade/v1-3-1-to-v1-3-2.md +++ b/docs/upgrade/v1-3-1-to-v1-3-2.md @@ -1,5 +1,5 @@ --- -sidebar_position: 18 +sidebar_position: 180 sidebar_label: Upgrade from v1.3.1 to v1.3.2 title: "Upgrade from v1.3.1 to v1.3.2" --- diff --git a/docs/upgrade/v1-3-2-to-v1-4-0.md b/docs/upgrade/v1-3-2-to-v1-4-0.md index c91eafff20..3f12d7b34d 100644 --- a/docs/upgrade/v1-3-2-to-v1-4-0.md +++ b/docs/upgrade/v1-3-2-to-v1-4-0.md @@ -1,5 +1,5 @@ --- -sidebar_position: 17 +sidebar_position: 175 sidebar_label: Upgrade from v1.3.2 to v1.4.0 title: "Upgrade from v1.3.2 to v1.4.0" --- diff --git a/docs/upgrade/v1-4-0-to-v1-4-1.md b/docs/upgrade/v1-4-0-to-v1-4-1.md index 5ef9121211..2bfcd467b6 100644 --- a/docs/upgrade/v1-4-0-to-v1-4-1.md +++ b/docs/upgrade/v1-4-0-to-v1-4-1.md @@ -1,5 +1,5 @@ --- -sidebar_position: 16 +sidebar_position: 170 sidebar_label: Upgrade from v1.4.0 to v1.4.1 title: "Upgrade from v1.4.0 to v1.4.1" --- diff --git a/docs/upgrade/v1-4-1-to-v1-4-2.md b/docs/upgrade/v1-4-1-to-v1-4-2.md index f8a2636b65..6d23c42fa5 100644 --- a/docs/upgrade/v1-4-1-to-v1-4-2.md +++ b/docs/upgrade/v1-4-1-to-v1-4-2.md @@ -1,5 +1,5 @@ --- -sidebar_position: 15 +sidebar_position: 165 sidebar_label: Upgrade from v1.4.1 to v1.4.2 title: "Upgrade from v1.4.1 to v1.4.2" --- diff --git a/docs/upgrade/v1-4-1-to-v1-4-3.md b/docs/upgrade/v1-4-1-to-v1-4-3.md index 5b9b870fcc..cea135d887 100644 --- a/docs/upgrade/v1-4-1-to-v1-4-3.md +++ b/docs/upgrade/v1-4-1-to-v1-4-3.md @@ -1,5 +1,5 @@ --- -sidebar_position: 14 +sidebar_position: 160 sidebar_label: Upgrade from v1.4.1/v1.4.2 to v1.4.3 title: "Upgrade from v1.4.1/v1.4.2 to v1.4.3" --- diff --git a/docs/upgrade/v1-4-2-to-v1-5-0.md b/docs/upgrade/v1-4-2-to-v1-5-0.md index aff3d30985..494c51d5df 100644 --- a/docs/upgrade/v1-4-2-to-v1-5-0.md +++ b/docs/upgrade/v1-4-2-to-v1-5-0.md @@ -1,5 +1,5 @@ --- -sidebar_position: 13 +sidebar_position: 155 sidebar_label: Upgrade from v1.4.2/v1.4.3 to v1.5.0 title: "Upgrade from v1.4.2/v1.4.3 to v1.5.0" --- diff --git a/docs/upgrade/v1-4-2-to-v1-5-1.md b/docs/upgrade/v1-4-2-to-v1-5-1.md index 62828e181c..f2c89c5558 100644 --- a/docs/upgrade/v1-4-2-to-v1-5-1.md +++ b/docs/upgrade/v1-4-2-to-v1-5-1.md @@ -1,5 +1,5 @@ --- -sidebar_position: 12 +sidebar_position: 150 sidebar_label: Upgrade from v1.4.2/v1.4.3 to v1.5.1 title: "Upgrade from v1.4.2/v1.4.3 to v1.5.1" --- diff --git a/docs/upgrade/v1-4-2-to-v1-5-2.md b/docs/upgrade/v1-4-2-to-v1-5-2.md index 9461e4c314..c199df8919 100644 --- a/docs/upgrade/v1-4-2-to-v1-5-2.md +++ b/docs/upgrade/v1-4-2-to-v1-5-2.md @@ -1,5 +1,5 @@ --- -sidebar_position: 11 +sidebar_position: 145 sidebar_label: Upgrade from v1.4.2/v1.4.3 to v1.5.2 title: "Upgrade from v1.4.2/v1.4.3 to v1.5.2" --- diff --git a/docs/upgrade/v1-5-0-to-v1-5-1.md b/docs/upgrade/v1-5-0-to-v1-5-1.md index e39ee10d0f..e33b732353 100644 --- a/docs/upgrade/v1-5-0-to-v1-5-1.md +++ b/docs/upgrade/v1-5-0-to-v1-5-1.md @@ -1,5 +1,5 @@ --- -sidebar_position: 10 +sidebar_position: 140 sidebar_label: Upgrade from v1.5.0 to v1.5.1 title: "Upgrade from v1.5.0 to v1.5.1" --- diff --git a/docs/upgrade/v1-5-0-to-v1-5-2.md b/docs/upgrade/v1-5-0-to-v1-5-2.md index 5f12b85373..317d74a195 100644 --- a/docs/upgrade/v1-5-0-to-v1-5-2.md +++ b/docs/upgrade/v1-5-0-to-v1-5-2.md @@ -1,5 +1,5 @@ --- -sidebar_position: 9 +sidebar_position: 135 sidebar_label: Upgrade from v1.5.0/v1.5.1 to v1.5.2 title: "Upgrade from v1.5.0/v1.5.1 to v1.5.2" --- diff --git a/docs/upgrade/v1-5-x-to-v1-6-x.md b/docs/upgrade/v1-5-x-to-v1-6-x.md index becf78e569..e500d886ee 100644 --- a/docs/upgrade/v1-5-x-to-v1-6-x.md +++ b/docs/upgrade/v1-5-x-to-v1-6-x.md @@ -1,5 +1,5 @@ --- -sidebar_position: 8 +sidebar_position: 130 sidebar_label: Upgrade from v1.5.x to v1.6.x title: "Upgrade from v1.5.x to v1.6.x" --- diff --git a/docs/upgrade/v1-6-x-to-v1-6-y.md b/docs/upgrade/v1-6-x-to-v1-6-y.md index 9dc06ca551..5cbbeea9a3 100644 --- a/docs/upgrade/v1-6-x-to-v1-6-y.md +++ b/docs/upgrade/v1-6-x-to-v1-6-y.md @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 125 sidebar_label: Upgrade from v1.6.x to v1.6.y title: "Upgrade from v1.6.x to v1.6.y" --- diff --git a/docs/upgrade/v1-6-x-to-v1-7-x.md b/docs/upgrade/v1-6-x-to-v1-7-x.md index b575cf2693..1066cc14ec 100644 --- a/docs/upgrade/v1-6-x-to-v1-7-x.md +++ b/docs/upgrade/v1-6-x-to-v1-7-x.md @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 120 sidebar_label: Upgrade from v1.6.x to v1.7.x title: "Upgrade from v1.6.x to v1.7.x" --- diff --git a/docs/upgrade/v1-7-x-to-v1-7-y.md b/docs/upgrade/v1-7-x-to-v1-7-y.md index 261968397b..95a1e1c7d6 100644 --- a/docs/upgrade/v1-7-x-to-v1-7-y.md +++ b/docs/upgrade/v1-7-x-to-v1-7-y.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 115 sidebar_label: Upgrade from v1.7.x to v1.7.y title: "Upgrade from v1.7.x to v1.7.y" --- diff --git a/docs/upgrade/v1-7-x-to-v1-8-x.md b/docs/upgrade/v1-7-x-to-v1-8-x.md index 0cb5a81653..d34907cb2f 100644 --- a/docs/upgrade/v1-7-x-to-v1-8-x.md +++ b/docs/upgrade/v1-7-x-to-v1-8-x.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 110 sidebar_label: Upgrade from v1.7.x to v1.8.x title: "Upgrade from v1.7.x to v1.8.x" --- diff --git a/docs/upgrade/v1-8-x-to-v1-8-y.md b/docs/upgrade/v1-8-x-to-v1-8-y.md index f9f12ed678..1aabc75340 100644 --- a/docs/upgrade/v1-8-x-to-v1-8-y.md +++ b/docs/upgrade/v1-8-x-to-v1-8-y.md @@ -1,5 +1,5 @@ --- -sidebar_position: 3 +sidebar_position: 105 sidebar_label: Upgrade from v1.8.x to v1.8.y title: "Upgrade from v1.8.x to v1.8.y" --- diff --git a/docs/upgrade/v1-8-x-to-v1-9-x.md b/docs/upgrade/v1-8-x-to-v1-9-x.md index d5bf00bd2b..5a721508d5 100644 --- a/docs/upgrade/v1-8-x-to-v1-9-x.md +++ b/docs/upgrade/v1-8-x-to-v1-9-x.md @@ -1,5 +1,5 @@ --- -sidebar_position: 2 +sidebar_position: 100 sidebar_label: Upgrade from v1.8.x to v1.9.x title: "Upgrade from v1.8.x to v1.9.x" --- diff --git a/docs/upgrade/v1-9-x-to-v1-10-x.md b/docs/upgrade/v1-9-x-to-v1-10-x.md new file mode 100644 index 0000000000..67c86b966a --- /dev/null +++ b/docs/upgrade/v1-9-x-to-v1-10-x.md @@ -0,0 +1,60 @@ +--- +sidebar_position: 95 +sidebar_label: Upgrade from v1.9.x to v1.10.x +title: "Upgrade from v1.9.x to v1.10.x" +--- + + + + + +## General Information + +The **Upgrade** button on the **Dashboard** screen becomes selectable whenever a new Harvester version that you can upgrade to becomes available. For more information, see [Start an upgrade](./automatic.md#start-an-upgrade). + +### Volume Size Validation for VM Images + +Starting with v1.10.0, Harvester validates that any new volume created from a virtual machine image is at least as large as the virtual size of that image (rounded up to the nearest whole GiB). Harvester rejects volume requests that violate this constraint. +This validation applies exclusively to new volume requests. Existing volumes are not modified during an upgrade, which means that any previously undersized volume remains undersized until expanded manually. + +#### Root Cause and Risk + +Earlier Harvester versions did not enforce volume size validation, allowing volumes to be created smaller than their source images. This issue typically occurred when a golden image was replaced by a larger version after volumes had already been created from it. +Because the guest operating system provisions its filesystem based on the virtual image size, writing data past the physical end of an undersized volume can cause guest filesystem corruption. + +#### Identifying Undersized Volumes + +Before starting the upgrade, run the [pre-check script](https://github.com/harvester/upgrade-helpers/tree/main/pre-check) on a Harvester management node to identify affected volumes. +Because the script is updated independently of Harvester releases, ensure that you download the latest version: + +``` +# Download the script +$ curl -o /tmp/check.sh https://raw.githubusercontent.com/harvester/upgrade-helpers/refs/heads/main/pre-check/v1.x/check.sh && chmod +x /tmp/check.sh + +# Run the checks +$ /tmp/check.sh +``` + +The **Image Volume Size** check compares the requested size of every PersistentVolumeClaim (PVC) created from an image against that image's virtual size. If undersized volumes are identified, the script displays output similar to the following: + +``` +Starting Image Volume Size check... +Found volumes that are smaller than the virtual size of the VM image they were created from: + default/test-pvc: 5Gi is smaller than the required minimum of 10Gi (source image default/test-image) +Once the guest writes past the end of such a volume, the guest filesystem can be corrupted. +Expand each of the volumes listed above to at least the required minimum size. If the storage class does not support online expansion, shut down the virtual machine using the volume first. +Image-Volume-Size Test: Failed +``` + +This check is strictly read-only and does not modify any resources. Any identified undersized volume causes the check to fail, resulting in a non-zero exit code and a summary alert: + +``` +WARN: There are 1 failing checks: Image-Volume-Size +``` + +#### Remediation + +To resolve this issue before upgrading, perform the following steps for each identified undersized volume: +1. Check if the underlying StorageClass supports online volume expansion. If online expansion is not supported, shut down the virtual machine that is using the volume. +1. Edit the PVC manifest and increase the value of `spec.resources.requests.storage` to at least the required minimum size reported by the script. +1. Re-run `/tmp/check.sh` to confirm that all volume size checks pass. diff --git a/docs/vm/create-vm.md b/docs/vm/create-vm.md index 8ca6b90790..36508d1def 100644 --- a/docs/vm/create-vm.md +++ b/docs/vm/create-vm.md @@ -164,7 +164,7 @@ If you are using external storage, ensure that the correct **StorageClass** and :::info important -When creating volumes from a VM image, ensure that the volume size is greater than or equal to the image size. The volume may become corrupted if the configured volume size is less than the size of the underlying image. This is particularly important for qcow2 images because the virtual size is typically greater than the physical size. +Starting with Harvester v1.10.0, Harvester validates that any volume created or updated from a virtual machine image is at least as large as the virtual size of the source image. The validating webhook rejects virtual machine disk or volume requests that violate this constraint to prevent guest filesystem corruption. By default, Harvester sets the volume size to either 10 GiB or the virtual size of the VM image, whichever is greater. diff --git a/docs/volume/create-volume.md b/docs/volume/create-volume.md index 5832a1ce43..45aa08e19e 100644 --- a/docs/volume/create-volume.md +++ b/docs/volume/create-volume.md @@ -135,7 +135,7 @@ resource "harvester_volume" "empty-volume" { :::info important -When creating volumes from a VM image, ensure that the volume size is greater than or equal to the image size. The volume may become corrupted if the configured volume size is less than the size of the underlying image. This is particularly important for qcow2 images because the virtual size is typically greater than the physical size. +Starting with Harvester v1.10.0, Harvester validates that any volume created or updated from a virtual machine image is at least as large as the virtual size of the source image. The validating webhook rejects PVC creation or update requests that violate this constraint to prevent guest filesystem corruption. By default, Harvester will set the volume size to the virtual size of the image.