Skip to content
This repository has been archived by the owner on Jun 3, 2023. It is now read-only.

API Error: PERMISSION_DENIED when tainting VM #36

Open
chafey opened this issue Mar 12, 2018 · 2 comments
Open

API Error: PERMISSION_DENIED when tainting VM #36

chafey opened this issue Mar 12, 2018 · 2 comments

Comments

@chafey
Copy link

chafey commented Mar 12, 2018

Steps:

  1. terraform apply
  2. terraform taint xenserver_vm.xxx-vm
  3. terraform apply

I get the following error:

Error: Error applying plan:

1 error(s) occurred:

* xenserver_vdi.xxx_data_vdi: 1 error(s) occurred:

* xenserver_vdi.xxx_data_vdi: API Error: PERMISSION_DENIED  

here is my TF:

resource "xenserver_vdi" "xxx_data_vdi" {
  sr_uuid = "4758064c-924a-c671-9c26-8321b6c207c8"
  name_label = "xxx-data-vdi"
  size = 20073741824 # 20GB
}

resource "xenserver_vm" "xxx-vm" {
  base_template_name = "Ubuntu 16.04 Template"
  name_label = "xxx-ubuntu-vdi"
  static_mem_min = 8589934592
  static_mem_max = 8589934592
  dynamic_mem_min = 8589934592
  dynamic_mem_max = 8589934592
  vcpus = 1
  boot_order = "c"

 hard_drive {
  vdi_uuid = "${xenserver_vdi.xxx_data_vdi.id}"
  is_from_template = false
  bootable = false
  mode = "RW"
}

 hard_drive {
    is_from_template = true
    user_device = "0"
  } # Template VM HDD

  cdrom {
        is_from_template = true
        user_device = "3"
    }
}
@chafey
Copy link
Author

chafey commented Mar 19, 2018

Any ideas? I would expect the VM to be rebuilt and attached to the existing VDI (where I would store my persistent data)

@ringods
Copy link
Contributor

ringods commented Mar 20, 2018

@chafey sorry, but I haven't had the time so far to look into this. Will probably be coming weekend the earliest.

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

No branches or pull requests

2 participants