Reputation: 117
I have created a vm image from a customized virtual machine running in azure environment. Now I want to use that image as the base operating system for my solution in azure market place. How can I reference this image in the mainTemplate for the market place. When i check the image resource, I dont see any source blob uri. There is a resource ID, but I dont think it will be accessible outside my subscription.
Thanks
I have gone through the documentation. There was mentioned that the image should be on the blob storage. But I cannot figure out how to move the image from my resource group to storage.
Upvotes: 0
Views: 1263
Reputation: 8737
You first need to publish the image in the Azure Marketplace:
Once you do that you can reference the image in the template via the PublisherID, OfferId, SKU and Version
For marketplace images you need to set the values on the plan object and the imageReference object and just for fun we've made the property names different in each.
EDIT:
Ok to use the base image cross tenant in the marketplace you need to publish a VM image - you will, through the process need to turn your disk into a blob (if using a managed disk for your base image) and that blob would be provided to the marketplace:
When you create that VM offer, you can set it as public, private or hidden. The difference between private and hidden (public should be obvious ;)) is that private will make the image available only to subscriptions you whitelist. Hidden means that the image will not show up when users browse or search vm images but they can be used in an Azure Application offer (i.e. template) in the marketplace. To reference it there you'll need to add a plan object to your VM resource, this sample:
Will give you an idea of how to do it.
Final note on "hidden" - while a user can't go to the portal, browse/search, find your vm image, it is available to api callers - so still possible to deploy outside of your template for folks that want to find it (and that's intentional). If you really need more "security" than that you'd have to make it a private offer.
That help?
Upvotes: 2