Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 2022 sysprep provisioner cmd #518

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading