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

memory_reservation option or even extra_config option "sched.mem.pin" not working #2338

Open
4 tasks done
Conkernel opened this issue Feb 5, 2025 · 1 comment
Open
4 tasks done
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage

Comments

@Conkernel
Copy link

Community Guidelines

  • I have read and agree to the HashiCorp Community Guidelines .
  • 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?

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

Image

Actual Behavior

Image

Steps to Reproduce

terraform apply -auto-approve

Environment Details

No response

Screenshots

No response

References

No response

@Conkernel Conkernel added bug Type: Bug needs-triage Status: Issue Needs Triage labels Feb 5, 2025
Copy link

github-actions bot commented Feb 5, 2025

Hello, Conkernel! 🖐

Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.

If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage
Projects
None yet
Development

No branches or pull requests

1 participant