2
votes

I'm using the Jenkins azure-slave plugin, in attempt to configure slave nodes on Azure. I would like to create a custom VM to run CI. The steps I follow generally from

https://github.com/jenkinsci/azure-slave-plugin http://www.codeisahighway.com/how-to-capture-your-own-custom-virtual-machine-image-under-azure-resource-manager-api/ https://azure.microsoft.com/en-us/documentation/articles/azure-slave-plugin-for-jenkins/

In summary I would do these steps: 1. Create a VM with Windows 10 and Visual Studio 2015 Community. I have an MSDN subscription so the VM is created with this subscription. 2. Connect and install Java 3. Follow the instructions above to capture the image. 4. Follow the instructions above to configure Jenkins

Step 4 is where I hit my problem, when entering the parameters and then verify, the problem is:

1: Failed to validate the provided image family or image ID. Make sure to reference a image that is available.

I enter the image name in the Image Family or ID, trying different things, but still no luck. For example:

The VM name is WindowsCi0, by the way.

Any help appreciated.

Some additional information:

  1. I used Bitnami to launch the Jenkins master to Azure. By default, it created a "classic" storage account and within a container called "bitnami-images". Inside this container, there is an image named "bitnami-bitnami-jenkins-1.643-0-eastus-MY7DZGQ".

  2. If I reference the Bitnami image in Jenkins and click "Verify Template", it is successful.

  3. I went and perform a blob copy of my captured vhd file to the "bitnami-images" container. Jenkins still cannot validate it.

I noticed the image from Bitnami does not have the ".vhd" extension while the captured one does. Is there something in addition that must be done on he .vhd?

1

1 Answers

2
votes

I'm in the same boat as you.

My guess is the Azure plugin is really for the classic Azure and not the new Resource Manager approach.

I've seen all the same guides as you, but none of them show how you could create a new Resource Manager VM from a custom image through the portal.

You appear to be mixing the Classic and Resource Manager approach, which won't work.

Classic does have the option to create custom VM images, which I think would solve your problem, but Classic is slowly but surely going away.

If this talk of Classic and Resource Manager is confusing, read this: what is the difference between virtual machine classic and virtual machine in azure?

Just noticed the GitHub repo for the plugin as a branch for ARM development: https://github.com/jenkinsci/azure-slave-plugin/tree/ARM-dev