It is important that we test the image we’ve created before publishing. Otherwise the image may fail certification checks or simply not function as desired.
Test we can create a VM from the virtual machine image
The first and simplest test is to confirm that we can create a new VM instance based on the work we did in the last lab.
To finalise the test:
- Confirm that browsing to the IP address of the new VM displays the NGINX welcome page - NOTE you may need to add a rule on the NSG to allow incoming traffic on Port 80.
- SSH into the new VM and confirm the presence of a
/tmp/users.txtfile with a creation time matching the last reboot
Run validations on the virtual machine
Prior to submitting a VM Offer for certification (publishing), you should run a set of validation tests against a specialised VM created from the generalised VM image. This can identity early issues that would otherwise result in a certification failure.
We can use the VM we created in the previous step.
There are two ways to do this:
Use the Certification Test Tool for Azure Certified
This is a Windows application that walks through the process of connecting to the VM, running a series of tests and producing a report. You can create a small Windows VM in Azure and install it on that to test. We will use this approach for the lab.
Use the Self-Test API
This is an API hosted in Azure. You send a POST request to the API with details of the machine to test and it returns a test report. You need to create an AAD app registration to authenticate with the API. You can find more details here. There is an excellent walkthrough video here which also bridges some of the gaps in the documentation.
Install the Certification Test Tool for Azure Certified on a Windows Machine. Download Link
Run the Certification Test Tool and enter the required information (test name, platform, auth type, DNS name for the VM to be tested etc)
On completion you will be presented with a set of test results. Review the results and ensure you take any necessary action before submitting a final image for certification.
In these labs we will be submitting a VM offer to the marketplace but only to the preview stage for testing purposes. We will not submit for final certification.
While attention should be paid to the results of the report, it is not necessarily required to fix every issue for the purposes of completing the lab.
- Test a virtual machine image
- Create a managed image of a generalized VM in Azure
- Create an image from a VM
Help us improve
Azure Citadel is a community site built on GitHub, please contribute and send a pull requestMake a change