It's my planning, but I haven't completed my trials yet
Thanks LucD , will look forward to your take on DSC and anyone out there who has used it.
I'm trying to use VMWare PowerCLI commandlets in DSC. But I don't get it working.
I always get the following error:
The PowerShell provider sc_vcenter_cluster threw one or more non-terminating errors while running the
Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational.
Refer to this channel for more details.
+ CategoryInfo : InvalidOperation: (:) , CimException
+ FullyQualifiedErrorId : NonTerminatingErrorFromProvider
+ PSComputerName : localhost
Also when I try with a simple command "get-VM" I don't get any data.
Does anyone had success trying DSC with VMWare.
Do you have some more info on the setup you are using.
Did you you try to write/use a Script Resource to handle the vSphere ?
Are you using a push or a pull model ?
Our plan is to manage vCenter/ESX/VM configurations with Powershell DSC.
So I've written an own DSC Module for creating clusters (Test/Set/get-TargetResource)
When I'm creating then a DSC Configuration manually and applying it with:
Start-DscConfiguration <folder> -Wait -Verbose, it's connecting to the vCenter but for every command connecting to the vCenter I don't receive any Data:
Example: $clusters = get-cluster
Did you had the same problem?
Are you able to share the resources you have written here? I would love to see them.
1 person found this helpful
This is something I'm planning on looking at as well. I haven't started the DSC modules yet, but I hope to start working on that in the next few weeks. Below I've written about how a DSC configuration might potentially look like to provision a VM.
I know this is rather old, but has anybody been able to do this?
I am just about to start working on this and rather not reinvent the wheel. Thought about using a PowerShell workflow to build the VM and as part of that create the DSC MOF file which will be remotely applied to the VM. Only thing that's currently worrying me is the remote access to that VM (also, that VM not yet being ready yet after deployment and customisation).
Sounds interesting. I'm interested in seeing what you've developed.
You're probably already miles ahead of me
I have a working example for creating the VM with DSC here:
This will deploy a VM from a template that has a small DSC bootstrap script that will get executed as part of the OS customization. That bootstrap script will configure the LCM in the guest OS to talk to the pull server and grab the DSC configuration for the guest.
Right now, you have to create two DSC configurations. One for the VM definition which is applied to a provisioning server with PowerCLI installed, and one for the guest OS. I'd like to come up with a way define the state of the VM in a single place (VM and OS config) but at the end of the day, two MOF files would still be generated (VM definition and guest OS).