Closed ajagnanan closed 6 years ago
@ajagnanan you need to specify dummy VBDs, that correspond to yous template VBD. This was made to fix a bug, when terraform tried to destroy VBD from template because it was not specified in tf-file. Example:
resource "xenserver_vm" "test" {
base_template_name = "CentOS 7.4 Template"
name_label = "test"
static_mem_min = 8589934592
static_mem_max = 8589934592
dynamic_mem_min = 8589934592
dynamic_mem_max = 8589934592
vcpus = 1
boot_order = "c"
hard_drive {
is_from_template = true
user_device = "0"
} # Template VM HDD
cdrom {
is_from_template = true
user_device = "3"
}
network_interface {
network_uuid = "92467b56-21a7-dfdd-b412-978181a69f32"
device = 0
mtu = 1500
mac = ""
other_config {
ethtool-gso = "off"
ethtool-ufo = "off"
ethtool-tso = "off"
ethtool-sg = "off"
ethtool-tx = "off"
ethtool-rx = "off"
}
}
}
Thanks! Awesome that worked, I had to specify the hard_drive and cdrom configs.
I encountered another issue after the update. Creating a xenserver_vm doesn't create a VM now, but a template. I'm not sure if additional options are required now, I attached my log output: