Microsoft Azure: How to create a Windows 2019 server image. - ASM , Rockville , Maryland

Microsoft Azure: How to create a Windows 2019 server image.

The goal of this lab is to take image of VM that we have for Windows 2019 server that has IIS (webserver) then use that image to bootup exact VM that has same IIS and Webserver on it.

This lab will be in three parts

Part 1) Creating a VM ( Windows 2019 server) then installing IIS ( Webserver) and creating a host file called index.html on c:\intetpub\wwwroot\ index.html

Part 2) Run Sysprep on the Machine you created on Part one and make sure you chose Shut down

Part 3) Then go to Image you created and take capture of it ; and create a new VM called it VAWebserver2

When sensitive information is stored on the hard drive of a machine that is to be surplussed or transferred to another individual or department, it is therefore imperative that extra measures be taken to wipe clean the hard drive before the computer leaves your area of responsibility. This document describes some common methods and software to assist you with the sanitization process. It also includes links to articles that provide detailed technical descriptions of what occurs during this process.

Data destruction software, however, truly does erase the data. Each data destruction program utilizes one or more data sanitization methods that can permanently overwrite the information on the drive.

If you need to remove all traces of a virus or you’re planning on recycling or disposing of your hard drive or computer, wiping your hard drive using data destruction software is the best way to protect yourself.

Part 1: Creating a VM

Step 1) Go on top Add VM ; then pick your subscription and your resources group

Step 2) Chose Windows 2019 server and pick Us-east region and pick the rest of default value

Step 3) Name= VAWebserver1

           username = HamedMoghaddam

           Password= Pa$$w0rd12345

           Inbound port RDP=3389 and http=80

Step 4)  For disk ; user all the default value

Step 5)  For Networking Pick VAVnet1 ; subnet pick Pubic Subnet =10.0.1.0/24

Step 6)  Rest of value ; make it as default (No Load Balancing)

Step 7) Management and Advance Tab ; leave as default ; then click Review and Create

Step 8) When it finished; it will create these new resources:

VAWebserver1-ip     Microsoft.Network/publicIpAddresses

VAWebserver1-nsg   Microsoft.Network/networkSecurityGroups

Disk   VAWebserver1_disk1_342ae792f7294622a67c3afd6baa6554

vawebserver1471  Network interface

Step 9) Now I will RDP to my VM; install IIS (via Server manger) then I go c:\inetpub\wwwroot and I will create a file name called index.html

Such as

<HTML>

This is Hamed VAWebserver1

</HTML>

Then saved as index.html

Since the file extension is hidden; I will go to search box on windows and search for file older option ; then will go to view tab and uncheck the hidden extension ; then I will rename file from index.html.txt to index.html

Step 10) Then I go to my laptop and I copy and paste the public IP address ; and I should be able to see the content of my homepage ; now if you do not see it ; you need to make sure your security group has inbound http allowed in. and Also make sure your security group is associated with Subent1 ( that was 10.0.1.0/24)

Part 2: Creating SysPrep

Step 11) go to VM and go to run and type this

%WINDIR%\system32\sysprep

Step 12) this will take to Sysprep folder; double click on it

Make sure click OBE (first choice) the check mark Generalize it  ;the chose to Shut down

Step 13) When you do above Steps ; it will make it as a new VM with a new SID and also it will shut down the Server ; so you will lose connectivity VIA RDP.

Step 14) Now Go back to Azure Portal ; then you will see your VM has been Stopped ( status) then Click Capture

Step 15) Before taking image of it; when I go on top and search for image ; I will see no images in here.

On Image page chose (Not to share it on image library)

Step 16) Give name =Image of VAWebserver1 ; Remember we can delate the original VM since you will not be able to bootup

Step 17) No tag; then click review and create it.

ddddddddddddddddd

Part 3: Build a New VM from the Image we Have

Step 18) Now I go on Top and search for the images; and I will see my image called VAWebserver1 image ; I will click on it ; then I will choose to create a NEW VM from this image

Step 19) leave all the default; then give name VAWebserver2

Step 20) for the port I can port None ; since later on I can use the security group I had called VASecuritygroup ( that allows http and RDP) I will do this on Networking Tab.

Step 21) Username =hamedmoghaddam

              Password=Pa$w0rd12345

Step 22) License type =Windows server

Step 23) On the Networking tab; pick your VNET ; then pick correct Subnet 10.0.1.0/24 then for NIC security group give none; as we see it will pick the security group we has associated with Subnet :

[ The selected subnet ‘subnet1 (10.0.1.0/24)’ is already associated to a network security group ‘VAWebserver1-nsg’. We recommend managing connectivity to this virtual machine via the existing network security group instead of creating a new one here. ]

Step 24) Rest of Value in management and tag leave as default; click Review and create.

Step 25) Now after it finished when I go to All resources I will see it has created these resources; and I copy and paste the Public IP address of VAwebserve2 I will be able to see same content on my websites.

VAWebserver2-ip  Public IP address

vawebserver2609   Network interface

Disk  VAWebserver2_disk1_93f13652f3904cb2859f1899c4ecd46c

VAWebserver2   Virtual machine

Product categories
Microsoft Azure Fundamentals – is a category of technical certifications offered by Microsoft for beginners and professionals who run enterprise architecture programs. It covers deployment of Azure systems, best practices, and many other topics.