You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
Do not leave "+1" or other comments that do not add relevant information or questions.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Terraform
v1.10.5
Terraform Provider
v2.11.1
VMware vSphere
8.0 Update 2
Description
Hi,
I'm trying to deploy a virtual machine using this provider, and configure it so that it reserves all the ram memory. This is my main.tf:
As you can see, I have used both memory_reservation = 8192 and/ "sched.mem.pin" = "TRUE" in the extra_config, but I'm not being able to get it working.
Is there anything I am missing, or doing wrong?
Community Guidelines
Terraform
v1.10.5
Terraform Provider
v2.11.1
VMware vSphere
8.0 Update 2
Description
Hi,
I'm trying to deploy a virtual machine using this provider, and configure it so that it reserves all the ram memory. This is my main.tf:
As you can see, I have used both memory_reservation = 8192 and/ "sched.mem.pin" = "TRUE" in the extra_config, but I'm not being able to get it working.
Is there anything I am missing, or doing wrong?
Thanks a lot for your great work
Regards
Affected Resources or Data Sources
resource "vsphere_virtual_machine" "vm"
Terraform Configuration
terraform {
required_providers {
vsphere = {
source = "hashicorp/vsphere"
version = "~> 2.11.1"
}
}
}
provider "vsphere" {
user = "root"
password = "mypasswd"
vsphere_server = "10.0.0.2"
api_timeout = 10
allow_unverified_ssl = true
}
resource "vsphere_virtual_machine" "vm" {
name = "TestVM34"
resource_pool_id = "ha-root-pool"
datastore_id = "678be714-a5c20f62-b816-0cc47a043052"
num_cpus = 2
num_cores_per_socket = 2
cpu_hot_add_enabled = "true"
cpu_hot_remove_enabled = "true"
efi_secure_boot_enabled = "false"
memory = 8192
memory_reservation = 8192
memory_hot_add_enabled = "true"
guest_id = "ubuntu64Guest"
enable_logging = "true"
firmware = "efi"
boot_retry_enabled = "true"
tools_upgrade_policy = "manual"
network_interface {
network_id = "HaNetwork-WAN"
adapter_type = "vmxnet3"
}
cdrom {
client_device = false
datastore_id = "67869679-39cc791c-c943-0cc47a043052"
path = "ISOS/ubuntu-24.04.1-live-server-amd64.iso"
}
disk {
label = "disk0"
size = 20
eagerly_scrub = false
thin_provisioned = false
controller_type = "scsi"
keep_on_remove = "true"
write_through = "false"
}
scsi_type = "pvscsi"
scsi_controller_count = "1"
nested_hv_enabled = "true"
sync_time_with_host = "false"
run_tools_scripts_after_power_on = "true"
run_tools_scripts_after_resume = "true"
run_tools_scripts_before_guest_shutdown = "true"
run_tools_scripts_before_guest_standby = "true"
tags = []
custom_attributes = {}
extra_config = {
"vcpu.hotadd" = "TRUE"
"mem.hotadd" = "TRUE"
"vmci0.present" = "TRUE"
"chipset.motherboardLayout" = "acpi"
"scsi0:0.ctkEnabled" = "TRUE"
"ctkEnabled" = "TRUE"
"hpet0.present" = "TRUE"
"sched.mem.min" = "8192"
"softPowerOff" = "FALSE"
"sched.mem.pin" = "TRUE"
}
}
Debug Output
none
Panic Output
none
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform apply -auto-approve
Environment Details
No response
Screenshots
No response
References
No response
The text was updated successfully, but these errors were encountered: