Why does the legacy PXE not does work on Generation 2 VM?

A Hyper-V Generation 2 VM is similar to a workstation running UEFI workstation and as such cannot communicate with legacy PXE, but with UEFI boot images.

A VM configured with UEFI will use bootx64wdsmgfw.efi on the WDS server when starting the boot process while a legacy boot will use bootx64wdsnbp.com.

If your network is configured to deploy boot images using legacy methods, this will require you to configure the hardware of the virtual machine. See the link for how this is done. https://techdirectarchive.com/2020/01/19/how-to-setup-a-vm-via-pxe-boot-on-a-generation-1-vm-hyper-v/

How to setup a VM via PXE boot on a Generation 2 VM – Hyper-V

Preboot execution environment (commonly known as PXE) is used to boot a device or virtual machine over a network. You can use PXE to achieve the following scenarios and this is used to remotely install a guest operating system over a network without needing the operating system installation media.

Hyper-V currently has two generations of VM hardware which are;
Generation 1: These VMs has a legacy version of Hyper-V, and has a little bit of overhead when it comes to using to PXE boot because it uses the legacy BIOS, while
Generation 2: Hyper-V machine is a UEFI-based VMs.

Note: A machine configured with UEFI will use bootx64wdsmgfw.efi on the WDS server when starting the boot. A legacy boot will use bootx64wdsnbp.com.

The generation of the Hyper-V virtual machine matters, because PXE uses different boot files depending on if the machine boots either using Legacy BIOS or UEFI. It is recommended to use Generation 2  VMs and if you do not feel the need to, this could be because you have not yet enabled UEFI in your environment.

See the link on why to choose Generation 1 or 2 http://bit.ly/379FwMz

Generation 2 VM Installation
– In the Installation Option
– Select Install an Operating System later

Click on Next or finish.

Note: When you click on next, it will show you the summary screen of the VM Installation, next click on finish Hardware configuration to support PXE
– Ensure you have your network at the top.

Ensure under Network Adapter
– Under Advanced features that the checkbox is selected for Protected Network (This absolutely depends on your environment need).

For how this is done on Generation 1 Hyper-V, see the link for how this is done https://techdirectarchive.com/2020/01/19/how-to-setup-a-vm-via-pxe-boot-on-a-generation-1-vm-hyper-v/

Note: Depending on your environment, you have to set a Static MAC address that will enable the VM search for the WDS server on the network.

Now connect to the VM

When this process completes, deployment success will be displayed as shown below.

Vital Azure Commands and Usage

Below are some important Commands to manage Azure resources. Mastering these commands will make administering your tasks on Azure flawless. For more commands not discussed here, take a look at the Microsoft documentation: https://docs.microsoft.com/en-us/cli/azure/reference-index?view=azure-cli-latest

az account listGet a list of subscriptions for the logged-in account.
az account list –output tableThe table format prints output as an ASCII table, making it easy to read and scan.
az group list List resource groups.
az group list –output tableThe table format prints output as an ASCII table, making it easy to read and scan.
az resource list
List resources.
az resource list –output tableThe table format prints output as an ASCII table, making it easy to read and scan.

These commands can be run with optional parameters to list the output formats for Azure CLI commands as we have seen above. Here are the various output format available at the time of this writing.

– TSV output format
– YAML output format
– Table output format and
– JSON output format

See the link below for more information https://docs.microsoft.com/en-us/cli/azure/format-output-azure-cli?view=azure-cli-latest

Filtering only resources related to an application

az resource list 
    --resource-group learn-1c01caa9-34c5-4e85-bd3e-e27861f2910b 
    --resource-type Microsoft.Web/sites

How to Stop an application in a resource group

az webapp stop 
    --resource-group learn-1c01caa9-34c5-4e85-bd3e-e27861f2910b 
    --name <web app name>
@Azure:~$ az webapp stop --resource-group learn-1c01caa9-34c5-4e85-bd3e-e27861f2910b     --name firsttestazur

Accessing the URL of the stopped app will display the following errors.

How to Start a WebApp in an Azure Resource Group via Azure CLI

le@Azure:~$ az webapp stop     --resource-group learn-1c01caa9-34c5-4e85-bd3e-e27861f2910b     --name firsttestazur 

Now the website will be reachable again.

How to Scale Up and Out on Azure

What does the term scaling up and scaling out mean?

Scaling up, or vertical scaling means to increase the memory, storage, or compute power on an existing virtual machine. For example, you can add additional memory to a web or database server to make it run faster. The reverse is referred to as Scaling down.

Scaling out, or horizontal scaling means to add extra virtual machines to power your application. For example, you might create many virtual machines configured in exactly the same way and use a load balancer to distribute work across them.

Note: The Cloud is elastic and scaling up and down is possible.

