none
New-AzureVM errors when provisioning a domain joined VM - Missing type map configuration or unsupported mapping

    Question

  • got a devilish error that is resisting my efforts to conqueror.  I'm trying to provision a domain joined vm.  My script looks like this

    $image = 'fb83b3509582419d99629ce476bcb5c8__SQL-Server-2012SP1-CU5-11.0.3373.0-Enterprise-ENU-Win2012'
    $service = 'mpsitcss'
    $vnet = 'MyNetwork'
    $pwd = 'P@ssw*rd'
    $size = 'Large'
    $username = 'Scott'
    $domain = 'mpsitcss.local'
    $fqndomain = 'mpsitcss.local'
    $vmname = 'MySQL01'

    $MyVM1 = New-AzureVMConfig -name $vmname -InstanceSize $size -ImageName $image |
        Add-AzureProvisioningConfig -WindowsDomain -AdminUserName $username –Password $pwd -JoinDomain $fqndomain -Domain $domain -DomainUserName $username -DomainPassword $pwd |
        Set-AzureSubnet -SubnetNames "Subnet-1"

    New-AzureVM -ServiceName $service -VMs $MyVM1 -VNetName $vnet

    Here is the error I get

    VERBOSE: 11:15:31 AM - Completed Operation: Get Deployment

    New-AzureVM : Missing type map configuration or unsupported mapping.

    Mapping types:

    DomainJoinSettings -> DomainJoinSettings

    Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVMModel.WindowsProvisioningConfigurationSet+DomainJoinSettings -> Microsoft.WindowsAzure.Management.Compute.Models.DomainJoinSettings

    Destination path:

    ConfigurationSet.DomainJoin.DomainJoin

    Source value:

    Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVMModel.WindowsProvisioningConfigurationSet+DomainJoinSettings

    At line:1 char:1

    + New-AzureVM -ServiceName $service -VMs $MyVM1 -VNetName $vnet

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : CloseError: (:) [New-AzureVM], AutoMapperMappingException

        + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs.NewAzureVMCommand

    I have verified the case sensitivity of names numerous times.  If I provision it non joined, it provisions into the subnet just fine, and I can manually join the domain.  I can also add the computer to the domain by a Remote PSSession with this script

    # Get the Remote VM Endpoints
    $vminfo = Get-AzureVM -ServiceName "mpsitcss" -Name "MySQL01" | Get-AzureEndpoint
    $ipaddress = $vminfo[1].Vip
    $port = $vminfo[1].Port

    # Remote into the VM and join the domain
    $skipCN = New-PSSessionOption -SkipCNCheck -SkipCACheck
    $password = "P@ssw*rd" | ConvertTo-SecureString -AsPlainText -Force
    $username = "MySQL01\Scott"
    $credential = New-Object System.Management.Automation.PSCredential($username,$password)
    Enter-PSSession -ComputerName $ipaddress -Port $port -Credential $credential -UseSSL -SessionOption $skipCN
    Add-Computer -DomainName "mpsitcss.local" -ComputerName "MySQL01"

    What am I missing?

    Sunday, October 27, 2013 9:04 PM

Answers

  • This is a known issue with the current Azure PowerShell cmdlets (0.7.0) and will get resolved with the new cmdlets getting released November 6th. If you need to use the domain join switches, roll back to the 0.6.19 cmdlets.
    • Proposed as answer by TomHickling Wednesday, October 30, 2013 7:01 PM
    • Marked as answer by sharpster1 Wednesday, October 30, 2013 9:55 PM
    Wednesday, October 30, 2013 6:10 PM

All replies

  • Hi,

    Welcome to MSDN forum.

    According to your description, it seems the issue is related to Azure Virtual Machine, I will move this thread to Azure Virtual Machine Discussions forums to get a better support.

    Thank you for your understanding.

    Best Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, October 28, 2013 1:25 AM
    Moderator
  • I can confirm I am seeing this too....am using w2012r2 image released last week...

    syntax:New-AzureVMConfig -Name $vmName -InstanceSize Medium -ImageName $imageName |`
      Add-AzureProvisioningConfig -WindowsDomain -Password $adminPassword -AdminUserName $adminUserName -JoinDomain $domainDnsName -Domain $domainName -DomainPassword $domainInstallerPassword -DomainUserName $domainUsername |`
      Add-AzureDataDisk -CreateNew -DiskSizeInGB 50 -DiskLabel 'datadisk1' -LUN 0  `
     | New-AzureVM –ServiceName $serviceName


    Prakash Heda | Sr Infrastructure DBA | Advent Software | http://www.sqlfeatures.com

    Monday, October 28, 2013 2:41 AM
  • I can confirm it's broken as well. I used the domain join script from this http://www.windowsazure.com/en-us/manage/services/networking/active-directory-forest/ walkthrough several time a couple of weeks ago to create a number of domain joined azure VM's and now, all of a sudden, it's not working.  Any help would be appreciated. 
    Tuesday, October 29, 2013 4:54 PM
  • This is a known issue with the current Azure PowerShell cmdlets (0.7.0) and will get resolved with the new cmdlets getting released November 6th. If you need to use the domain join switches, roll back to the 0.6.19 cmdlets.
    • Proposed as answer by TomHickling Wednesday, October 30, 2013 7:01 PM
    • Marked as answer by sharpster1 Wednesday, October 30, 2013 9:55 PM
    Wednesday, October 30, 2013 6:10 PM
  • I can confirm this works, wish I looked here first instead of wasting a couple or hours trying to troubleshoot this

    Tom Hickling

    • Proposed as answer by TomHickling Wednesday, October 30, 2013 7:02 PM
    Wednesday, October 30, 2013 7:01 PM
  • Thanks Steven that's the answer.  I share Tom's frustration.
    Wednesday, October 30, 2013 9:55 PM
  • thx...not ur fault but this makes me very unhappy....

    I spend last 3 days trying to find out why its not working, not even a single link you can google which talks about it

    I expected powershell experts to write a small article about it....

    now I have to understand how to install old version of powershell:)

    Thursday, October 31, 2013 2:39 AM
  • Well not a domain or azure expert and I spend 3+ days, thoroughly 40+ articles and 30+ times DC in diff ways to see what's wrong with this method....

    also now it seems Get-AzureWinRMUri not returning port number is also powershell issue...

    MS gotta dogfooding their applications before releasing....most of the starters are using this standard script to test azure....

    Thursday, October 31, 2013 5:21 PM
  • I just confirmed that the new cmdlets (0.7.1) now work with the domain join switches.

    You can download the updated version here: Windows Azure PowerShell cmdlets

    Thursday, November 07, 2013 7:19 PM