Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug] "citrix_scvmm_hypervisor_resource_pool" Unable to Resolve Hosts or Host Groups #162

Open
cedfont opened this issue Dec 11, 2024 · 3 comments
Labels
bug Something isn't working 🔧

Comments

@cedfont
Copy link

cedfont commented Dec 11, 2024

Hi,

When attempting to create a citrix_scvmm_hypervisor_resource_pool resource with the Citrix Terraform Provider, the process fails because the specified host or host group cannot be resolved. It seems that the host parameter does not correctly interpret the values provided, even though they match the SCVMM configuration.
Steps to Reproduce:

Terraform configuration:

resource "citrix_scvmm_hypervisor_resource_pool" "main" {
  name       = "VLAN123"
  hypervisor = citrix_scvmm_hypervisor.main.id
  host       = "HOSTGROUP\\mgtphyp07.company.com" # Example value, several formats tested
  networks   = ["VLAN123"]

  storage = [
    {
      storage_name = "Local storage on mgtphyp07.company.com"
      superseded   = false
    }
  ]

  temporary_storage = [
    {
      storage_name = "Local storage on mgtphyp07.company.com"
      superseded   = false
    }
  ]

  use_local_storage_caching = false
}

Tested multiple variants of the host parameter, including:

Hostname only: mgtphyp07
Host FQDN: mgtphyp07.company.com
Host group and host: HOSTGROUP\\mgtphyp07
SCVMM path: All Hosts\\HOSTGROUP\\mgtphyp07.company.com
DaaS internal path: HOSTGROUP.hostgroup/mgtphyp07.host

Error message:

    Error: Error creating Hypervisor Resource Pool for SCVMM

    TransactionId: <ID>
    Failed to resolve resource HOSTGROUP\mgtphyp07, error: could not find resource

Additional Information:

Creating the connection and resource pool manually in Citrix DaaS works without issue.

The DaaS PowerShell and API logs show that hosts are internally referenced using paths like HOSTGROUP.hostgroup/mgtphyp07.host. However, this format is not accepted by the Terraform Provider.

The host is confirmed to exist in SCVMM and works in other configurations.

PowerShell commands confirm correct host, host group, and network names:

Get-SCVMHost | Select Name, ID
Get-SCVMHostGroup | Select Name
Get-SCVMNetwork | Select Name

Example output:

Host: mgtphyp07.company.com
Host group: HOSTGROUP
Network: VLAN123

API log of a successful manual creation in DaaS:

{
  "ConnectionType": "SCVMM",
  "Name": "VMs_APC-VLAN3531",
  "RootPath": "HOSTGROUP.hostgroup/mgtphyp07.host",
  "Networks": ["HOSTGROUP.hostgroup/mgtphyp07.host/VLAN123.network"],
  "UseLocalStorageCaching": false,
  "Storage": ["XDHyp:\\Connections\\HYPERVISOR123\\HOSTGROUP.hostgroup\\mgtphyp07.host\\Local storage on mgtphyp07.company.com.storage"],
  "TemporaryStorage": ["XDHyp:\\Connections\\HYPERVISOR123\\HOSTGROUP.hostgroup\\mgtphyp07.host\\Local storage on mgtphyp07.company.com.storage"]
}

Environment:

Terraform Version: 1.0.8

CitrixIssueId: 59626

@cedfont cedfont added the bug Something isn't working label Dec 11, 2024
@dimi4ik
Copy link

dimi4ik commented Dec 13, 2024

@xinghengl-citrix @AlanCitrix
Could you please check and let us know if we need any logs etc information?
Please note that we are using Hyper-V Local Storage

@AlanCitrix
Copy link
Collaborator

Yes will let you know. You have provided a lot of details in the bug, we will look into this.

@zhuolun-citrix
Copy link
Collaborator

Hi @dimi4ik ,

We have identified the cause of the issue. Currently our provider doesn't have the capability to handle host within a host group. We will add a new field in citrix_scvmm_hypervisor_resource_pool for specifying host_group.

Thank you for reporting this issue.

Zhuolun

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working 🔧
Projects
None yet
Development

No branches or pull requests

5 participants