SlideShare a Scribd company logo
Create a gallery image for
Azure Marketplace
Alexey Bokov
@abokov
Contents
• Seller dashboard
• Publish dashboard
• Create Virtual Machines for Marketplace
Getting started : there’s a marketplace
Inside current portal
Inside new portal
And one more : vmdepot.msopentech.com
Not really a
marketplace
But repo for “open
sourced” VMs
Publishing offer: how it works
1. Company registration as a seller with Microsoft
• Completed in the Microsoft Seller Dashboard
• Once you register your company, you can continue working in parallel while the verification of your registration is
completed by the Seller Dashboard team
2. Build and certify VM image
• This step and all subsequent steps are completed in the Azure Publishing Portal
3. Create offer, input marketing content, and define pricing in Publishing Portal
4. Test in staging and go-live
Seller portal : Used to register the company information once.
Publisher portal : Used to publish and manage the offer.
Microsoft Azure Marketplace Publication Guidelines : aka.ms/am-guideline
sellerdashboard.microsoft.com
Microsoft Seller Dashboard
• Used to register the company information once.
• The registrant must be a valid representative of the company, and must provide their
personal information as a way to validate their identity.
• The person registering must use a Microsoft Account that is shared for the company,
and the same account must be used in the Azure Publishing Portal.
<demo for sellerdashboard.microsoft.com >
publish.windowsazure.com
Azure Publishing Portal
• Used to publish and manage the offer.
• The same company Microsoft Account that was used in the Seller Dashboard
registration must be used here.
• Additional users can be added to assist once the master publisher account has been
created.
<demo for publish.windowsazure.com >
Create Virtual Machine for Marketplace
Terminology:
• SKU (StockKeeping Unit) means VM Image
• VM Image contain OS disk + some amount of data disks ( may be zero ) –
for each disk it own VHD is required ( even for empty data disk ).
• VHD means Virtual Hard Disk
• VHDx means another Hyper-V format, not supported by Azure. There’s
Convert-VHD tools for make conversion between formats.
Add offer
1. Log in to the Publishing Portal (publish.windowsazure.com)
using your seller account.
2. Enter the Virtual Machines tab of the Publishing Portal. In the
prompted entry field, enter your offer name, and create. Under
seller account, enter your namespace.
3. Add any other administrators you want to be able to work with
the publishing portal.
Add offer
Define SKU
1. Add a SKU. It will require an identifier, which will be used in the
URL. This will need to be unique within your Publishing Profile,
but there is no risk of identifier collision with other publishers.
2. Add a summary description for your SKU. This will be read by
humans in the UX, so it is advised to make it easily readable.
This information does not need to be locked until "Push to
Staging". Until then, you are free to edit it.
3. If you are using Windows-based SKUs, follow the suggested
links to acquire the approved versions of Windows Server.
Define SKU
Common thoughts
1. Your VM image (aka SKU) should works on all existing ( and future) VM sizes – from
A0 ( one shared CPU core, 0.75 GB RAM) up to G5 (32 CPU cores, 448 GB RAM ).
2. Data disks can be as large as 1 TB. Data disk VHDs should be created as a fixed
format VHD, but also be sparse.
3. When deciding on the disk size, please keep in mind that end users cannot resize
VHDs within an image.
4. Data disks can be empty or contain data
What’s next
1.Create Linux VHD
2.Create Windows VHD
3.Register VHD in publisher portal
4.Certify it
Create Linux VM
1. VHD
2. Azure Linux agent ( waagent ) and required libs/packages
3. Kernel and Logical Volume Manager (LVM)
4. Network and SSH daemon
5. Security tips
6. Generalize image
Note: if you use image from Gallery like ‘official Ubuntu’ – just to step 6 ( as soon as
image is already well prepared )
1. Create Linux VM : VHD
1. Linux OS VHD: The Linux OS VHD in your VM Image should be created as a 30GB —
50GB fixed format VHD.
2. No, It cannot be less than 30GB. If the physical size is less than VHD size, the VHD
should be sparse.
3. Linux VHDs larger than 50GB will be considered on a case by case basis.
Documentation : aka.ms/linux-vhd
2. Create Linux VM: waagent and libs
1. The Azure Linux agent (waagent) provides key functions for deploying Linux IaaS deployment in
Azure, such as image provisioning and networking capabilities.
2. You can get this agent from repos ( RPM or Deb packages ) : aka.ms/linux-distros
3. Source code: github.com/Azure/WALinuxAgent
1. Copy 'waagent' file to /usr/sbin
2. chmod 755 /usr/sbin/waagent; /usr/sbin/waagent install
3. Agent config is placed here: /etc/waagent.conf
4. Read manual
4. Check latest Linux Integration Services (LIS) driver is installed, current v4.0: aka.ms/lis-v4
5. Magical Kernel Patch for Azure I/O ( usually included in latests distros, take care about non-listed
kernels )
6. Python 2.6+ and pyasn1 ( Abstract Syntax Notation v1) package
7. OpenSLL v1.0+
Azure Linux Agent user guide: aka.ms/waagent-guide
3. Create Linux VM: Kernel and LVM
1. OS has to be placed on single root partition
2. SWAP space (if it needed ) can be created on the local resource disk with the Linux Agent
by enable swap in /etc/waagent.conf. It will automatically use the resource disk (which
comes with every VM) to create the swap. There's no need to create a disk for it. More
info : bokov.net/weblog/azure/configure-linux-in-azure
3. Serial console output must be always enabled even if you not allow any SSH to your VM (
and our support may provide you output from serial console )
4. Add good enough timeout for mounting cloud based storage device
5. Add this to kernel boot line “console=ttyS0 earlyprintk=ttyS0 rootdelay=300”
6. Do not :
• Do not use LVM Logical Volume Manager
• Do not use swap on OS or data disk
4. Create Linux VM: network and SSH
1. We recommend enable SSH for the end user, add keep live into sshd_config
by ClientAliveInterval settings - acceptable range of ClientAliveInterval is 30 to
235, recommended 180.
2. Networking configuration should use ifcfg-eth0 file and manage it via the
ifup/ifdown
3. Make sure that network device is brought up on boot and uses DHCP
4. Do not:
• Do not install Network Manager package - it conflicts with waagent.
• No custom network configuration and resolv.conf file ( please “rm /etc/resolv.conf” ).
• Do not configure IPv6 – it’s not supported yet.
5. Create Linux VM: Security
1. Do classics : install all security patches for your distribution ( sudo apt-get update;sudo
apt-get upgrade) / follow distribution security guidelines / clean up bash history
2. Please take care about root - the image should not contain a root password (!!!!!!) –
delete it and check /etc/shadow and /etc/passwd.
3. Add firewall i.e. include iptables, but do not enable any rules – default expectation from
customer is that they may easily enable it right after VM is started.
4. Do not:
• Store your Azure account credentials on VM image (!!!!!)
• Do not create default accounts, which remain the same, across provisioning instances
• A lot of other stupid things
6. Create Linux VM: Generalize Image
1. OS VHD must be deprovisioned: “waagent deprovision”. This command does:
• Removes the nameserver configuration in /etc/resolv.conf
• Removes cached DHCP client leases
• Resets host name to localhost.localdomain
2. We recommend setting /etc/waagent.conf to ensure the following actions are also
completed:
• Remove all SSH host keys: Provisioning.RegenerateSshHostKeyPair='y'
• Remore root password from /etc/shadow : Provisioning.DeleteRootPassword='y‘
Example of /etc/waagent.conf
# Azure Linux Agent Configuration
Role.StateConsumer=None
Role.ConfigurationConsumer=None
Role.TopologyConsumer=None
Provisioning.Enabled=y
Provisioning.DeleteRootPassword=n
Provisioning.RegenerateSshHostKeyPair=y
Provisioning.SshHostKeyPairType=rsa
Provisioning.MonitorHostName=y
ResourceDisk.Format=y
ResourceDisk.Filesystem=ext4
ResourceDisk.MountPoint=/mnt/resource
ResourceDisk.EnableSwap=n
ResourceDisk.SwapSizeMB=0
LBProbeResponder=y
Logs.Verbose=n
OS.RootDeviceScsiTimeout=300
OS.OpensslPath=None
Azure Linux Agent user guide:
aka.ms/waagent-guide
Cool things Linux
1. Custom data and cloud-init – way to inject a script or other metadata into a Microsoft
Azure virtual machine at provision time:
bokov.net/weblog/azure/configure-linux-in-azure/
2. Non-endorsed Linux distros : aka.ms/another-linux
Create Windows VM
1.Choose base image
2.Run image
3.Customize VM using RDP and PowerShell
4.Configure
5.Generalize image
1. Create Windows VM: choose base image
1. The OS VHD for your VM Image must be based on a Microsoft
Azure-approved base image, containing Windows Server or SQL
Server.
2. To begin, create a VM from one of the following images, located at
the Microsoft Azure Portal (portal.azure.com):
1. Windows Server 2012 R2 Datacenter, 2012 Datacenter, 2008 R2 SP1
2. SQL Server 2014 Enterprise/Standard/Web
3. SQL Server 2012 SP2 Enterprise/Standard/Web
4. SQL Server 2008 R2 SP2 Enterprise/Standard/Web
5. These links can also be found in the Publishing Portal under the SKU page.
3. Main idea is that you may use Windows Server Images published
on September 8, 2014 and later.
1. Create Windows VM: choose base image
Current list of approved images in publish.windowsazure.com
2. Create Windows VM: run image
1. Actually what you do is create VM under Azure portal, that’s all.
2. Hints:
• Choose US-* region for deployment, it would helps during certification
process because when you will submit your image for certification
team
• Do all thing in cloud, create/customize/configure VM on-premise under
Hyper-V technically correct and will work if you follow documentation,
but we don’t recommend it in most cases. Reality is that using on-
premise for this purpose makes whole process much longer and brings
very hard-to-find issues when VM is finally goes to cloud.
3. Create Windows VM: Customize VM using
RDP and PowerShell
1. RDP is recommended way to develop on your VM.
3. Create Windows VM: Customize VM using
RDP and PowerShell
1. You can use powershell to access your VM (download RDP
file to c:tools
>>Get-AzureAccount
>>Get-AzureVM
>>Get-AzureRemoteDesktopFile -ServiceName "abokov-
ws2012DC" -Name "abokov-ws2012DC" -LocalPath
"C:toolsabokov-ws2012DC.rdp" ServiceName
Name
4. Create Windows VM: configure
1. The Windows OS VHD in your VM Image should be created as a 128 GB fixed format VHD. If
the physical size is less than 128GB, the VHD should be sparse. Base images of
recommended Windows Server are already meet this, just don’t charge defaults.
2. Install patches, especially critical and security
3. No configuration should rely on drives other than C: or D:, since these are the only two
drives that are always guaranteed to exist. C: is the OS disk and D: is the temporary local
disk.
4. Don’t keep your Azure credentials inside images
4. Create Windows VM: generalize
1. Windows images should be sysprep’ed - run command line ( not PowerShell! ), change
directory to “c:windowssystem32sysprep”
2. “sysprep.exe /generalize /oobe /shutdown”
3. Remote Desktop Connection will be closed immediately
4. Wait for generalize and shutdown…
4. Create Windows VM: generalize
When it finished – go to management panel for VHD URL
Deploy a VM from your generalized VHDs
1. Generalized OS VHD from Azure storage account can be registered as a user
VM Image with which to test. You cannot directly deploy the VM by providing
generalized VHD URL.
2. You need to use the Create VM Image Rest API to register VHDs as a VM
Image.
3. There’s two options for that: Invoke-WebRequest or Save-AzureVMIMage
Option 1 – Invoke-WebRequest# Image Parameters to Specify
$ImageName='myVMImage'
$Label='IMAGE_LABEL‘
$Description='My VM Image to Test'
$osCaching='ReadWrite'
$os = 'Windows'
$state = 'Generalized'
$osMediaLink = 'http://mystorageaccount.blob.core.windows.net/vhds/myOSvhd.vhd'
$dataCaching='None'
$lun='1'
$dataMediaLink='http://mystorageaccount.blob.core.windows.net/vhds/mydatavhd.vhd'
# Subscription Related Properties
$SrvMngtEndPoint='https://management.core.windows.net'
$subscription = Get-AzureSubscription -Current -ExtendedDetails
$certificate = $subscription.Certificate
$SubId = $subscription.SubscriptionId
$body =
"" + "" + $ImageName + "" + "" + $Label + "" + "" + $Description + "" +
"" +
"" + $osCaching + "" +"" + $state + "" +"" + $os + "" +"" + $osMediaLink + "" +
"" "" +
"" +"" + $dataCaching + "" + "" + $lun + "" +"" + $dataMediaLink + "" +
"" + "" + ""
$uri = $SrvMngtEndPoint + "/" + $SubId + "/" + "services/vmimages"
$headers = @{"x-ms-version" = "2014-06-01"}
$response = Invoke-WebRequest -Uri $uri -ContentType "application/xml" -Body $body -Certificate $certificate -Headers $headers -Method POST
if ($response.StatusCode -ge 200 -and $response.StatusCode -lt 300)
{ echo "Accepted" }
else { echo "Not Accepted" }
Option 2 - Save-AzureVMImage
Save-AzureVMImage –ServiceName “myServiceName” –Name “myVMtoCapture” –OSState
“Generalized” –ImageName “myAwesomeVMImage” –ImageLabel “This is my Virtual Machine Image” -Verbose
Now it’s there
Generate SAS URI
1. The SAS URI created should adhere to the following requirements
• When generating SAS URIs for your VHDs, List and Read-Only permissions are sufficient. Do not provide
Write or Delete access.
• The duration for access should be a minimum of 7 business days from when the SAS URI is created.
• To avoid immediate errors due to clock skews, specify a time 15 minutes before the current time.
2. You can use AzureStorageExplorer tool : AzureStorageExplorer.codeplex.com
AzureStorageExplorer (add Storage account)
AzureStorageExplorer: generate SAS URI
AzureStorageExplorer: save SAS URI to publisher
portal
Certification process
This process includes running a special certification tool, uploading the
verification results to the Azure container where your VHDs reside,
adding an offer, defining your SKU, and submitting your VM Image for
certification.
1. Download Certification tool
2. Connect to your image
1. Linux : choose SSH authentication ( DNS + username/password)
2. Windows : use FQDN ( Fully Qualified Domain Name +
username/password )
3. Run tool
4. Send results to Microsoft (contact
Certification process
Certification process – tests execution
Certification process – true anywhere
Certification process – true anywhere
Certification process – report
Certification process – report
Certification process – final step
More details: aka.ms/azure-cert
Summary
• There’s some formalities with registration
• Create VM based on VM images from Azure gallery is quite
easy
• Certification process took some time
• Nevertheless it might took time to make publishing,
keeping in touch with folks from Microsoft helps a LOT

More Related Content

PPTX
All about Azure workshop deck
PPTX
WindowsAzureSDK1.7
PDF
vSphere APIs for performance monitoring
PPTX
Azure virtual machines & Terraform
PPTX
Open Cloud BBQ - Nano Server
PPT
Tech X Virtualization Tips
PDF
Hyper-V vNext
PDF
PC = Personal Cloud (or how to use your development machine with Vagrant and ...
All about Azure workshop deck
WindowsAzureSDK1.7
vSphere APIs for performance monitoring
Azure virtual machines & Terraform
Open Cloud BBQ - Nano Server
Tech X Virtualization Tips
Hyper-V vNext
PC = Personal Cloud (or how to use your development machine with Vagrant and ...

What's hot (19)

PPTX
WindowsAzureIAAS
PPT
10215 A 03
PDF
The Unofficial VCAP / VCP VMware Study Guide
PPTX
virtualization in cloud technology
PPTX
Hyper-V: Best Practices
PPTX
And the new System Center is here... what's actually new?
PPT
Virtualization Manager 5.0 – Now with Hyper-V Support!
PPTX
VMware Advance Troubleshooting Workshop - Day 6
PDF
Running your Java EE 6 applications in the Cloud (FISL 12)
PPTX
The three aaS's of MongoDB in Windows Azure
PPTX
Upgrading to VMware vSphere 6.0
PPTX
Accelerate your ColdFusion Applications using Caching
PPT
Mmik powershell dsc_slideshare_v1
PPTX
VMware Advance Troubleshooting Workshop - Day 4
PDF
AAI-1304 Technical Deep-Dive into IBM WebSphere Liberty
PPTX
VMware Advance Troubleshooting Workshop - Day 5
PPTX
Virtualization technology "comparison vmware 9 vs virtualbox 4.2"
KEY
Backup virtual machines with XenServer 5.x
WindowsAzureIAAS
10215 A 03
The Unofficial VCAP / VCP VMware Study Guide
virtualization in cloud technology
Hyper-V: Best Practices
And the new System Center is here... what's actually new?
Virtualization Manager 5.0 – Now with Hyper-V Support!
VMware Advance Troubleshooting Workshop - Day 6
Running your Java EE 6 applications in the Cloud (FISL 12)
The three aaS's of MongoDB in Windows Azure
Upgrading to VMware vSphere 6.0
Accelerate your ColdFusion Applications using Caching
Mmik powershell dsc_slideshare_v1
VMware Advance Troubleshooting Workshop - Day 4
AAI-1304 Technical Deep-Dive into IBM WebSphere Liberty
VMware Advance Troubleshooting Workshop - Day 5
Virtualization technology "comparison vmware 9 vs virtualbox 4.2"
Backup virtual machines with XenServer 5.x
Ad

Viewers also liked (20)

PPTX
The Other Side of Linked Open Data: Managing Metadata Aggregation
PPTX
File maker for yap
PDF
"運用"におけるイノベーションを考える
PDF
Realistic Networking in generic multi-site Cloud Deployments
PPTX
Monitoring of distributed app hosted in Azure App Service
PPTX
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
PPTX
祝GA、 Service Fabric 概要
PDF
MRAI, BGP Widthdrawn and Packet Loss
PDF
Reltio: Powering Enterprise Data-driven Applications with Cassandra
PDF
Introduction to NetOpsCoding#3
PDF
Tomasz Kopacz: Architektura i service fabric - jak budować aplikacje w paas v2
PPTX
20150926 uwpストア攻略
PDF
H2O World - Intro to R, Python, and Flow - Amy Wang
PDF
Continuous Integration for Spark Apps by Sean McIntyre
PDF
WordPress tokyo2015 - 公式プラグインでお金を稼ぐことができるか?
PDF
Multi Model Machine Learning by Maximo Gurmendez and Beth Logan
PDF
さくらのクラウド・サービス概要と構成例(第29回 さくらの夕べin徳島)
PDF
Reactive Streams, linking Reactive Application to Spark Streaming by Luc Bour...
PDF
Mastering Customer Data on Apache Spark
PDF
「なんとなく」の壁を越えよう! 〜自信を持ってWordPressを選択するためのヒント〜
The Other Side of Linked Open Data: Managing Metadata Aggregation
File maker for yap
"運用"におけるイノベーションを考える
Realistic Networking in generic multi-site Cloud Deployments
Monitoring of distributed app hosted in Azure App Service
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
祝GA、 Service Fabric 概要
MRAI, BGP Widthdrawn and Packet Loss
Reltio: Powering Enterprise Data-driven Applications with Cassandra
Introduction to NetOpsCoding#3
Tomasz Kopacz: Architektura i service fabric - jak budować aplikacje w paas v2
20150926 uwpストア攻略
H2O World - Intro to R, Python, and Flow - Amy Wang
Continuous Integration for Spark Apps by Sean McIntyre
WordPress tokyo2015 - 公式プラグインでお金を稼ぐことができるか?
Multi Model Machine Learning by Maximo Gurmendez and Beth Logan
さくらのクラウド・サービス概要と構成例(第29回 さくらの夕べin徳島)
Reactive Streams, linking Reactive Application to Spark Streaming by Luc Bour...
Mastering Customer Data on Apache Spark
「なんとなく」の壁を越えよう! 〜自信を持ってWordPressを選択するためのヒント〜
Ad

Similar to Creating a gallery image for Azure marketplace (20)

PDF
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
PDF
Akmal Khaleeq Waheed - Challenge 3
PPTX
Log Analytics by VMware Log Insight
PDF
OpenShift Virtualization - VM and OS Image Lifecycle
PDF
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...
DOCX
Krenel Based Virtual Machine In Centos7
PPTX
WS-013T00A__M02.pptx
PPT
Setting up the hyperledger composer in ubuntu
PPTX
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
PDF
Ibm smart cloud entry+ for system x user guide
PPT
Sdwest2008 V101 F Dpowerpoint Final
PPTX
IBM Cloud Pak for Integration 2020.2.1 installation
PDF
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
PDF
Okd wg kubecon marathon azure &amp; vsphere
PDF
Counterparty
PDF
Netxms install guide
PDF
Kubernetes Story - Day 1: Build and Manage Containers with Podman
PDF
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
PPT
Lessons On Hyper V
ODP
Google Cloud Platform for DeVops, by Javier Ramirez @ teowaki
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Akmal Khaleeq Waheed - Challenge 3
Log Analytics by VMware Log Insight
OpenShift Virtualization - VM and OS Image Lifecycle
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...
Krenel Based Virtual Machine In Centos7
WS-013T00A__M02.pptx
Setting up the hyperledger composer in ubuntu
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
Ibm smart cloud entry+ for system x user guide
Sdwest2008 V101 F Dpowerpoint Final
IBM Cloud Pak for Integration 2020.2.1 installation
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
Okd wg kubecon marathon azure &amp; vsphere
Counterparty
Netxms install guide
Kubernetes Story - Day 1: Build and Manage Containers with Podman
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
Lessons On Hyper V
Google Cloud Platform for DeVops, by Javier Ramirez @ teowaki

More from Alexey Bokov (20)

PPTX
Product Visions and Strategy - crash course for startups
PPTX
Windows containers troubleshooting
PPTX
Monte Carlo modeling in cloud - mc-modeling-sdk
PPTX
CAP теорема Брюера и ее применения на практике
PPTX
Azure web apps - designing and debugging
PPTX
Azure Web App services
PPTX
Azure: Docker Container orchestration, PaaS ( Service Farbic ) and High avail...
PPTX
All about Azure - Kazan
PPTX
Microsoft Azure
PDF
Internet of Things in Tbilisi
PPTX
Azure and web sites hackaton deck
PPTX
Asp.net 5 cloud
PPTX
Tbilisi hackaton intro
PPTX
Azure for retails
PPTX
Azure for IT pro - TechDays Armenia
PPTX
Tech day armenia for developers
PPTX
Alexey Bokov key note - TechDays Armenia 2014
PPTX
Open source technologies in Microsoft cloud - MS SWIT 2014
PPTX
Windows Azure для стартапов
PPTX
Train for trainers event in Warsaw / Intro
Product Visions and Strategy - crash course for startups
Windows containers troubleshooting
Monte Carlo modeling in cloud - mc-modeling-sdk
CAP теорема Брюера и ее применения на практике
Azure web apps - designing and debugging
Azure Web App services
Azure: Docker Container orchestration, PaaS ( Service Farbic ) and High avail...
All about Azure - Kazan
Microsoft Azure
Internet of Things in Tbilisi
Azure and web sites hackaton deck
Asp.net 5 cloud
Tbilisi hackaton intro
Azure for retails
Azure for IT pro - TechDays Armenia
Tech day armenia for developers
Alexey Bokov key note - TechDays Armenia 2014
Open source technologies in Microsoft cloud - MS SWIT 2014
Windows Azure для стартапов
Train for trainers event in Warsaw / Intro

Recently uploaded (20)

PPTX
Sustainable Sites - Green Building Construction
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Well-logging-methods_new................
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
composite construction of structures.pdf
PPTX
Welding lecture in detail for understanding
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
Sustainable Sites - Green Building Construction
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Well-logging-methods_new................
Arduino robotics embedded978-1-4302-3184-4.pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Model Code of Practice - Construction Work - 21102022 .pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Internet of Things (IOT) - A guide to understanding
composite construction of structures.pdf
Welding lecture in detail for understanding
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
UNIT 4 Total Quality Management .pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Strings in CPP - Strings in C++ are sequences of characters used to store and...
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
OOP with Java - Java Introduction (Basics)
CYBER-CRIMES AND SECURITY A guide to understanding

Creating a gallery image for Azure marketplace

  • 1. Create a gallery image for Azure Marketplace Alexey Bokov @abokov
  • 2. Contents • Seller dashboard • Publish dashboard • Create Virtual Machines for Marketplace
  • 3. Getting started : there’s a marketplace
  • 6. And one more : vmdepot.msopentech.com Not really a marketplace But repo for “open sourced” VMs
  • 7. Publishing offer: how it works 1. Company registration as a seller with Microsoft • Completed in the Microsoft Seller Dashboard • Once you register your company, you can continue working in parallel while the verification of your registration is completed by the Seller Dashboard team 2. Build and certify VM image • This step and all subsequent steps are completed in the Azure Publishing Portal 3. Create offer, input marketing content, and define pricing in Publishing Portal 4. Test in staging and go-live Seller portal : Used to register the company information once. Publisher portal : Used to publish and manage the offer. Microsoft Azure Marketplace Publication Guidelines : aka.ms/am-guideline
  • 8. sellerdashboard.microsoft.com Microsoft Seller Dashboard • Used to register the company information once. • The registrant must be a valid representative of the company, and must provide their personal information as a way to validate their identity. • The person registering must use a Microsoft Account that is shared for the company, and the same account must be used in the Azure Publishing Portal.
  • 10. publish.windowsazure.com Azure Publishing Portal • Used to publish and manage the offer. • The same company Microsoft Account that was used in the Seller Dashboard registration must be used here. • Additional users can be added to assist once the master publisher account has been created.
  • 12. Create Virtual Machine for Marketplace Terminology: • SKU (StockKeeping Unit) means VM Image • VM Image contain OS disk + some amount of data disks ( may be zero ) – for each disk it own VHD is required ( even for empty data disk ). • VHD means Virtual Hard Disk • VHDx means another Hyper-V format, not supported by Azure. There’s Convert-VHD tools for make conversion between formats.
  • 13. Add offer 1. Log in to the Publishing Portal (publish.windowsazure.com) using your seller account. 2. Enter the Virtual Machines tab of the Publishing Portal. In the prompted entry field, enter your offer name, and create. Under seller account, enter your namespace. 3. Add any other administrators you want to be able to work with the publishing portal.
  • 15. Define SKU 1. Add a SKU. It will require an identifier, which will be used in the URL. This will need to be unique within your Publishing Profile, but there is no risk of identifier collision with other publishers. 2. Add a summary description for your SKU. This will be read by humans in the UX, so it is advised to make it easily readable. This information does not need to be locked until "Push to Staging". Until then, you are free to edit it. 3. If you are using Windows-based SKUs, follow the suggested links to acquire the approved versions of Windows Server.
  • 17. Common thoughts 1. Your VM image (aka SKU) should works on all existing ( and future) VM sizes – from A0 ( one shared CPU core, 0.75 GB RAM) up to G5 (32 CPU cores, 448 GB RAM ). 2. Data disks can be as large as 1 TB. Data disk VHDs should be created as a fixed format VHD, but also be sparse. 3. When deciding on the disk size, please keep in mind that end users cannot resize VHDs within an image. 4. Data disks can be empty or contain data
  • 18. What’s next 1.Create Linux VHD 2.Create Windows VHD 3.Register VHD in publisher portal 4.Certify it
  • 19. Create Linux VM 1. VHD 2. Azure Linux agent ( waagent ) and required libs/packages 3. Kernel and Logical Volume Manager (LVM) 4. Network and SSH daemon 5. Security tips 6. Generalize image Note: if you use image from Gallery like ‘official Ubuntu’ – just to step 6 ( as soon as image is already well prepared )
  • 20. 1. Create Linux VM : VHD 1. Linux OS VHD: The Linux OS VHD in your VM Image should be created as a 30GB — 50GB fixed format VHD. 2. No, It cannot be less than 30GB. If the physical size is less than VHD size, the VHD should be sparse. 3. Linux VHDs larger than 50GB will be considered on a case by case basis. Documentation : aka.ms/linux-vhd
  • 21. 2. Create Linux VM: waagent and libs 1. The Azure Linux agent (waagent) provides key functions for deploying Linux IaaS deployment in Azure, such as image provisioning and networking capabilities. 2. You can get this agent from repos ( RPM or Deb packages ) : aka.ms/linux-distros 3. Source code: github.com/Azure/WALinuxAgent 1. Copy 'waagent' file to /usr/sbin 2. chmod 755 /usr/sbin/waagent; /usr/sbin/waagent install 3. Agent config is placed here: /etc/waagent.conf 4. Read manual 4. Check latest Linux Integration Services (LIS) driver is installed, current v4.0: aka.ms/lis-v4 5. Magical Kernel Patch for Azure I/O ( usually included in latests distros, take care about non-listed kernels ) 6. Python 2.6+ and pyasn1 ( Abstract Syntax Notation v1) package 7. OpenSLL v1.0+ Azure Linux Agent user guide: aka.ms/waagent-guide
  • 22. 3. Create Linux VM: Kernel and LVM 1. OS has to be placed on single root partition 2. SWAP space (if it needed ) can be created on the local resource disk with the Linux Agent by enable swap in /etc/waagent.conf. It will automatically use the resource disk (which comes with every VM) to create the swap. There's no need to create a disk for it. More info : bokov.net/weblog/azure/configure-linux-in-azure 3. Serial console output must be always enabled even if you not allow any SSH to your VM ( and our support may provide you output from serial console ) 4. Add good enough timeout for mounting cloud based storage device 5. Add this to kernel boot line “console=ttyS0 earlyprintk=ttyS0 rootdelay=300” 6. Do not : • Do not use LVM Logical Volume Manager • Do not use swap on OS or data disk
  • 23. 4. Create Linux VM: network and SSH 1. We recommend enable SSH for the end user, add keep live into sshd_config by ClientAliveInterval settings - acceptable range of ClientAliveInterval is 30 to 235, recommended 180. 2. Networking configuration should use ifcfg-eth0 file and manage it via the ifup/ifdown 3. Make sure that network device is brought up on boot and uses DHCP 4. Do not: • Do not install Network Manager package - it conflicts with waagent. • No custom network configuration and resolv.conf file ( please “rm /etc/resolv.conf” ). • Do not configure IPv6 – it’s not supported yet.
  • 24. 5. Create Linux VM: Security 1. Do classics : install all security patches for your distribution ( sudo apt-get update;sudo apt-get upgrade) / follow distribution security guidelines / clean up bash history 2. Please take care about root - the image should not contain a root password (!!!!!!) – delete it and check /etc/shadow and /etc/passwd. 3. Add firewall i.e. include iptables, but do not enable any rules – default expectation from customer is that they may easily enable it right after VM is started. 4. Do not: • Store your Azure account credentials on VM image (!!!!!) • Do not create default accounts, which remain the same, across provisioning instances • A lot of other stupid things
  • 25. 6. Create Linux VM: Generalize Image 1. OS VHD must be deprovisioned: “waagent deprovision”. This command does: • Removes the nameserver configuration in /etc/resolv.conf • Removes cached DHCP client leases • Resets host name to localhost.localdomain 2. We recommend setting /etc/waagent.conf to ensure the following actions are also completed: • Remove all SSH host keys: Provisioning.RegenerateSshHostKeyPair='y' • Remore root password from /etc/shadow : Provisioning.DeleteRootPassword='y‘
  • 26. Example of /etc/waagent.conf # Azure Linux Agent Configuration Role.StateConsumer=None Role.ConfigurationConsumer=None Role.TopologyConsumer=None Provisioning.Enabled=y Provisioning.DeleteRootPassword=n Provisioning.RegenerateSshHostKeyPair=y Provisioning.SshHostKeyPairType=rsa Provisioning.MonitorHostName=y ResourceDisk.Format=y ResourceDisk.Filesystem=ext4 ResourceDisk.MountPoint=/mnt/resource ResourceDisk.EnableSwap=n ResourceDisk.SwapSizeMB=0 LBProbeResponder=y Logs.Verbose=n OS.RootDeviceScsiTimeout=300 OS.OpensslPath=None Azure Linux Agent user guide: aka.ms/waagent-guide
  • 27. Cool things Linux 1. Custom data and cloud-init – way to inject a script or other metadata into a Microsoft Azure virtual machine at provision time: bokov.net/weblog/azure/configure-linux-in-azure/ 2. Non-endorsed Linux distros : aka.ms/another-linux
  • 28. Create Windows VM 1.Choose base image 2.Run image 3.Customize VM using RDP and PowerShell 4.Configure 5.Generalize image
  • 29. 1. Create Windows VM: choose base image 1. The OS VHD for your VM Image must be based on a Microsoft Azure-approved base image, containing Windows Server or SQL Server. 2. To begin, create a VM from one of the following images, located at the Microsoft Azure Portal (portal.azure.com): 1. Windows Server 2012 R2 Datacenter, 2012 Datacenter, 2008 R2 SP1 2. SQL Server 2014 Enterprise/Standard/Web 3. SQL Server 2012 SP2 Enterprise/Standard/Web 4. SQL Server 2008 R2 SP2 Enterprise/Standard/Web 5. These links can also be found in the Publishing Portal under the SKU page. 3. Main idea is that you may use Windows Server Images published on September 8, 2014 and later.
  • 30. 1. Create Windows VM: choose base image Current list of approved images in publish.windowsazure.com
  • 31. 2. Create Windows VM: run image 1. Actually what you do is create VM under Azure portal, that’s all. 2. Hints: • Choose US-* region for deployment, it would helps during certification process because when you will submit your image for certification team • Do all thing in cloud, create/customize/configure VM on-premise under Hyper-V technically correct and will work if you follow documentation, but we don’t recommend it in most cases. Reality is that using on- premise for this purpose makes whole process much longer and brings very hard-to-find issues when VM is finally goes to cloud.
  • 32. 3. Create Windows VM: Customize VM using RDP and PowerShell 1. RDP is recommended way to develop on your VM.
  • 33. 3. Create Windows VM: Customize VM using RDP and PowerShell 1. You can use powershell to access your VM (download RDP file to c:tools >>Get-AzureAccount >>Get-AzureVM >>Get-AzureRemoteDesktopFile -ServiceName "abokov- ws2012DC" -Name "abokov-ws2012DC" -LocalPath "C:toolsabokov-ws2012DC.rdp" ServiceName Name
  • 34. 4. Create Windows VM: configure 1. The Windows OS VHD in your VM Image should be created as a 128 GB fixed format VHD. If the physical size is less than 128GB, the VHD should be sparse. Base images of recommended Windows Server are already meet this, just don’t charge defaults. 2. Install patches, especially critical and security 3. No configuration should rely on drives other than C: or D:, since these are the only two drives that are always guaranteed to exist. C: is the OS disk and D: is the temporary local disk. 4. Don’t keep your Azure credentials inside images
  • 35. 4. Create Windows VM: generalize 1. Windows images should be sysprep’ed - run command line ( not PowerShell! ), change directory to “c:windowssystem32sysprep” 2. “sysprep.exe /generalize /oobe /shutdown” 3. Remote Desktop Connection will be closed immediately 4. Wait for generalize and shutdown…
  • 36. 4. Create Windows VM: generalize When it finished – go to management panel for VHD URL
  • 37. Deploy a VM from your generalized VHDs 1. Generalized OS VHD from Azure storage account can be registered as a user VM Image with which to test. You cannot directly deploy the VM by providing generalized VHD URL. 2. You need to use the Create VM Image Rest API to register VHDs as a VM Image. 3. There’s two options for that: Invoke-WebRequest or Save-AzureVMIMage
  • 38. Option 1 – Invoke-WebRequest# Image Parameters to Specify $ImageName='myVMImage' $Label='IMAGE_LABEL‘ $Description='My VM Image to Test' $osCaching='ReadWrite' $os = 'Windows' $state = 'Generalized' $osMediaLink = 'http://mystorageaccount.blob.core.windows.net/vhds/myOSvhd.vhd' $dataCaching='None' $lun='1' $dataMediaLink='http://mystorageaccount.blob.core.windows.net/vhds/mydatavhd.vhd' # Subscription Related Properties $SrvMngtEndPoint='https://management.core.windows.net' $subscription = Get-AzureSubscription -Current -ExtendedDetails $certificate = $subscription.Certificate $SubId = $subscription.SubscriptionId $body = "" + "" + $ImageName + "" + "" + $Label + "" + "" + $Description + "" + "" + "" + $osCaching + "" +"" + $state + "" +"" + $os + "" +"" + $osMediaLink + "" + "" "" + "" +"" + $dataCaching + "" + "" + $lun + "" +"" + $dataMediaLink + "" + "" + "" + "" $uri = $SrvMngtEndPoint + "/" + $SubId + "/" + "services/vmimages" $headers = @{"x-ms-version" = "2014-06-01"} $response = Invoke-WebRequest -Uri $uri -ContentType "application/xml" -Body $body -Certificate $certificate -Headers $headers -Method POST if ($response.StatusCode -ge 200 -and $response.StatusCode -lt 300) { echo "Accepted" } else { echo "Not Accepted" }
  • 39. Option 2 - Save-AzureVMImage Save-AzureVMImage –ServiceName “myServiceName” –Name “myVMtoCapture” –OSState “Generalized” –ImageName “myAwesomeVMImage” –ImageLabel “This is my Virtual Machine Image” -Verbose
  • 41. Generate SAS URI 1. The SAS URI created should adhere to the following requirements • When generating SAS URIs for your VHDs, List and Read-Only permissions are sufficient. Do not provide Write or Delete access. • The duration for access should be a minimum of 7 business days from when the SAS URI is created. • To avoid immediate errors due to clock skews, specify a time 15 minutes before the current time. 2. You can use AzureStorageExplorer tool : AzureStorageExplorer.codeplex.com
  • 44. AzureStorageExplorer: save SAS URI to publisher portal
  • 45. Certification process This process includes running a special certification tool, uploading the verification results to the Azure container where your VHDs reside, adding an offer, defining your SKU, and submitting your VM Image for certification. 1. Download Certification tool 2. Connect to your image 1. Linux : choose SSH authentication ( DNS + username/password) 2. Windows : use FQDN ( Fully Qualified Domain Name + username/password ) 3. Run tool 4. Send results to Microsoft (contact
  • 47. Certification process – tests execution
  • 48. Certification process – true anywhere
  • 49. Certification process – true anywhere
  • 52. Certification process – final step More details: aka.ms/azure-cert
  • 53. Summary • There’s some formalities with registration • Create VM based on VM images from Azure gallery is quite easy • Certification process took some time • Nevertheless it might took time to make publishing, keeping in touch with folks from Microsoft helps a LOT