Azure VM
- Lets create a VM and observe the other resources created
- When an azure vm is created the following resources are required/created
- Virtual Network and Subnets
- Network Interface
- Public ip address
- Network Security Group
- Disk
- Storage Account (Optional)
Azure VM Image
- Lets try to find images that we can use to create Virtual Machines
- Azure VM Images are offered using
- Azure Marketplace: Has the VM Images maintained by microsoft and also Third parties
- We can also create a vm image and make it available in marketplace, if we have any offerings.
- VM Images created from Marketplace might have extra software usage costs in addition to vm costs (These costs are also hourly)
- Some Marketplace vm images allow you to bring your own license.
- Every Marketplace in Azure has the following attributes
- Publisher: Organization that created the image Examples: Microsoft, Canonical, RedHat
- Offer: The name of the related images created by publisher. Examples: Windows Server, Ubuntu Server, Centos
- SKU: A particular instance of an offer. Examples: 2016-Datacenter, 18.04-LTS, 7
- Version: The version number of image SKU
- Refer Here for linux vm images and Refer Here for windows vm images
- Lets create an ubuntu server and install lamp in it Refer Here for installation steps
sudo apt-get update
sudo apt-get install apache2 -y
sudo apt-get install php libapache2-mod-php php-mysql -y
sudo apt-get install -y php-cli
sudo -i
echo "<?php phpinfo(); ?>" > /var/www/html/info.php
exit
sudo systemctl restart apache2
- After this navigate to
http://<publicip>/info.php
- At this moment we have a vm with some software stack running in it. If we want to make this software stack reusable by many users better create a vm image with that
- Lets have a look at vm image creation options
- Shared Gallery
- Managed VM Image