To Scale Up, that is to increase the memory, storage, or compute power on an existing virtual machine, follow these steps below.

To Scale-Out which means to means to add additional virtual machines to power your application. Follow these steps.

Click on Scale-Out (App Service Plan) under settings
– Click on the scale Out (App Service plan as shown below) and follow the steps

See link for more info: http://bit.ly/39Xe1Yi

How to create a website hosted in Azure

Here are the steps for hosting a website in Azure.

Open the Azure Market Place Window

Type WordPress and this will display all WordPress resources

Select one and create

Next, you’re presented several options to configure your deployment. Enter the following information.

Selected Database is my SQL In-App, under the App Service Plan and Location

Click on Ok

– Click on apply
– Next Click on create. And this will be validated and if everything is fine. The WebApp will be created.

– To see the status of this WebApp, click on the notification bell (menu) and the progress will be displayed.

Note: The status changes to a green check as each component in the deployment completes.

You can pin this to the bar or click go-to resources.

Access the URL and it will prompt you to install WordPress and proceed with your customization of WordPress  in Azure.

Creating Virtual Machines (VMs) in Hyper-V for Windows Server Active Directory and Azure Active Directory Integration – PTA and ADFS Environments

Part A – Infrastructural Requirements for deploying and testing Pass-Through Authentication (PTA)

Created four VMs in Hyper-V Server

  • AzureDC1
  • AzureDC2 and
  • Two (2) Windows10 clients for testing

1. Assign memory to easy VM of 4096MB
2. Assigned Virtual Hard Disk Size of 100 GB
3. Installed Operating System “Windows Server 2019 Standard (desktop Experience) and Windows 10 Enterprise for testing.

Part B – Infrastructural Requirements for deploying and testing AD FS

Created five (5) VMs in Hyper-V Server

  • AzureDC1
  • AzureDC2
  • AzureADFS (for ADFS testing only)
  • Two (2) Windows10 client for testing

1. Assign memory to easy VM of 4096 MB
2. Assigned Virtual Hard Disk Size of 100GB
3. Installed Operating System “Windows Server 2019 Standard (desktop Experience) and Windows 10 Enterprise for testing.

In this project, I will be setting up two (2) test Domain Controllers (Dc), Windows 10 PCs for the test and ADFS Server to ensure users are authenticated on Premise.

VMs Setup in Hyper-V environment
– Click on New under Actions on the Hyper-V Manager window

– This will open the window below

– Click on next and specify the VM name as shown below

– Under the Specify Generation, Select generation 2 because it provides better virtualization features etc., as shown below

– Under Assign Memory, enter your desired memory

Note: You can decide to also assign Dynamic Memory for this virtual machine. Under Configure Networking, select the right network adapter. This depends if you also want the internet to connect or just want for the VMs to be able to communicate with each other.

From the drop-down menu, select the right network adapter.
Note: You can decide to leave it as not connected

– Under “Connect Virtual Hard Disk”, enter your desired size in GB and click on next.

– Under the installation option, select install an operating system from a bootable image file and browse to it.

– Now finish the New Virtual Machine Wizard

– Now the virtual machine creation is complete.

Part C – Continue with the Operating System Installation
– This will display the VM in the list of Virtual Machines as shown below
– Right-click on the created VM

Note: Only follow this step if you wish to use a static ACA Address, otherwise go straight and “Connect” to the server using the next step below.

Click on settings, locate the Network Adapter and expand it and click on the Advanced features.

Here you can select static and enter the MAC Address. Finally, click on Apply and Ok.

Click on connect (by right-clicking on the VM)

– Click on start and select any key to boot as shown below

– This will lunch the Windows setup window

– Follow
– This will open the menu showing that status of “Installing Windows”

– When this finishes, it will prompt you to enter the Administrator Password as shown below.

Part D: Configure Networking and Other Server Basic Setup
– Open the Server Manager
Note: This opens automatically most times.

– Set the IP parameters (Static)
Note: Based on your need, this could also be dynamic if you have a DHCP Server.
– Set the Server name

See this link below on how to setup the domain controllers needed to support this deployment https://techdirectarchive.com/2020/01/08/how-to-setup-dc-setting-up-the-two-domain-controllers/

Creating a Checkpoint of a VM in Hyper-V

What is a Checkpoint: Checkpoint makes a snapshot of the virtual machine and virtual machine memory state, but is not a full backup of the VM.

 - Right click on the VM or on the right pane under the Server settings,
 - Click on Checkpoint

– The status of the machine will be displayed as creating Checkpoint and the percentage will be displayed as well.

and under the Action pane (under the server settings, you will have the ability to cancel creating Checkpoint.

After the successful creation of the checkpoint, the virtual machine checkpoint window pops up, stating the Production checkpoint is created as shown below.

Now you will be able to view the checkpoint created under the checkpoint window