0

I'm trying to create and bootstrap a Windows VM in Azure using knife-azure. I initially tried using a Public Win 2008 r2 image, but quickly found out that winrm needs to be configured before this can work. So, I created a VM from that image, configured winrm as per these instructions and captured the VM.

The problem is that the image does not show up when executing knife azure image list. When I try creating the server with the image name from the Azure portal, it complains that it does not exist. I'm running Ubuntu, so I tried the Azure cli tools and it doesn't show there either. I installed Azure PS in a Win 8 VM and then it shows up. Feeling encouraged, I installed Chef and knife-azure in the Win 8 VM, but it doesn't show up there either.

How do I get my User image to show in knife azure?

1 Answers1

0

The way I got a User image to show was not to use the Azure UI to "Capture" the image, but rather using the Azure xplat-cli. Something like:

azure vm image create \
--os windows \
--location "West US" \
--description "an image i winrmed and sypreped" \
my_image \
my_vhd_url

Where my_image is the name of the image I want to create; my_vhd_url is the VHD URL of the VM disk that you're baking an image from.

I'm pretty sure that the Azure xplat-cli will very soon support seeing images created in the UI, as will knife-azure.