Course 20346A

  • Hi all

    We are try to configure the lab environment to the course 20346A in azure.

    I build the storage and network OK but when I run the script to create a DC a error occurred an the vm isn't created

    PS E:\Setupfiles> .\BuildDC.ps1 VERBOSE: 8:20:13 PM - Begin Operation: Get-AzureVMImage Get-AzureVMImage : Requested value 'A3' was not found. At E:\Setupfiles\BuildDC.ps1:26 char:13 + $osimage = (Get-AzureVMImage | where {$_.Label -like "Windows Server 2012 Datace ... +             ~~~~~~~~~~~~~~~~     + CategoryInfo          : NotSpecified: (:) [Get-AzureVMImage], ArgumentException     + FullyQualifiedErrorId : System.ArgumentException,Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.DiskRepo    sitory.GetAzureVMImage

    Script to create Azure environment for course: 20346

    2. Create DC VM and cloud service 3. Promote server to DC, and create OUs 4. Add Certificate Authority

    Setup files exist in current folder - we're good to go.

    Building DC New-AzureVMConfig : Cannot validate argument on parameter 'ImageName'. The argument is null or empty. Supply an argument that is not null or empty and then try the command again. At E:\Setupfiles\BuildDC.ps1:61 char:77 + $newVM = New-AzureVMConfig -name $vmname -InstanceSize $instance -ImageName $osi ... +                                                                             ~~~~     + CategoryInfo          : InvalidData: (:) [New-AzureVMConfig], ParameterBindingValidationException     + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.    NewAzureVMConfigCommand

    CreateVM : Cannot bind argument to parameter 'vmconfig' because it is null. At E:\Setupfiles\BuildDC.ps1:62 char:10 + CreateVM $newVM $vmname $cloudservice $true $affinitygroup $vnet $dns +          ~~~~~~     + CategoryInfo          : InvalidData: (:) [CreateVM], ParameterBindingValidationException     + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,CreateVM

    Somebody have idea why this happen

     

    Regards

  • Hi, I'm facing the same issue with no information as to why is this error coming.

    It looks like the Azure Powershell is not able to query the azure image repository.

  • Hi, I'm facing the same issue with no information as to why is this error coming.

    It looks like the Azure Powershell is not able to query the azure image repository.

  • I had the same issue

    After I have reinstall Azure Powershell module it work for me.

    Link for Azure Powershell download

    go.microsoft.com

  • Now I am received the next error

    Script to create Azure environment for course: 20346

    2. Create DC VM and cloud service

    3. Promote server to DC, and create OUs

    4. Add Certificate Authority

    Setup files exist in current folder - we're good to go.

    Building DC

    CreateVM : Cannot bind argument to parameter 'cloudservice' because it is null.

    At D:\365\Setupfiles\BuildDC.ps1:62 char:25

    + CreateVM $newVM $vmname $cloudservice $true $affinitygroup $vnet $dns

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

       + CategoryInfo          : InvalidData: (:) [CreateVM], ParameterBindingValidationException

       + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,CreateVM

  • Having the exact same issue. 'Requested value 'A3' was not found.' when trying to run Get-AzureVMImage.

    Going through 20346A, and ran into broken script for BuildDC.ps1 that brought me to the Get-AzureVMImage issue.

    I re-installed PowerShell for Azure like Christian Jacobsen recommended, but it didn't resolve the issue. Unable to put support tickets in with Microsoft for anything but Billing on a Free Trial (which is what's used for this course).

  • Hi,

    I have investigated the errors you have posted in this thread and from what I can see it seems that the $variables that are created in the BuildStorageAndNetwork.ps1 are not able to be found when the BuildDC.ps1 script is run. This is because the way you are running the PS1 files is not as per the instructions in the Trainer Handbook. The variables are not set as $global.variable and so therefore when the first script has finished running, the variables that are being set are then not available when you run the next script. you can see this if you run the initial storage & network creation script and then run the command

    Get-Variable

    You will see the variables that are available, and you will notice $cloudservice [amongst others] does not exist.

    As per the Trainer Handbook you need to ensure that you run the 'BuildStorageAndNetwork.ps1' as

    . .\BuildStorageAndNetwork.ps1

    NOTE: 'dot' 'space' 'dot' 'backslash' 'scriptname' format.

    This is mentioned on page 433 of the Trainer Handbook

    ....

    To run the first provisioning script, at the Windows Azure PowerShell prompt, type the following
    command, and press ENTER:
    . .\BuildStorageAndNetwork.ps1
    Important: The command starts with dot space dot backslash.

    ....

    Once the 'BuildStorageAndNetwork.ps1' file has completed, then in the same session run the scripts to create the virtual machines.


    I have tested the scripts and they are fine, you just need to ensure you run them as per the instructions. you can accomplish this in other ways also but in terms of ensuring that the course material is adopted and used in a consistent way please follow what it states.


    I hope that helps, If you have any questions please be sure to let me know.


    Thanks,

    James.

  • Let me introduce myself. I work for Microsoft Learning Experience (LeX) and I am on the team which developed 20346A. While I did not write the scripts, I have been working on the 'Requested value 'A3' was not found' and other bugs submitted by MCT.

    Windows Azure is very dynamic and is continually being updated. New features usually appear on new accounts first, then get rolled out to existing accounts. For MCT this means that they may not see the same behavior from their existing account and the accounts just created for the students. Also, updates roll out to the data center over a period of time, so have all students in a class use the same data center.

    The 'Requested value 'A3' was not found' bug actually has a few causes.

    1. Run scripts in order
      Originally, we created one build script to provision the Azure VM. During test this proved to be cumbersome and difficult to recover if there was an error. The script was split up which created dependencies, therefore the scripts must be run in order in the same PowerShell session. This will resolve a majority of issues.

    2. E:\Setupfiles\BuildDC.ps1:26 char:13
      Recent updates to Windows Azure included updates to the Windows Azure API, which Windows Azure PowerShell is built on. The Get-AzureVMImage now accepts -ServiceName parameter as an optional parameter. Even though the documentation shows the parameter as optional, the API version included in the class VM does not support the updated Get-AzureVMImage command.

      Workaround: hardcode the VM image name
      replace $osimage = (Get-AzureVMImage | where {$_.Label -like "Windows Server 2012 Datacenter*"} | sort PublishedDate -Descending)[0].ImageName


      with $osimage = 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201404.01-en.us-127GB.vhd'

      The change needs to be made in the following script:

      1. BuildADFSProxy.ps1
      2. BuildADFSServer1.ps1
      3. BuildADFSServer2.ps1
      4. BuildClient2.ps1
      5. BuildClient3.ps1
      6. BuildDC.ps1
      7. BuildExchangeServer.ps1

    3. E:\Setupfiles\BuildDC.ps1:62 char:77
      This means the name of the VM image is null.
      Workaround: hardcode the VM image name see 2 above.

    4. Updating the Windows Azure PowerShell
      There is an update available for Windows Azure PowerShell. It has not been tested by Microsoft LeX, so we do not recommend replacing it at this time. The workaround above works, has been tested and is simpler to implement. if you do change the API you may have to make the following change to the script:
      replace $Get-AzureVMImage -servicename | where {$_.Label -like "Windows Server 2012 Datacenter*"} | sort PublishedDate -Descending)[0].ImageName
      with
      $cloudservice = (get-azureservice).servicename
      $Get-AzureVMImage -servicename $cloudservice | where {$_.Label -like "Windows Server 2012 Datacenter*"} | sort PublishedDate -Descending)[0].ImageName

    groblesf: I noticed you ran your script from D:\365\Setupfiles\. The working directory for the scripts is hardcoded in the Variables.ps1 file. If you run the scripts from a different directory, this file needs to be edited.

    Hopefully this helps,

    Brian

  • Thx James, yes this works fine. thx for your support.

    regards

  • Hi brian,  the capture was a test in other environment.

    with the update of PS and ._.\scriptname the environment works Fine for me

    Thx for yours comments and suggestions.

    Regards

  • Using the correction above, I managed to run the script to create 7 Azure VMs, however I stopped after generating student lab number.  The command Resolve-DNSName return error:  

    Resolve-DnsName : lab01476.o365ready.com : DNS server failure

    At line:1 char:1

    + Resolve-Dnsname lab01476.o365ready.com

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

          + CategoryInfo           : ResourceUnavailable: (lab01476.o365ready.com)

          + FullyQualifiedErrorId : RCODE_SERVER_FAILURE, Microsoft.Dnsclient.Command.ResolveDnsname

    Please help.

    Thanks

  • Referring my question above, I think I have figured out the reason of the error.

    The step to resolve DNS name in Lab 1A Exercise 1 Task 6 item no. 9 ; should be done only after Lab Mod 5 Exercise 1 Task 3 completed, as this is the step that created the DNS zone to resolve the assigned domain.

    So if you experienced the same mistake  Lab 1A Exercise 1 Task 6 item no. 9 you can ignore it.  Or you skip that part, do not run resolve-dnsname LabXXXXX.O365ready.com at this stage.  Wait until you completed Lab Mod 5 Exercise 1 Task 3

    I am proceeding to Lab module 6 now...

    Cheers.

  • The actual cause for the failure of the Resolve-DnsName cmdlet is DNS propagation delays. The DNS record for LabXXXXX.O365ready.com is created when the Submit button is clicked in Lab 1A Exercise 1 Task 6 step 6. It can take up to 15 minutes for most public facing DNS servers to update the DNS entries. Check with your training center's IT department to see what the update frequency is for the DNS servers you will be using.

    It is better to verify your DNS entry sooner than later. Since the SetupExchange.ps1 script takes about 45 minutes run Resolve-DnsName after the SetupExchange.ps1 (Lab 1A Exercise 1 Task 7 step 13).

    When we were testing the labs for 20346A I used https://www.whatsmydns.net/ to check the propagation of the DNS record.

    Brian - Microsoft LeX

  • Step 2 makes sense - what and where do you make the hardcode VM name change in step 3?

    Thanks

  • hate replying to my own reply..but....

    I downloaded and installed the latest PS module and everything worked fine.