[GH-ISSUE #115] Live migrating a VM via this API causes the VM to be stopped then started #21

Open
opened 2026-02-28 00:40:13 +03:00 by kerem · 0 comments
Owner

Originally created by @pgporada on GitHub (Apr 22, 2021).
Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/115

Hi,

I just started using the latest proxmox ve, terraform-provider-proxmox, and this API as a result. In the proxmox web ui I am able to live migrate a VM from one host to another seamlessly. I don't believe this to be an issue with the terraform-provider-go because I didn't detect a specific shutdown message in the terraform debug output leading me to post here.

The proxmox web ui shows the following log:

()
2021-04-22 01:02:09 starting migration of VM 101 to node 'pve3' (10.1.0.203)
2021-04-22 01:02:10 starting VM 101 on remote node 'pve3'
2021-04-22 01:02:11 start remote tunnel
2021-04-22 01:02:12 ssh tunnel ver 1
2021-04-22 01:02:12 starting online/live migration on unix:/run/qemu-server/101.migrate
2021-04-22 01:02:12 set migration_caps
2021-04-22 01:02:12 migration speed limit: 8589934592 B/s
2021-04-22 01:02:12 migration downtime limit: 100 ms
2021-04-22 01:02:12 migration cachesize: 67108864 B
2021-04-22 01:02:12 set migration parameters
2021-04-22 01:02:12 start migrate command to unix:/run/qemu-server/101.migrate
2021-04-22 01:02:13 migration status: active (transferred 294227312, remaining 155041792), total 554508288)
2021-04-22 01:02:13 migration xbzrle cachesize: 67108864 transferred 0 pages 0 cachemiss 0 overflow 0
2021-04-22 01:02:14 migration speed: 256.00 MB/s - downtime 57 ms
2021-04-22 01:02:14 migration status: completed
2021-04-22 01:02:17 migration finished successfully (duration 00:00:08)
TASK OK

proxmox-live-migrate-web-ui

When I have terraform-provider-go perform that same function this text (which I expected to see) appears. However...

$ terraform apply
proxmox_vm_qemu.le-clone[0]: Refreshing state... [id=pve1/qemu/101]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # proxmox_vm_qemu.le-clone[0] will be updated in-place
  ~ resource "proxmox_vm_qemu" "le-clone" {
        id                     = "pve1/qemu/101"
        name                   = "le-clone-0"
      ~ target_node            = "pve1" -> "pve2"
        # (32 unchanged attributes hidden)


        # (2 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

proxmox-api-migrate

Attached is a terraform-provider-go trace log from my vagrant cluster that shows all the HTTP POST/GETs. I can see that the migration is correctly being called with online=1.
api.log

Thank you!

Originally created by @pgporada on GitHub (Apr 22, 2021). Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/115 Hi, I just started using the latest proxmox ve, terraform-provider-proxmox, and this API as a result. In the proxmox web ui I am able to live migrate a VM from one host to another seamlessly. I don't believe this to be an issue with the terraform-provider-go because I didn't detect a specific shutdown message in the terraform debug output leading me to post here. The proxmox web ui shows the following log: ``` () 2021-04-22 01:02:09 starting migration of VM 101 to node 'pve3' (10.1.0.203) 2021-04-22 01:02:10 starting VM 101 on remote node 'pve3' 2021-04-22 01:02:11 start remote tunnel 2021-04-22 01:02:12 ssh tunnel ver 1 2021-04-22 01:02:12 starting online/live migration on unix:/run/qemu-server/101.migrate 2021-04-22 01:02:12 set migration_caps 2021-04-22 01:02:12 migration speed limit: 8589934592 B/s 2021-04-22 01:02:12 migration downtime limit: 100 ms 2021-04-22 01:02:12 migration cachesize: 67108864 B 2021-04-22 01:02:12 set migration parameters 2021-04-22 01:02:12 start migrate command to unix:/run/qemu-server/101.migrate 2021-04-22 01:02:13 migration status: active (transferred 294227312, remaining 155041792), total 554508288) 2021-04-22 01:02:13 migration xbzrle cachesize: 67108864 transferred 0 pages 0 cachemiss 0 overflow 0 2021-04-22 01:02:14 migration speed: 256.00 MB/s - downtime 57 ms 2021-04-22 01:02:14 migration status: completed 2021-04-22 01:02:17 migration finished successfully (duration 00:00:08) TASK OK ``` ![proxmox-live-migrate-web-ui](https://user-images.githubusercontent.com/2382565/115636764-a33b2800-a2dc-11eb-9970-83fed61ad190.png) When I have terraform-provider-go perform that same function this text (which I expected to see) appears. However... ``` $ terraform apply proxmox_vm_qemu.le-clone[0]: Refreshing state... [id=pve1/qemu/101] An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # proxmox_vm_qemu.le-clone[0] will be updated in-place ~ resource "proxmox_vm_qemu" "le-clone" { id = "pve1/qemu/101" name = "le-clone-0" ~ target_node = "pve1" -> "pve2" # (32 unchanged attributes hidden) # (2 unchanged blocks hidden) } Plan: 0 to add, 1 to change, 0 to destroy. ``` ![proxmox-api-migrate](https://user-images.githubusercontent.com/2382565/115636938-0f1d9080-a2dd-11eb-9481-956809519998.png) Attached is a terraform-provider-go trace log from my vagrant cluster that shows all the HTTP POST/GETs. I can see that the migration is correctly being called with `online=1`. [api.log](https://github.com/Telmate/proxmox-api-go/files/6354565/api.log) Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmox-api-go#21
No description provided.