Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caution/info boxes for VM image virtual size #631

Merged
merged 5 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/vm/create-vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ A disk can be made accessible via the following types:

A volume's [StorageClass](../advanced/storageclass.md) can be specified when adding a new empty volume; for other volumes (such as VM images), the `StorageClass` is defined during image creation.

:::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.

By default, Harvester sets the volume size to either 10 GiB or the virtual size of the VM image, whichever is greater.

:::

![create-vm](/img/v1.2/vm/create-vm-volumes.png)

### Adding a container disk
Expand Down
8 changes: 8 additions & 0 deletions docs/volume/create-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ resource "harvester_volume" "empty-volume" {
1. Select an existing `Image`.
1. Configure the `Size` of the 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.

By default, Harvester will set the volume size to the virtual size of the image.

:::

![create-image-volume](/img/v1.2/volume/create-image-volume.png)

</TabItem>
Expand Down
8 changes: 8 additions & 0 deletions versioned_docs/version-v1.2/vm/create-vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ A disk can be made accessible via the following types:

A volume's [StorageClass](../advanced/storageclass.md) can be specified when adding a new empty volume; for other volumes (such as VM images), the `StorageClass` is defined during image creation.

:::caution

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.

Harvester sets the volume size to 10 GiB by default. You must verify if this value is sufficient and then modify it if necessary. To determine the virtual size of a qcow2 image, you can run the command `qemu-img info YOUR_IMAGE_FILE.qcow2`.

:::

![create-vm](/img/v1.2/vm/create-vm-volumes.png)

### Adding a container disk
Expand Down
10 changes: 9 additions & 1 deletion versioned_docs/version-v1.2/volume/create-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,12 @@ description: Create a volume from the Volume page.
1. Select an existing `Image`.
1. Configure the `Size` of the volume.

![create-image-volume](/img/v1.2/volume/create-image-volume.png)
:::caution

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.

To determine the virtual size of a qcow2 image, you can run the command `qemu-img info YOUR_IMAGE_FILE.qcow2`.

:::

![create-image-volume](/img/v1.2/volume/create-image-volume.png)
8 changes: 8 additions & 0 deletions versioned_docs/version-v1.3/vm/create-vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ A disk can be made accessible via the following types:

A volume's [StorageClass](../advanced/storageclass.md) can be specified when adding a new empty volume; for other volumes (such as VM images), the `StorageClass` is defined during image creation.

:::caution

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.

Harvester sets the volume size to 10 GiB by default. You must verify if this value is sufficient and then modify it if necessary. To determine the virtual size of a qcow2 image, you can run the command `qemu-img info YOUR_IMAGE_FILE.qcow2`.

:::

![create-vm](/img/v1.2/vm/create-vm-volumes.png)

### Adding a container disk
Expand Down
8 changes: 8 additions & 0 deletions versioned_docs/version-v1.3/volume/create-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,12 @@ description: Create a volume from the Volume page.
1. Select an existing `Image`.
1. Configure the `Size` of the volume.

:::caution

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.

To determine the virtual size of a qcow2 image, you can run the command `qemu-img info YOUR_IMAGE_FILE.qcow2`.

:::

![create-image-volume](/img/v1.2/volume/create-image-volume.png)