I ran a DSC script to install Hyperv/Failover Cluster and configure a internal switch. It generated a Mof file, i have assigned a GUID and Checksumed the configuration.Mof. When i am trying to update the configuration iam seeing the error which i have attached below. I configured an SMB Pull server where i am saving my configuration.Mof files. I have set the LCM of my physical host to pull the configuration from the SMB pull server. I have xHyper-v and xPSDesiredStateConfiguration modules with NuGet on my Management workstation’s C:\Program Files\WindowsPowerShell\Modules directory
Error Message:
The file \pull-Server\DSCSMB\xHyper-V_3.5.0.0.zip is not found.
+ CategoryInfo : ObjectNotFound: (\pull-Server\D…r-V_3.5.0.0.zip:String) , CimException
+ FullyQualifiedErrorId : DSCFileFileNotFound,Microsoft.PowerShell.DesiredStateConfiguration.DownloadManager.FileGetModuleComman
d
+ PSComputerName : DSC-Hyperv4
Configuration Script I am using:
configuration HyperVbuild
{
param (
[string]$NodeName = 'DSC-Hyperv4'
)
Import-DscResource -ModuleName xHyper-V
node $NodeName {
WindowsFeature 'Hyper-V' {
Ensure='Present'
Name='Hyper-V'
}
WindowsFeature 'Hyper-V-Powershell' {
Ensure='Present'
Name='Hyper-V-Powershell'
}
WindowsFeature FullGUI {
Name = 'Server-Gui-Shell'
Ensure = 'Present'
}
File VMsDirectory
{
Ensure = 'Present'
Type = 'Directory'
DestinationPath = "$($env:SystemDrive)\VMs"
}
xVMSwitch LabSwitch {
DependsOn = '[WindowsFeature]Hyper-V'
Name = 'LabSwitch'
Ensure = 'Present'
Type = 'Internal'
}
WindowsFeature FM {
Name = 'Failover-Clustering'
Ensure = 'Present'
}
WindowsFeature FMMGMT {
Name = 'RSAT-Clustering'
Ensure = 'Present'
DependsOn = '[WindowsFeature]FM'
}
}
}
HyperVBuild -outputpath \\pull-server\dscsmb
My Configuration MOf:
/*
@TargetNode='DSC-Hyperv4'
@GeneratedBy=administrator
@GenerationDate=11/03/2016 11:40:19
@GenerationHost=SR-MGMT01
*/
instance of MSFT_RoleResource as $MSFT_RoleResource1ref
{
ResourceID = "[WindowsFeature]Hyper-V";
Ensure = "Present";
SourceInfo = "::15::12::WindowsFeature";
Name = "Hyper-V";
ModuleName = "PsDesiredStateConfiguration";
ModuleVersion = "1.0";
ConfigurationName = "HyperVbuild";
};
instance of MSFT_RoleResource as $MSFT_RoleResource2ref
{
ResourceID = "[WindowsFeature]Hyper-V-Powershell";
Ensure = "Present";
SourceInfo = "::23::12::WindowsFeature";
Name = "Hyper-V-Powershell";
ModuleName = "PsDesiredStateConfiguration";
ModuleVersion = "1.0";
ConfigurationName = "HyperVbuild";
};
instance of MSFT_RoleResource as $MSFT_RoleResource3ref
{
ResourceID = "[WindowsFeature]FullGUI";
Ensure = "Present";
SourceInfo = "::31::12::WindowsFeature";
Name = "Server-Gui-Shell";
ModuleName = "PsDesiredStateConfiguration";
ModuleVersion = "1.0";
ConfigurationName = "HyperVbuild";
};
instance of MSFT_FileDirectoryConfiguration as $MSFT_FileDirectoryConfiguration1ref
{
ResourceID = "[File]VMsDirectory";
Type = "Directory";
Ensure = "Present";
DestinationPath = "C:\\VMs";
ModuleName = "PSDesiredStateConfiguration";
SourceInfo = "::37::12::File";
ModuleVersion = "1.0";
ConfigurationName = "HyperVbuild";
};
instance of MSFT_xVMSwitch as $MSFT_xVMSwitch1ref
{
ResourceID = "[xVMSwitch]LabSwitch";
Type = "Internal";
Ensure = "Present";
SourceInfo = "::49::12::xVMSwitch";
Name = "LabSwitch";
ModuleName = "xHyper-V";
ModuleVersion = "3.5.0.0";
DependsOn = {
"[WindowsFeature]Hyper-V"};
ConfigurationName = "HyperVbuild";
};
instance of MSFT_RoleResource as $MSFT_RoleResource4ref
{
ResourceID = "[WindowsFeature]FM";
Ensure = "Present";
SourceInfo = "::60::13::WindowsFeature";
Name = "Failover-Clustering";
ModuleName = "PsDesiredStateConfiguration";
ModuleVersion = "1.0";
ConfigurationName = "HyperVbuild";
};
instance of MSFT_RoleResource as $MSFT_RoleResource5ref
{
ResourceID = "[WindowsFeature]FMMGMT";
Ensure = "Present";
SourceInfo = "::65::13::WindowsFeature";
Name = "RSAT-Clustering";
ModuleName = "PsDesiredStateConfiguration";
ModuleVersion = "1.0";
DependsOn = {
"[WindowsFeature]FM"};
ConfigurationName = "HyperVbuild";
};
instance of OMI_ConfigurationDocument
{
Version="2.0.0";
MinimumCompatibleVersion = "1.0.0";
CompatibleVersionAdditionalProperties= {"Omi_BaseResource:ConfigurationName"};
Author="administrator";
GenerationDate="11/03/2016 11:40:19";
GenerationHost="SR-MGMT01";
Name="HyperVbuild";
};