且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将图像添加到市场

更新时间:2023-12-06 16:37:16

嗨Darren,


 


通过调用Add-VMImage cmdlet添加VM映像。



  • 包括VM映像的发布者,商品,SKU和版本。这些参数由引用VM映像的Azure资源管理器模板使用。
  • 将osType指定为Windows或Linux。
  • 在 中包含您的Azure Active Directory租户ID表格 < myaadtenant> .onmicrosoft.com。  

以下是一个示例调用脚本:


Add-VMImage -publisher"OpenLogic" -offer"CentOS" -sku"6.7" -version"1.0.0" -osType Linux -osDiskLocalPath'<
VHD文件的路径,它也适用于UNC路径> \ Openpen__OpenLogic-CentOS-67-20160308-en-us-30GB-stack.vhd'-lastantID< yourtenantID> .onmicrosoft.com



有关详细信息,请参阅" 使用PowerShell将
a虚拟机映像添加到Marketplace
"。



 


问候,


与Pradeep 跨度>


Hi All,

I am not able upload the image to the Marketplace completely though it starts showing the uploading status.

After some time it fails with the the following error:

Add-VMImage : VM image download failed.
At line:1 char:1
+ Add-VMImage -publisher "CentOS" -offer "OpenLogicServer" -sku "722016 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Add-VMImage

Please suggest a work-around if any

Thank you in advance....

Hi Darren,

 

Add the VM image by invoking the Add-VMImage cmdlet.

  • Include the publisher, offer, SKU, and version for the VM image. These parameters are used by Azure Resource Manager templates that reference the VM image.
  • Specify osType as Windows or Linux.
  • Include your Azure Active Directory tenant ID in the  form <myaadtenant>.onmicrosoft.com. 

Following is an example invocation of the script:

Add-VMImage -publisher "OpenLogic" -offer "CentOS" -sku "6.7" -version "1.0.0" -osType Linux -osDiskLocalPath '<path to VHD file, it also worked with UNC path>\OpenLogic__OpenLogic-CentOS-67-20160308-en-us-30GB-stack.vhd' -tenantID <yourtenantID>.onmicrosoft.com

For more details, see "Add a VM image to Marketplace with PowerShell".

 

Regards,

Pradeep