Jun 23 2020 04:55 PM
I had several issues with DSC Configuration failures , conflicts, client cannot connect to the destination specified etc. Was occurring with the Microsoft catalog and my own images. The last bit was after my firewall guys were certain it was not them.
"VM has reported a failure when processing extension 'dscextension'. Error message: \\\"DSC Configuration 'AddSessionHost' completed with error(s). Following are the first few: The client cannot connect to the destination specified in the request."
This is the workaround for me. Waiting on Microsoft support to weigh in see if it a bug etc. Test this in your lower environments! :)
$disk = Get-AzDisk -ResourceGroupName 'your-rg' -DiskName 'your-disk'
$location = 'South Central US'
$imageName = 'golden-image-name-ipv6-disabled'
$rgName = 'your-rg'
$imageConfig = New-AzImageConfig `
-Location $location
$imageConfig = Set-AzImageOsDisk `
-Image $imageConfig `
-OsState Generalized `
-OsType Windows `
-ManagedDiskId $disk.Id
$image = New-AzImage `
-ImageName $imageName `
-ResourceGroupName $rgName `
-Image $imageConfig