How to access to the Windows compilation VM
search cancel

How to access to the Windows compilation VM

book

Article ID: 298478

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

In some cases, you may need to access to the Windows compilation VM for troubleshooting purposes. Due to security reasons, BOSH does not set any default password to access the Windows compilation VM.

This article is going through different methods for accessing the Windows compilation VM on a vSphere, GCP, AWS, and Azure environment when using Windows stemcell 2019.7+

Note: To go through the following instructions, make sure you have two BOSH cli terminals and your IaaS GUI open. You need to act quick. You may have only a few minutes for the compilation VM to fail before BOSH automatically deletes the compilation VM.


Environment

Product Version: 2.5
OS: Windows server

Resolution

1. Enable the two following settings in Operations Manager (Ops Manager):

BOSH director tile > Director config > select "Keep Unreachable Director VMs"
PASW tile > VM options > select "enable BOSH-native SSH support on all VMs"


2. Open two different BOSH CLI terminals and open the IaaS GUI. Click "Apply Changes" in Ops manager.

3. Monitor the BOSH task running after clicking "Apply Changes" against the TASW tile and keep an eye out for the compilation VM CID to come up. On the first BOSH CLI terminal, run this command:

watch -n 5 "bosh -d <pas-windows-deployment> is --details | grep compilation"

4. Once the Windows compilation VM CID comes up, SSH to the Windows compilation VM on the second BOSH CLI terminal:

bosh -d <pas-windows-deployment> ssh <compilation_name>

Note: Leave open this SSH session as you may not be able to SSH anymore after the BOSH task fails.


5. Search for the compilation VM CID in the IaaS GUI in order to protect the Windows compilation VM from deletion:

On AWS environment:

  • Select the checkbox for the instance of the compilation VM
  • Click on the Actions button
  • Hover over Instance Settings
  • Click Change Termination Protection
  • Click Yes, Enable

On GCP environment:

  • Click on the VM CID to view the VM Instance Details page
  • Click the Edit button
  • Check the Enable deletion protection checkbox
  • Click Save at the bottom

On Azure environment:

  • Click Locks in the left-side menu
  • Click Add
  • Give the Lock a name and choose type Delete
  • Click OK

On vSphere environment:

  • Right click on the VM
  • Rename it


How to boot the Windows compilation VM with Ubuntu desktop ISO on vSphere

In a scenario where you have got the Windows compilation VM alive or working in vSphere but don't have any SSH session opened, you can use the following method:

  • Download a Ubuntu desktop image (http://releases.ubuntu.com/xenial/) and upload it into your datastore
  • From the vSphere GUI, on the Windows compilation VM:
    • Go to Edit settings > add a device CD/DVD drive > browse Datastore ISO file and select the Ubuntu desktop iso -> select the box "Connect at Power ON"
    • Go to Edit settings -> VM options tab -> Boot Options -> increase the Boot Delay to 10000 milliseconds and select Force BIOS Setup
  • It gives you the BIOS setup, boot on the CD-ROM Drive
  • Ubuntu desktop will start, select "try Ubuntu" and launch a terminal. Open a terminal and run the following commands:
sudo fdisk -l
sudo mkdir /mnt/windows
sudo mount /dev/sda1 /mnt/windows
  • Then you can parse the logs at /mnt/windows