Genesys Source

How-to Create an Azure Marketplace SKU VHD URL

How-to Create an Azure Marketplace SKU VHD URL

The task is simple, fill in the fill in the Virtual Machine Images -> OS VHD URL box on for your new Azure Marketplace VM offer.

The tools are good, the steps are relatively few…but the outdated documentation take a toll on any cloud provider. This quick write-up is an attempt to simplify the Azure Certification for Virtual Machines process

Step 1: Create a UNMANAGED(!) VM, to a finished state

Important: This is your VM that will be released to production. This VM will need to be backed up and snapshotted regularly.

1. Install VM UNMANAGED VHD disk on a Storage BLOB

2. Customize VM, to prepare it to the state you wish your customers to see.

3. Install Windows Updates.

4. Setup Backup

5. Snapshot

Tip: Rely on the Default folder to persist files (i.e. Desktop icons.)

Tip: Rely on C:\ folders to persist files. I.e. C:\Docs, C:\WebSites.

Tip: Setup data drives to precede the CDR drive. I.e. The SQL Server F:\ drive gets renamed to E:\. Solved by pre-configuring as E:\.

Step 2: Create your VM Image template

WARNING! Snapshot and Backup VM…before we delete it!

1. Snapshot and Backup the VM for good measure. Restoring will be how we fix this VM and re-release.

Yes, the VM will be unusable after this…just come to terms with it.

2. In CMD (Administrator):  Sysprep /generalize /shutdown /oobe 

3. Convert Unmanaged BLOB\*.VHD to a VM Image

4. More Services -> Compute -> Images -> Add Image -> BLOB VHD

Precaution: SQL VMs, be careful that the F:\ data drive doesn’t change drive letters…SQL Server service won’t start.

Step 3: Create test VM from your image template

1. Create a final test-VM from the VM Image

2. Images -> VHD Image -> Create VM. Forces MANAGED, that’s ok. The Step 1 VM is the production copy.

3. NSG: Reconfigure all custom ports

4. Test VM

Step 4: Restore, Fix on Step 1’s VHDs and Go-To Step 2

1. Restore snapshot, or backup. It was true, your VM isn’t functional without a restore.

2. Start VM

3. Fix

4. Go-to Step 2, and try again!

Step 5: Publish to Staging

1. Install Microsoft Azure Storage Explorer (StorageExplorer.exe)

2. Authenticate to your azure account, and subscription. You will see all storage containers.

3. Navigate to the VHD storage BLOB, from Step 1.

4. Right-Click -> Get Shared Access Signature

5. Copy/Paste the COMBINED URL and Querystring to the Azure Marketplace publish portal, under the VHD URL of your SKU.

5. Click Publish to Staging

Step 6: Run Certification Tool (optional)

Involves configuring one-time ports on your VMs, and running WinRM om your VMs.

Refer to:

Step 7: Publish to Live!

1. Log onto the publisher portal

2. Go to Publish

3. Click Request Approval for Publish to Production

For More Info… (The “Help link”):

How-to Capture an Azure VM Image (Very outdated, but has critical detail):

Leave your comment