Introduction:
All virtual machines are deployed with just the OS setup at a basic level, to extend the abilities of a virtual machine you can use virtual machine extensions.
You can use a pre-existing virtual machine hard drive to create a new virtual machine.
In this Lab exercise, you will
- Start with a pre-existing VNET with one Virtual Machine (Standard IP, NSG). Then, you will complete the below tasks.
- Create a Storage Account
- Create a Blob Container
- Create and Upload PowerShell Script file to Install IIS
- Add Extensions to Existing Virtual Machine
- Select Install-IIS.PS1 file from Storage account
- Add Network Watcher extension agent
- On completion of install
- Test access to web page (Fails, Port not open)
- Add port rule to NSG to Allow web traffic
- Shutdown Virtual Machine VM1
- Wait for Status to Be Stopped(deallocated)
- Snapshot Disk
- Create Managed disk from snapshot
- Select Disks
- Create New Virtual Machine from Managed Disk
- Start both Virtual Machine’s
- Remote into new Virtual Machine and Change Name to TestVM2 (Works because of Basic IP Address)
- Edit default Web page to read TestVM2
- Test access to both Virtual Machines Web Pages by individual Public IP Addresses
- TestVM1 works but TestVM2 fails
- Add a rule to the NSG
- Re-Test access to TestVM2 web page