mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-06 10:07:30 +08:00
Inital commit.
This commit is contained in:
27
help/debuggingFailedBuilds.md
Normal file
27
help/debuggingFailedBuilds.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Debugging Failed Packer Builds
|
||||
|
||||
## Step 1: Run packer build `-on-error=ask`
|
||||
When you run the `packer build` command, give it the `-on-error=ask` flag.
|
||||
By default, `packer build` will delete the resource group as soon as the build fails.
|
||||
`-on-error=ask` will pause it and wait for your input so you have time to remote in to the VM and diagnose the failure.
|
||||
|
||||
When the build fails, you will see this:
|
||||
|
||||

|
||||
|
||||
## Step 2: Find the resource group name in the build log
|
||||
At the beginning of the build log (written to console), find the resource group name for the VM:
|
||||
|
||||

|
||||
|
||||
Log into the Azure Portal. Find that resource group under `Resource groups`. You should see the resources for the Packer build:
|
||||
|
||||

|
||||
|
||||
## Step 3: Connect to the VM
|
||||
Select the VM in the resource group. Click `Connect:`
|
||||
|
||||
This will download an RDP file. Open that and enter the credentials found in the JSON file you pass to `packer build`:
|
||||
|
||||

|
||||
|
||||
BIN
help/resources/askOnError.png
Normal file
BIN
help/resources/askOnError.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
help/resources/packerResourceGroup.png
Normal file
BIN
help/resources/packerResourceGroup.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
BIN
help/resources/resourceGroupName.png
Normal file
BIN
help/resources/resourceGroupName.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 204 KiB |
BIN
help/resources/vmCredentials.png
Normal file
BIN
help/resources/vmCredentials.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 139 KiB |
Reference in New Issue
Block a user