From 3b34afddb8245df486dd24e0a64fb198e1229b45 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..e08e9d56 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-disk` | `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..dfd081e6 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-disk": { + Type: schema.TypeString, + Optional: true, + }, + // Misc "file": { Type: schema.TypeString,