hashicorp / hashicorp/packer-plugin-hyperv

"strconv.ParseUint: parsing "0 0": invalid syntax" when Hyper-V VM with same name is already running

Open
#18 0 comments 0 reactions 0 assignees View on GitHub
bug builder/hyperv crash good first issue help wanted
Dominant language
Go
Stars
27
Forks
28
PR merge metrics
No merged PRs in 30d

Description

_This issue was originally opened by @sandersaares as hashicorp/packer#5149. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._


Packer v1.0.2 on Windows Server 2016.

The error in the title occurs if a VM with the same name is already running. I expect Packer to overwrite the VM and successfully continue.

Retrying the operation succeeds - the build that errors out does get rid of the conflicting VM.

Template:

```
{
"builders": [
{
"name": "Windows2016-HyperV",
"type": "hyperv-iso",
"iso_url": "{{ user `windows2016_iso_url` }}",
"iso_checksum_type": "none",
"ram_size": 1536,
"cpu": 4,
"vm_name": "Packer-Asdp-Host-Windows2016",
"switch_name": "{{ user `network_name` }}",
"generation": 2,
"enable_secure_boot": true,
"boot_wait": "0s",
"boot_command": [
"aaaa"
],
"communicator": "winrm",
"winrm_username": "axinom",
"winrm_password": "xxx"
}
],
"variables": {
"windows2016_iso_url": "c:/Tmp/eval_14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.ISO",
"network_name": "Internal"
}
}
```

Command: `Packer.exe build --force xxx.json`

Log: https://gist.github.com/sandersaares/b74576bfdd796b63da241e380d77c5bb

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.