mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-04 12:32:59 +00:00
chore(docs)!: clarify disk behaviour in clone operation (#1850)
This is a "meta" PR to bump the minor version due potentially breaking changes from #1840. See documentation for more details. > When cloning an existing virtual machine, whether it's a template or not, the > resource will inherit the disks and other configuration from the source VM. > > *If* you modify any attributes of an existing disk in the clone, you also need to > explicitly provide values for any other attributes that differ from the schema defaults > in the source (e.g., `size`, `discard`, `cache`, `aio`). > Otherwise, the schema defaults will take effect and override the source values. Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
09d3e97d02
commit
75281b2652
@ -636,8 +636,12 @@ If you do not have `local-lvm` configured in your environment, you may need to e
|
|||||||
### Cloning
|
### Cloning
|
||||||
|
|
||||||
When cloning an existing virtual machine, whether it's a template or not, the
|
When cloning an existing virtual machine, whether it's a template or not, the
|
||||||
resource will only detect changes to the arguments which are not set to their
|
resource will inherit the disks and other configuration from the source VM.
|
||||||
default values.
|
|
||||||
|
*If* you modify any attributes of an existing disk in the clone, you also need to
|
||||||
|
explicitly provide values for any other attributes that differ from the schema defaults
|
||||||
|
in the source (e.g., `size`, `discard`, `cache`, `aio`).
|
||||||
|
Otherwise, the schema defaults will take effect and override the source values.
|
||||||
|
|
||||||
Furthermore, when cloning from one node to a different one, the behavior changes
|
Furthermore, when cloning from one node to a different one, the behavior changes
|
||||||
depening on the datastores of the source VM. If at least one non-shared
|
depening on the datastores of the source VM. If at least one non-shared
|
||||||
@ -645,7 +649,7 @@ datastore is used, the VM is first cloned to the source node before being
|
|||||||
migrated to the target node. This circumvents a limitation in the Proxmox clone
|
migrated to the target node. This circumvents a limitation in the Proxmox clone
|
||||||
API.
|
API.
|
||||||
|
|
||||||
**Note:** Because the migration step after the clone tries to preserve the used
|
Because the migration step after the clone tries to preserve the used
|
||||||
datastores by their name, it may fail if a datastore used in the source VM is
|
datastores by their name, it may fail if a datastore used in the source VM is
|
||||||
not available on the target node (e.g. `local-lvm` is used on the source node in
|
not available on the target node (e.g. `local-lvm` is used on the source node in
|
||||||
the VM but no `local-lvm` datastore is available on the target node). In this
|
the VM but no `local-lvm` datastore is available on the target node). In this
|
||||||
|
@ -372,7 +372,6 @@ func (d *CustomStorageDevice) UnmarshalJSON(b []byte) error {
|
|||||||
// - FileID
|
// - FileID
|
||||||
// - FileVolume
|
// - FileVolume
|
||||||
// - Format
|
// - Format
|
||||||
// - Size
|
|
||||||
//
|
//
|
||||||
// It will return true if any attribute of the current CustomStorageDevice was changed.
|
// It will return true if any attribute of the current CustomStorageDevice was changed.
|
||||||
func (d *CustomStorageDevice) MergeWith(m CustomStorageDevice) bool {
|
func (d *CustomStorageDevice) MergeWith(m CustomStorageDevice) bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user