Skip to content

Commit

Permalink
Fix 2022 sysprep provisioner cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
drewmullen authored and lbajolet-hashicorp committed Dec 13, 2024
1 parent c4f234e commit 54f731f
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .web-docs/components/builder/ebs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2215,6 +2215,34 @@ build {
}
```

## Windows 2022 Sysprep Commands - For Amazon Windows AMIs Only

For Amazon Windows 2022 AMIs it is necessary to run Sysprep commands which can
be easily added to the provisioner section.

**HCL2**

```hcl
provisioner "powershell" {
inline = [
"& 'C:/Program Files/Amazon/EC2Launch/ec2launch' reset --block",
"& 'C:/Program Files/Amazon/EC2Launch/ec2launch' sysprep --shutdown --block"
]
}
```

**JSON**

```json
{
"type": "powershell",
"inline": [
"& 'C:/Program Files/Amazon/EC2Launch/ec2launch' reset --block",
"& 'C:/Program Files/Amazon/EC2Launch/ec2launch' sysprep --shutdown --block"
]
}
```


## Windows 2016 Sysprep Commands - For Amazon Windows AMIs Only

Expand Down
28 changes: 28 additions & 0 deletions docs/builders/ebs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,34 @@ build {
}
```

## Windows 2022 Sysprep Commands - For Amazon Windows AMIs Only

For Amazon Windows 2022 AMIs it is necessary to run Sysprep commands which can
be easily added to the provisioner section.

**HCL2**

```hcl
provisioner "powershell" {
inline = [
"& 'C:/Program Files/Amazon/EC2Launch/ec2launch' reset --block",
"& 'C:/Program Files/Amazon/EC2Launch/ec2launch' sysprep --shutdown --block"
]
}
```

**JSON**

```json
{
"type": "powershell",
"inline": [
"& 'C:/Program Files/Amazon/EC2Launch/ec2launch' reset --block",
"& 'C:/Program Files/Amazon/EC2Launch/ec2launch' sysprep --shutdown --block"
]
}
```


## Windows 2016 Sysprep Commands - For Amazon Windows AMIs Only

Expand Down

0 comments on commit 54f731f

Please sign in to comment.