Overview of the Issue
The virtualbox-vm builder crashes if attach_snapshot is null, empty, or missing.
Reproduction Steps
In short: make a config that should load an existing, imported VM, leaving attach_snapshot out.
Example config:
{
"builders": [
{
"disable_shutdown": "false",
"guest_additions_mode": "disable",
"headless": "true",
"keep_registered": true,
"name": "onprem-k8s-step",
"output_directory": "./images/onprem_k8s",
"shutdown_command": "/sbin/halt -p",
"shutdown_timeout": "5m",
"skip_export": true,
"ssh_password": "changeme",
"ssh_timeout": "5m",
"ssh_username": "root",
"target_snapshot": "step_00",
"type": "virtualbox-vm",
"vm_name": "onprem_k8s"
}
],
"provisioners": [
{
"inline": [
"echo ==============================",
"echo Making initial snapshot... ",
"echo =============================="
],
"type": "shell-local"
}
]
}
Packer version
1.5.4
Operating system and Environment details
Linux x86-64, Pop OS 19.10, using precompiled binary
Log Fragments and crash.log files
Crash log atached
crash.log
Overview of the Issue
The
virtualbox-vmbuilder crashes ifattach_snapshotis null, empty, or missing.Reproduction Steps
In short: make a config that should load an existing, imported VM, leaving
attach_snapshotout.Example config:
{ "builders": [ { "disable_shutdown": "false", "guest_additions_mode": "disable", "headless": "true", "keep_registered": true, "name": "onprem-k8s-step", "output_directory": "./images/onprem_k8s", "shutdown_command": "/sbin/halt -p", "shutdown_timeout": "5m", "skip_export": true, "ssh_password": "changeme", "ssh_timeout": "5m", "ssh_username": "root", "target_snapshot": "step_00", "type": "virtualbox-vm", "vm_name": "onprem_k8s" } ], "provisioners": [ { "inline": [ "echo ==============================", "echo Making initial snapshot... ", "echo ==============================" ], "type": "shell-local" } ] }Packer version
1.5.4Operating system and Environment details
Linux x86-64, Pop OS 19.10, using precompiled binary
Log Fragments and crash.log files
Crash log atached
crash.log