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

migration fails from 2.9.14 -> 8.0.3 / invalid bootorder: device 'scsi0' does not exist' #1184

Open
rasanentimo opened this issue Nov 27, 2024 · 4 comments
Labels
issue/not-a-bug The reported issue is the intended behavior or the problem is not inside this project resource/qemu Issue or PR related to Qemu resource type/question Issue needs no code to be fixed, only a description on how to fix it yourself

Comments

@rasanentimo
Copy link

We have been using this provider version 2.9.14 with proxmox 8.0.3 and we are testing the migration to version 3.0.1-rc6 with Proxmox 8.2.2.

We tried out following configuration which was working with with 2.9.14 / 8.0.3 (the only addition was the network id 0)

{
    "terraform": {
        "required_version": "1.7.5",
        "required_providers": {
            "proxmox": {
                "source": "Telmate/proxmox",
                "version": "3.0.1-rc6"
            }
        }
    },
    "resource": {
        "proxmox_vm_qemu": {
            "test-vm": {
                "provider": "proxmox.ch33",
                "name": "test-vm",
                "desc": "test-vm",
                "vmid": 3141,
                "target_node": "ch33",
                "full_clone": true,
                "clone": "ubuntu-2204-template",
                "boot": "order=scsi0;ide0",
                "scsihw": "virtio-scsi-single",
                "network": {
                    "id": 0,
                    "model": "virtio",
                    "bridge": "vmbr0",
                    "firewall": false,
                    "link_down": false
                },
                "cores": 4,
                "sockets": 1,
                "memory": 16384,
                "ssh_user": "root",
                "sshkeys": "ssh-rsa ",
                "os_type": "cloud-init",
                "ipconfig0": "ip=10.10.10.10/24,gw=10.10.10.1",
                "lifecycle": {
                    "ignore_changes": [
                        "qemu_os",
                        "ciuser",
                        "disk"
                    ]
                }
            }
        }
    }
}

and we are getting error

Error: error updating VM: 500 invalid bootorder: device 'scsi0' does not exist', error status: {"data":null}

If the vm is cloned via the GUI, it works fine.

Any ideas on how to troubleshoot this?

I tried to search for documentation for the migration path from 2.9.14 to 3.0.x but I couldn't find any.

@Tinyblargon
Copy link
Collaborator

@rasanentimo there is no disk configured, so it's likely trying to remove the disk, then scsi0 does not exist anymore.

@rasanentimo
Copy link
Author

Thanks for the quick reply! So does it mean that the disk has to be created separately even if it's defined in the template (as it is in our case)?

@Tinyblargon
Copy link
Collaborator

Correct. This was done because there were many edge cases, whether the user intended for a disk to be there or for it to be removed.

@Tinyblargon
Copy link
Collaborator

@rasanentimo if you define the same disk in Terraform as in the template it will realize after migration that the disk is already there and will keep it.

The 2 important settings are the disks slot and capacity.

@Tinyblargon Tinyblargon added type/question Issue needs no code to be fixed, only a description on how to fix it yourself issue/not-a-bug The reported issue is the intended behavior or the problem is not inside this project resource/qemu Issue or PR related to Qemu resource labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/not-a-bug The reported issue is the intended behavior or the problem is not inside this project resource/qemu Issue or PR related to Qemu resource type/question Issue needs no code to be fixed, only a description on how to fix it yourself
Projects
None yet
Development

No branches or pull requests

2 participants