locked
New-AzsServer2016VMImage failure RRS feed

  • Question

  • Hi,

    I'm trying to add a default image following "https://docs.microsoft.com/fr-fr/azure/azure-stack/azure-stack-add-default-image"

    As I'm in disconnected mode, I use the PowerShell way.

    However, when I run the "New-AzsServer2016VMImage " it attempts to download the "Azure Stack Marketplace Item Generator".
    Since this server does not have internet connectivity, it fails.
    Am I missing something ? Is it possible to do it without internet connectivity?

    Here are the full command and output:


    # Add a Windows Server 2016 Evaluation VM Image.
    New-AzsServer2016VMImage `
     -ISOPath $ISOPath
    VERBOSE: Checking ISO path for a valid ISO.
    VERBOSE: Creating Server Full Image
    VERBOSE: Creating VHD at: C:\AzureStackTools\master\AzureStack-Tools-master\ComputeAdmin\Server2016DatacenterFullEval.vhd of
    size: 40960 MB
    VERBOSE: Preparing VHD
    VERBOSE: VHD is mounted at drive letter: G
    VERBOSE: Mounting ISO
    VERBOSE: ISO is mounted at drive letter: H
    VERBOSE: Applying Image Windows Server 2016 SERVERDATACENTER to VHD
    VERBOSE: Adding .NET 3.5
    VERBOSE: Target Image Version 10.0.14393.350
    VERBOSE: Successfully added package H:\sources\sxs\microsoft-windows-netfx3-ondemand-package.cab
    VERBOSE: Making VHD bootable


    ResourceGroupName : addvmimageresourcegroup
    Location          : local
    ProvisioningState : Succeeded
    Tags              :
    ResourceId        : /subscriptions/2d20bf28-ea49-4d11-aa80-8b9d5238834b/resourceGroups/addvmimageresourcegroup

    addvmimagestorageaccount

    AbsolutePath   : /
    AbsoluteUri    : https://addvmimagestorageaccount.blob.local.azurestack.external/
    LocalPath      : /
    Authority      : addvmimagestorageaccount.blob.local.azurestack.external
    HostNameType   : Dns
    IsDefaultPort  : True
    IsFile         : False
    IsLoopback     : False
    PathAndQuery   : /
    Segments       : {/}
    IsUnc          : False
    Host           : addvmimagestorageaccount.blob.local.azurestack.external
    Port           : 443
    Query          :
    Fragment       :
    Scheme         : https
    OriginalString : https://addvmimagestorageaccount.blob.local.azurestack.external/
    DnsSafeHost    : addvmimagestorageaccount.blob.local.azurestack.external
    IdnHost        : addvmimagestorageaccount.blob.local.azurestack.external
    IsAbsoluteUri  : True
    UserEscaped    : False
    UserInfo       :

    MD5 hash is being calculated for the file  C:\AzureStackTools\master\AzureStack-Tools-master\ComputeAdmin\Server2016Datacente
    rFullEval.vhd.
    MD5 hash calculation is completed.
    Elapsed time for the operation: 00:02:17
    Creating new page blob of size 42949673472...
    Elapsed time for upload: 00:02:13

    LocalFilePath  : C:\AzureStackTools\master\AzureStack-Tools-master\ComputeAdmin\Server2016DatacenterFullEval.vhd
    DestinationUri : https://addvmimagestorageaccount.blob.local.azurestack.external/addvmimagecontainer/Server2016DatacenterFul
                     lEval.vhd


    ResourceId     : /subscriptions/2d20bf28-ea49-4d11-aa80-8b9d5238834b/providers/Microsoft.Compute.Admin/locations/local/artif
                     actTypes/platformImage/publishers/MicrosoftWindowsServer/offers/WindowsServer/skus/2016-Datacenter/versions
                     /1.0.0
    ResourceName   : local/platformImage/MicrosoftWindowsServer/WindowsServer/2016-Datacenter/1.0.0
    ResourceType   : Microsoft.Compute.Admin/locations/artifactTypes/publishers/offers/skus/versions
    Location       : local
    SubscriptionId : 2d20bf28-ea49-4d11-aa80-8b9d5238834b
    Properties     : @{OsDisk=; DataDisks=; Details=; ProvisioningState=Succeeded}

    addvmimagestorageaccount
    VERBOSE: Downloading Azure Stack Marketplace Item Generator Attempt 1
    VERBOSE: Downloading Azure Stack Marketplace Item Generator Attempt 2
    VERBOSE: Downloading Azure Stack Marketplace Item Generator Attempt 3
    VERBOSE: Downloading Azure Stack Marketplace Item Generator Attempt 4
    VERBOSE: Downloading Azure Stack Marketplace Item Generator Attempt 5
    New-AzsServer2016VMImage : Failed to download Azure Stack Marketplace Item Generator
    At line:4 char:1
    + New-AzsServer2016VMImage `
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
        + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AzsServer2016VMImage
    Monday, August 21, 2017 9:39 AM

Answers

  • New-AzsServer2016VMIMage can now be run behind a web proxy, with the correct exceptions to exclude local infrastructure : *.azurestack.external;*.azurestack.local

    It resolves this issue for me.


    • Marked as answer by Pierre Ferra Friday, November 17, 2017 10:36 AM
    Friday, November 17, 2017 10:36 AM
  • Hi Pierre,

    "New-AzsServer2016VMImage" will attempt to download the "Azure Stack Marketplace Item Generator and Sample.zip" over the internet. As a work around you can download the zip and run the process manually, please see the following links;


    Make a custom virtual machine image available in Azure Stack;
    https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-add-vm-image

    Create and publish a Marketplace item - has links to the tool and template downloads;
    https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-create-and-publish-marketplace-item


    I'll flag this for the tools team and see if they can add a switch for the disconnected scenarios.


    thanks,
    Timothy


    Wednesday, August 23, 2017 3:27 PM

All replies

  • I resolved this by giving internet access to the Azure Stack host.
    I'm curious to know if it's possible to use "New-AzsServer2016VMImage" without internet access.

    Thanks,
    Wednesday, August 23, 2017 1:35 PM
  • Hi Pierre,

    "New-AzsServer2016VMImage" will attempt to download the "Azure Stack Marketplace Item Generator and Sample.zip" over the internet. As a work around you can download the zip and run the process manually, please see the following links;


    Make a custom virtual machine image available in Azure Stack;
    https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-add-vm-image

    Create and publish a Marketplace item - has links to the tool and template downloads;
    https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-create-and-publish-marketplace-item


    I'll flag this for the tools team and see if they can add a switch for the disconnected scenarios.


    thanks,
    Timothy


    Wednesday, August 23, 2017 3:27 PM
  • Hi Pierre,

    We have created an issue to track for supporting this tooling in a disconnected mode. 

    https://github.com/Azure/AzureStack-Tools/issues/313

    Thanks,

    Matt

    Wednesday, August 23, 2017 10:11 PM
  • New-AzsServer2016VMIMage can now be run behind a web proxy, with the correct exceptions to exclude local infrastructure : *.azurestack.external;*.azurestack.local

    It resolves this issue for me.


    • Marked as answer by Pierre Ferra Friday, November 17, 2017 10:36 AM
    Friday, November 17, 2017 10:36 AM