Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live Migration error: retrieving VM 100: the requested resource does not exist #1411

Open
willifehler opened this issue Jun 25, 2024 · 3 comments
Labels
🐛 bug Something isn't working

Comments

@willifehler
Copy link

Hey there,

if I manually migrate a VM to a different Proxmox host within my Cluster I do receive an error if I run OpenTofu again.

╷
│ Error: error retrieving VM 100: the requested resource does not exist
│
│   with proxmox_virtual_environment_vm.vm["testserver01"],
│   on proxmox_vm.tf line 5, in resource "proxmox_virtual_environment_vm" "vm":
│    5: resource "proxmox_virtual_environment_vm" "vm" {
│
╵

The Live Migration to the previous host seems to be completed fine and afterwards OpenTofu is showing no errors.

Is this error expected?

Cheers - Willi

@willifehler willifehler added the 🐛 bug Something isn't working label Jun 25, 2024
@willifehler willifehler changed the title Live Migration erorr Live Migration error: retrieving VM 100: the requested resource does not exist Jun 25, 2024
@bpg
Copy link
Owner

bpg commented Jun 25, 2024

Hey @willifehler 👋🏼

Could you post your tofu output after the first and then second run?

@willifehler
Copy link
Author

willifehler commented Jun 25, 2024

Sure @bpg. Thank you so much for your support. I will cut the output of OpenTofu, there are also Ansible resource changes which I skip here.

tofu plan

114   # proxmox_virtual_environment_vm.vm["testserver"] will be updated in-place
115   ~ resource "proxmox_virtual_environment_vm" "vm" {
116         id                      = "100"
117         name                    = "testserver"
118       ~ node_name               = "pve2" -> "pve3"
119         tags                    = [
120             "opentofu",
121             "test",
122         ]
123         # (26 unchanged attributes hidden)
124
125         # (7 unchanged blocks hidden)
126     }
127
128 Plan: 2 to add, 1 to change, 0 to destroy.

tofu apply

228   # proxmox_virtual_environment_vm.vm["testserver"] will be updated in-place
229   ~ resource "proxmox_virtual_environment_vm" "vm" {
230         id                      = "100"
231         name                    = "testserver"
232       ~ node_name               = "pve2" -> "pve3"
233         tags                    = [
234             "opentofu",
235             "test",
236         ]
237         # (26 unchanged attributes hidden)
238
239         # (7 unchanged blocks hidden)
240     }
241
242 Plan: 2 to add, 1 to change, 0 to destroy.
243 proxmox_virtual_environment_vm.vm["testserver"]: Modifying... [id=100]
244 ╷
245 │ Error: error retrieving VM 100: the requested resource does not exist
246 │
247 │   with proxmox_virtual_environment_vm.vm["testserver"],
248 │   on proxmox_vm.tf line 5, in resource "proxmox_virtual_environment_vm" "vm":
249 │    5: resource "proxmox_virtual_environment_vm" "vm" {
250 │
251 ╵

After the migration is finished tofu plan isn't showing anything which is related to the VM. (100)

@bpg
Copy link
Owner

bpg commented Jun 28, 2024

Hey @willifehler, it looks like you didn't use the migrate attribute. Could you please try that and report back?

I've also done some tests for VM migration in another ticket, and it worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants