Azure, Cloud Computing

5 Mins Read

Fix a faulty Virtual Machine Using Nested Virtualization in Azure

Voiced by Amazon Polly

Introduction

Azure is a platform for open-source cloud computing. It offers numerous cloud services, such as computation, analytics, storage, and networking. These services are available for users to choose from while creating and scaling new apps or using the public cloud to operate existing applications.

You can design your virtualization environments using nested virtualization, which permits you to run virtual machine (VM) instances inside other VMs.

If you have virtual machines (VMs) that cannot be run on Compute Engine, such as a disaster recovery system for an on-premises application that utilizes VMs to fail over to Compute Engine VMs. You could save time by using nested virtualization instead of porting your VMs to Compute Engine.

Step-by-Step Guide for troubleshooting faulty Virtual Machines and the Creation of Rescue Virtual Machines

Step 1: Sign into the Azure portal, In the VM Blade Copy the Public IP and RDP to the VM. If you will find a similar error as shown in the below Image, then follow step 2.

step1

Step 2: Creation of the snapshot using the OS Disk and the snapshot to create the new OS disk.

  1. In faulty VM and on the left side of VM Blade find Disks.
  2. In Disks click on the description below the Disk name.
  3. After clicking on the OS disk, Create a snapshot.

step2a

step2b

4. After creating the snapshot in the snapshot directory, Create a new disk with the same configuration.

step2c

step2d

Step 3: Creation of the Rescue VM and attach the disk created.

  1. Create a rescue VM with no redundancy required in the availability zone.
  2. Choose a windows server data center, with a min of Dv3 or Dv4 core processor.
  3. Rescue VM should be in the same location as the Storage account of the faulty VM resides.
  4. Select the RDP port and all the licenses required.
  5. Attach the data disk created using a snapshot to the VM.
  6. Keep all the settings to default.
  7. Review and create the VM after validation is successful.

step3a

step3b

step3c

step3d

Step 4: Install Hyper-V in the rescue VM.

  1. RDP to the Rescue VM.

step4a

2. Inside VM, search for disk Management.

3. In disk management, right-click on Disk 2 and make it offline.

step4b

step4c

4. In server Manager, Select Manage -> Add Roles and Features.

step4d

5. In the installation type select Role-based or feature-based installation.

step4e

6. In server roles, select Hyper-V, click install, and keep others to default. Proceed with next.

step4f

7. On the confirmation page, confirm the Check box to restart the server automatically and install.

step4g

8. It will take a few minutes to restart, there will be a connection lost to the VM, so you need to RDP again to the server.

Step 5: Create a new VM in the Hyper-V manager and attach the faulty disk.

step5a

  1. Open Hyper-V manager and create a New VM.
  2. Type the name of the VM and select next.
  3. Select the Generation based on the faulty VM.
  4. Keep all the settings to default and select virtual Hard disk to attach later.

step5b

step5c

5. Right-click on the VM we created and select the setting.

6. For Gen 1 select IDE Controller 0 and SCSI Controller for Gen 2.

step5d

7. Double-click on the VM and start IT, this will take some time.

8. Use the credential of the faulty VM to login.

9. In the VM run the command Regedit.

step5e

10. In Regedit, Navigate to HKEY_LOACL-MACHINE -> SYSTEM -> CurrentControlSet -> Control -> Terminal Server -> Winstation -> RDP -> In RDP change port number to 3389.

step5f

Step 6: Swap the OS disk of the faulty VM with the newly created OS disk.

  1. Shut down the VM in the Hyper-V manager.
  2. remove the repaired OS disk.
  3. Replace the OS disk used by the VM with the repaired OS disk.
  4. RDP to the faulty VM.

step6a

step6b

Customized Cloud Solutions to Drive your Business Success

  • Cloud Migration
  • Devops
  • AIML & IoT
Know More

Conclusion

Nested Virtualization allows you to run Virtualization on a Virtual Machine. With the release of Windows Server 2016, features were added to Azure and Hyper-V virtual machines that can aid in problem-solving. Here when a client or customer working remotely faces RDP issues it will be difficult to resolve but with the help of Nested vitalization, we can repair a faulty Virtual machine easily.

Get your new hires billable within 1-60 days. Experience our Capability Development Framework today.

  • Cloud Training
  • Customized Training
  • Experiential Learning
Read More

About CloudThat

CloudThat is also the official AWS (Amazon Web Services) Advanced Consulting Partner and Training partner and Microsoft gold partner, helping people develop knowledge of the cloud and help their businesses aim for higher goals using best-in-industry cloud computing practices and expertise. We are on a mission to build a robust cloud computing ecosystem by disseminating knowledge on technological intricacies within the cloud space. Our blogs, webinars, case studies, and white papers enable all the stakeholders in the cloud computing sphere.

Drop a query if you have any questions regarding Nested Virtualization and I will get back to you quickly.

To get started, go through our Consultancy page and Managed Services Package that is CloudThat’s offerings.

FAQs

1. What happens when you use Dv2 size for nested virtualization?

ANS: – Nested virtualization requires a large amount of size and a lesser size as Dv2 will stop the server when we install Hyper-V.

2. Can we Install nested virtualization in the Linux server?

ANS: – Yes, we can install nested virtualization in the Linux server.

3. Should the OS Disk of the faulty and rescue VM reside in the same region?

ANS: – Yes, they should be in the same region, and it will be better to choose no infrastructure redundancy in AZ.

WRITTEN BY H S Yashas Gowda

Yashas Gowda works as a Research Associate at CloudThat. He has good hands-on experience working on Azure and AWS services. He is interested to learn new technologies and tries to implement them.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!