Creating a VM from a large qcow2 image taking too long and then failing #737
Replies: 2 comments
-
Hi @dandaolrian, That's a good investigation! Anyway, I'll be happy to accept a PR for the change you're proposing, seems totally reasonable to me. Speaking about the |
Beta Was this translation helpful? Give feedback.
-
PR with the proposed fix |
Beta Was this translation helpful? Give feedback.
-
Hi,
We have a use case where we’re deploying a windows qcow2 image of around 20Gb and were running into problems deploying to one of our nodes (others were OK)
When we took a closer look at what the provisioner we saw it was running the following commands:
terraform-provider-proxmox/proxmoxtf/resource/vm.go
Lines 2790 to 2796 in a96a3a9
So if we understand correctly, we copy the image, resize that import it and then throw the resized file away.
On the Proxmox node we saw multiple qemu-img convert processes and these take a long time when importdisk is running as we do that on the resized (larger) image
We thought logically it would make more sense to import the image as is (i.e smaller) and then resize. So like this
With this we no longer have such long times for deployment and were down from 55mins and failing to 10mins and working 😊
We would start a pull request but weren’t sure if maybe it had been done as above for a reason and wanted to understand that before doing so
This seems to similar if not the same as #675
Incidentally when it failed we got the same error as in #675
Post "https://dehx-pa-001:8006/api2/json/nodes/proxmox/qemu/437/status/start": context deadline exceeded
And we never managed to track down why the start would fail. We could start manually but it failed everytime here after taking 55+ mins to create the VM
Would be interested to hear your thoughts
Beta Was this translation helpful? Give feedback.
All reactions