From 590a3618c59194e36bd503e26ae90fceed3daf6f Mon Sep 17 00:00:00 2001 From: James Harr Date: Tue, 30 Aug 2022 16:10:46 -0500 Subject: [PATCH] feat: Add 'import_disk' parameter to qemu --- docs/resources/vm_qemu.md | 1 + proxmox/resource_vm_qemu.go | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/docs/resources/vm_qemu.md b/docs/resources/vm_qemu.md index 2bb11d3b..9a497125 100644 --- a/docs/resources/vm_qemu.md +++ b/docs/resources/vm_qemu.md @@ -270,6 +270,7 @@ See the [docs about disks](https://pve.proxmox.com/pve-docs/chapter-qm.html#qm_h | `mbps_rd_max` | `int` | `0` | Maximum read speed in megabytes per second. `0` means unlimited. | | `mbps_wr` | `int` | `0` | Maximum write speed in megabytes per second. `0` means unlimited. | | `mbps_wr_max` | `int` | `0` | Maximum throttled write pool in megabytes per second. `0` means unlimited. | +| `import_from` | `str` | | Import disk image. Value is a path local to the node, for example `/disk/image.img`. | | `file` | `str` | | The filename portion of the path to the drive’s backing volume. You shouldn't need to specify this, use the `storage` parameter instead. | | `media` | `str` | `"disk"` | The drive’s media type. Options: `cdrom`, `disk`. | | `volume` | `str` | | The full path to the drive’s backing volume including the storage pool name. You shouldn't need to specify this, use the `storage` parameter instead. | diff --git a/proxmox/resource_vm_qemu.go b/proxmox/resource_vm_qemu.go index fcfc3cab..6f075d17 100755 --- a/proxmox/resource_vm_qemu.go +++ b/proxmox/resource_vm_qemu.go @@ -462,6 +462,13 @@ func resourceVmQemu() *schema.Resource { Optional: true, Default: 0, }, + + // Import disk + "import_from": { + Type: schema.TypeString, + Optional: true, + }, + // Misc "file": { Type: schema.TypeString,