-
Notifications
You must be signed in to change notification settings - Fork 112
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
VDC VM placement policies #898
Comments
Hi, glad this feature is also made available. Will it be possible to list and choose a placement policy as a tenant administrator? I would like to test this feature if possible. |
Hi @cbotha @Piedro1, the request suggested here has been merged to the main branch. It is still not officially released, but you can build the Provider from the source code and try it out. We can help with that if required. Please note that the complete journey for VM Placement Policies is not 100% complete though, we still need to onboard them to the VM resource/data source to be able to use them. What we merged so far enables users to assign VM Placement Policies to VDCs, creating VM Placement Policies and fetching them. |
Hello, Since v3.8.0, released a few days ago, both vcd_vapp_vm and vcd_vm support assigning and reading VM Placement Policies (also they can be assigned to VDCs for that purpose, and created with the new vcd_vm_placement_policy resource) Please have a look at the changelog here for the list with all the new features and improvements on this regard. Thanks for the feature request and best regards. |
Hi
Thanks for the update.
I tried the new provider this morning, but I can’t seem to get it working.
In my case I would like to add an existing placement policy to a new VDC upon creation.
I added the following to my plan:
data "vcd_provider_vdc" "pvdc" {
name = local.tenant.vdc_pvdc_name
}
data "vcd_vm_group" "vmgroup-windows" {
name = "WindowsVMgroup"
provider_vdc_id = data.vcd_provider_vdc.pvdc.id
}
data "vcd_vm_placement_policy" "Existing-policy-1" {
name = "Windows"
provider_vdc_id = data.vcd_provider_vdc.pvdc.id
}
However, it seems like it doesn't like the fact that our PVDC has numerous resource pools backing it
Error: could not find any VM Group with name WindowsVMgroup and pVDC urn:vcloud:providervdc:8cad2615-b37c-4d64-8e1c-2a324be2f8e2: could not get VM Group: more than one Resource Pool found for the pVDC: urn:vcloud:providervdc:8cad2615-b37c-4d64-8e1c-2a324be2f8e2
|
Thanks for the feedback, @cbotha, really appreciated. |
@adambarreiro On another note but still placement policy related. I've also been trying to add placement policies to VMs and vAPPS as a tenant. However I noticed that I required a PVDC data point which I can only obtain as a System admin. Is there a way to make use of "placement_policy_id" as an org admin (tenant perspective)? |
Regarding PR#948. Would love to try it out indeed. Do you guide handy of how to make use of this branch? |
@cbotha , |
@Didainius No complier unfortunately. I'm using an intel based Mac |
Ok. I have built the plugin with code of PR #948 for you and put it into one drive. It should be placed in the path as per my below example path (replace _YOUR_USERNAME_ with your name). Name of the file must be kept as it is. Doing a $ tree ~/.terraform.d
/Users/_YOUR_USERNAME_/.terraform.d
├── checkpoint_cache
├── checkpoint_signature
└── plugins
└── registry.terraform.io
└── vmware
└── vcd
└── 3.8.1
└── darwin_amd64
└── terraform-provider-vcd_v3.8.1 |
#898 (comment). I'm also interested in testing below. |
@cbotha , |
@Didainius and @adambarreiro Thanks! this indeed also solved this issue. Any idea when these changes will be available in the official provider? Will there be a version bump to 3.8.1? |
Yep. We will release 3.8.1 with these fixes. We still have to do some more testing, but it should be out in 1-2 weeks. |
@cbotha , v3.8.1 is now released |
Community Note
Description
New or Affected Resource(s)
Desperately need the capability to add pre-created VM placement policies to VDCs.
UI flow = Resources > Organisation VDCs > Select VDC Name > Policies > VM Placement > ADD policy
The text was updated successfully, but these errors were encountered: