Open xriot2 opened 5 months ago
Hello
Please add terraform configuration for cloudavenue_vm resource
Thanks
vm ressource is defined by
// VM
resource "cloudavenue_vm" "res_vm" {
depends_on = [cloudavenue_vapp.vapp]
count = var.vm_config.count
name = "${local.vm_name_prefix}${format("%02d", count.index)}"
description = var.vm_config.description
vapp_name = cloudavenue_vapp.vapp.name
vapp_id = null
deploy_os = {
vapp_template_id = data.cloudavenue_catalog_vapp_template.template.id
}
resource = {
cpu_hot_add_enabled = true
cpus = var.vm_config.cpu
cpus_cores = var.vm_config.cpu_cores
memory = var.vm_config.memory_in_gb * 1024
memory_hot_add_enabled = true
networks = [
{
type = "org"
adapter_type = "VMXNET3"
ip_allocation_mode = "POOL"
connected = true
name = var.vm_config.networknames[0]
is_primary = true
}
]
}
settings = {
affinity_rule_id = null
expose_hardware_virtualization = var.vm_config.expose_hardware_virtualization
guest_properties = {}
os_type = var.vm_config.os_type
storage_profile = var.disk_config.storage_profile
customization = {
admin_password = var.vm_config.admin_password
allow_local_admin_password = var.vm_config.allow_local_admin_password
# comment below if allow_local_admin_password is set
#auto_generate_password = false
change_sid = false
enabled = var.vm_config.enabled_guest_config
force = var.vm_config.reboot
hostname = "${local.vm_name_prefix}${format("%02d", count.index)}"
init_script = local.vm_init_script
join_domain = false
join_domain_account_ou = null
join_domain_name = null
join_domain_password = null
join_domain_user = null
join_org_domain = false
must_change_password_on_first_login = false
number_of_auto_logons = null
}
}
state = {
power_on = true
}
}
with variables
# vm definition
vm_config = {
description = "Antivirus engine"
catalog_name = "Orange-Linux-Internal"
os = "OBSMASTER_UBUNTU_22.04"
os_type = "ubuntu64Guest"
count = 1
expose_hardware_virtualization = true
cpu = 4
cpu_cores = 1
memory_in_gb = 8
networknames = [ "obsitlabiaas" ]
admin_password = "XXXXXXX"
allow_local_admin_password = true
enabled_guest_config = true
# after each vm update, reboot the server
reboot = true
}
Hi, any news about this problem ? best regards
Hi @xriot2,
Please try to create disk with parameters :
disk_config = {
bus_type = "SCSI"
bus_number = 2
unit_number = 0
disk_is_detachable = false
storage_profile = "silver"
disk_size_in_gb = 10
disk_mount_point = "/var/lib/vital"
}
It's the same behaviour with the configuration:
disk_config = {
bus_type = "SCSI"
bus_number = 2
unit_number = 0
disk_is_detachable = false
storage_profile = "silver"
disk_size_in_gb = 10
disk_mount_point = "/var/lib/vital"
}
cloudavenue_vm.res_vm[0]: Creation complete after 3m35s [id=urn:vcloud:vm:eb438227-a417-4584-b3c4-189b2287689b]
cloudavenue_vm_disk.disk[0]: Creating...
cloudavenue_vm_disk.disk[0]: Still creating... [10s elapsed]
cloudavenue_vm_disk.disk[0]: Still creating... [20s elapsed]
cloudavenue_vm_disk.disk[0]: Still creating... [30s elapsed]
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to cloudavenue_vm_disk.disk[0], provider
│ "provider[\"registry.terraform.io/orange-cloudavenue/cloudavenue\"]"
│ produced an unexpected new value: .bus_type: was cty.StringVal("SCSI"), but
│ now cty.StringVal("SATA").
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
Hi, any news about this problem because we are blocked since a long time ? best regards
Hi,
Sorry for the delay in response.
The problem does not seem to come from the terraform provider.
When you define "SCSI" what is the value actually defined on the IHM ?
Regards
into the GUI, it indicates 'SATA' and not 'SCSI'
Terraform Core Version
v1.7.4
Cloud Avenue Provider Version
0.18.4
Affected Resource(s)
CloudAvenue Disk
Expected Behavior
SCSI Disk creation (attached disk)
Actual Behavior
error during the creation:
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
just request a creation of vm with an attached disk with SCSI bus
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None