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

[Feature] citrix_machine_catalog for XenServer, full clone option for static desktops #188

Open
RaviSA-Citrix opened this issue Jan 24, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@RaviSA-Citrix
Copy link

RaviSA-Citrix commented Jan 24, 2025

Noticed that [provisioning_scheme.scvmm_machine_config] has [use_full_disk_clone_provisioning], requesting same for [provisioning_scheme.xenserver_machine_config].

When selected 'Use Full Copy' option to create Machine Catalog in Citrix Studio, the Catalog properties show 'VM Copy Mode: Full copy'.

When created via Terraform, the Catalog properties show 'VM Copy Mode: Fast Clone'.

Link to any docs that cover this feature:
https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/install-configure/machine-catalogs-create.html
Alternatively, when creating VMs to deliver static desktops, you can specify (on the Machines page of the catalog creation wizard) thick (full copy) VM clones. Full clones do not require retention of the master image on every data store. Each VM has its own file.

Below is the code:

Get Zone resource by name

data "citrix_zone" "test_zone" {
    name = "Primary"
}

Get Hypervisor resource of any connection type by name

data "citrix_hypervisor" "pool_0" {
    name = "XD_Pool_0"
}

Get Hypervisor Resource Pool of any connection type resource by name and the hypervisor name it belongs to

data "citrix_hypervisor_resource_pool" "resource_pool_0_0" {
name = "Win10Persistent_resource_pool_0_0"
hypervisor_name = data.citrix_hypervisor.pool_0.name
}

Creating the Machine Catalog For Persistent VM

resource "citrix_machine_catalog" "Win10_PersistentVM_MCS_Pool_0" {
name = "Win10_PersistentVM_MCS_Pool1"
description = "Win10 Persistent VM Catalog"
zone = data.citrix_zone.test_zone.id
allocation_type = "Static"
session_support = "SingleSession"
provisioning_type = "MCS"
provisioning_scheme = {
hypervisor = data.citrix_hypervisor.pool_0.id
hypervisor_resource_pool = data.citrix_hypervisor_resource_pool.resource_pool_0_0.id
identity_type = "ActiveDirectory"
machine_domain_identity = {
domain = "temp.tmp"
service_account = var.username
service_account_password = var.password
domain_ou = "OU=Test,DC=temp,DC=tmp"
}
xenserver_machine_config = {
master_image_vm = "Win10BasePersistent_Tv1"
image_snapshot = "Tv1"
cpu_count = 4
memory_mb = 8192
writeback_cache = {
writeback_cache_disk_size_gb = "0"
writeback_cache_memory_size_mb = "0"
}
}
number_of_total_machines = 1
machine_account_creation_rules = {
naming_scheme = "CTXVMPTW###"
naming_scheme_type = "Numeric"
}
}
}

FYI:

When 'writeback_cache = { }' used, prompt comes up asking to enter attributes and is why below has to be added to make it to work:
writeback_cache = {
writeback_cache_disk_size_gb = "0"
writeback_cache_memory_size_mb = "0"
}

Machine Catalog properties, created via Citrix Studio shows 'VM Copy Mode: Full Copy'
Machine Catalog properties, created via above Terraform Code shows 'VM Copy Mode: Fast Clone'

Link to any docs that cover this feature:
https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/install-configure/machine-catalogs-create.html
Alternatively, when creating VMs to deliver static desktops, you can specify (on the Machines page of the catalog creation wizard) thick (full copy) VM clones. Full clones do not require retention of the master image on every data store. Each VM has its own file.

@RaviSA-Citrix RaviSA-Citrix added the enhancement New feature or request label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant