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

Disk size does not expand #328

Open
Dmitry-Dymnov opened this issue May 15, 2024 · 2 comments
Open

Disk size does not expand #328

Dmitry-Dymnov opened this issue May 15, 2024 · 2 comments

Comments

@Dmitry-Dymnov
Copy link

Dmitry-Dymnov commented May 15, 2024

The disk size does not change via terraform. If VM is running, terraform says OK. But the disk size does not change.

Terraform will perform the following actions:

  # xenorchestra_vm.vm_projects["test-vm"] will be updated in-place
  ~ resource "xenorchestra_vm" "vm_projects" {
        id                                  = "6689dd5c-9258-e516-1d45-239f0d5244bb"
        tags                                = [
            "test",
            "ubuntu",
        ]
        # (25 unchanged attributes hidden)

      ~ disk {
          ~ size             = 21474836480 -> 32212254720
            # (7 unchanged attributes hidden)
        }

        # (3 unchanged blocks hidden)
    }

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

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

xenorchestra_vm.vm_projects["test-vm"]: Modifying... [id=6689dd5c-9258-e516-1d45-239f0d5244bb]
xenorchestra_vm.vm_projects["test-vm"]: Still modifying... [id=6689dd5c-9258-e516-1d45-239f0d5244bb, 10s elapsed]
xenorchestra_vm.vm_projects["test-vm"]: Still modifying... [id=6689dd5c-9258-e516-1d45-239f0d5244bb, 20s elapsed]
xenorchestra_vm.vm_projects["test-vm"]: Modifications complete after 26s [id=6689dd5c-9258-e516-1d45-239f0d5244bb]

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

If VM is turned off, we get an error.

xenorchestra_vm.vm_projects["test-vm"]: Modifying... [id=6689dd5c-9258-e516-1d45-239f0d5244bb]
Error: jsonrpc2: code 13 message: VM state is halted but should be running: {"objectId":"6689dd5c-9258-e516-1d45-239f0d5244bb","expected":"running","actual":"halted"} with xenorchestra_vm.vm_projects["test-vm"], on vm-projects.tf line 13, in resource "xenorchestra_vm" "vm_projects": 13: resource "xenorchestra_vm" "vm_projects"

Terraform v1.8.2
on darwin_amd64

  • provider registry.terraform.io/hashicorp/local v2.5.1
  • provider registry.terraform.io/vatesfr/xenorchestra v0.29.0

Proposed changes:

  • allow changing the configuration of a shutdown virtual machine
@ddelnano
Copy link
Collaborator

This is a duplicate of #178. The error you received from attempting this with the VM halted might be a bug in the recent power_state management (#278).

Can you please provide the logs with the TF_LOG=debug environment variable set during the upgrade when a VM is running?

When you say disk size is not updated, are you talking about from within the VM or from within the XO console? The latter is expected to be updated based on the reports on #178. What happens inside the VM is dependent on what is installed within the VM, the distro used, etc.

@Dmitry-Dymnov
Copy link
Author

Dmitry-Dymnov commented May 20, 2024

I meant that when changing the disk size via terraform, nothing happens at all.
terraform.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants