{"id":13707319,"url":"https://github.com/andif888/packer-windows-vsphere-iso","last_synced_at":"2025-04-29T22:31:20.317Z","repository":{"id":95852588,"uuid":"415329663","full_name":"andif888/packer-windows-vsphere-iso","owner":"andif888","description":"This repo builds automatically Windows VM templates (Windows 11, Windows 10, Server 2019, Server 2022) for VMware vSphere environment using Hashicorp's Packer using freely available Windows Eval ISOs.","archived":false,"fork":false,"pushed_at":"2022-02-20T09:05:41.000Z","size":18,"stargazers_count":56,"open_issues_count":2,"forks_count":18,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T20:04:40.769Z","etag":null,"topics":["packer","server2022","vsphere-iso","windows11"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andif888.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-10-09T14:19:14.000Z","updated_at":"2025-03-19T23:44:12.000Z","dependencies_parsed_at":"2023-03-04T20:45:26.022Z","dependency_job_id":null,"html_url":"https://github.com/andif888/packer-windows-vsphere-iso","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andif888%2Fpacker-windows-vsphere-iso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andif888%2Fpacker-windows-vsphere-iso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andif888%2Fpacker-windows-vsphere-iso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andif888%2Fpacker-windows-vsphere-iso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andif888","download_url":"https://codeload.github.com/andif888/packer-windows-vsphere-iso/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251593049,"owners_count":21614465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["packer","server2022","vsphere-iso","windows11"],"created_at":"2024-08-02T22:01:27.238Z","updated_at":"2025-04-29T22:31:19.267Z","avatar_url":"https://github.com/andif888.png","language":"HCL","funding_links":[],"categories":["HCL"],"sub_categories":[],"readme":"# packer-windows-vsphere-iso\n\nThis repo builds automatically Windows VM templates (Windows 11, Windows 10, Server 2019, Server 2022) for VMware vSphere environment using Hashicorp's Packer using freely available Windows Eval ISOs.  \n\nWith this repo VM templates for the following Windows operating systems can be built.\n\n- Windows 10 Enterprise\n- Windows 11 Enterprise\n- Windows Server 2019 Datacenter\n- Windows Server 2022 Datacenter\n\nYou don't need do pre-download any Windows ISO.\nWindows ISO files gets download automatically from public sources.\n\n## How to use this repo\n\n### Pre-requesites \n\nDownload or `git clone https://github.com/andif888/packer-windows-vsphere-iso.git` this repo and make sure you have [Packer](https://www.packer.io/downloads) Version 1.7.1 or later installed. If you don't know Packer, it's a single commandline binary which only needs to be on your `PATH`.\n\n### Step 1: Adjust variables\n\nRename the file [variables.auto.pkrvars.hcl.sample](variables.auto.pkrvars.hcl.sample) to `variables.auto.pkrvars.hcl` and adjust the variables for your VMware vSphere environment. Some documentation on each variable is inside the sample file.\n```bash\nmv variables.auto.pkrvars.hcl.sample variables.auto.pkrvars.hcl\nnano variables.auto.pkrvars.hcl\n```\n\n### Step 2: Init Packer\n\nInit Packer by using the following command. (Spot the dot at the end of the command!)\n```bash\npacker init .\n``` \n\n### Step 3: Build a VM Template\n\nTo build a VM template run one of the provided `build`-scripts.   \nFor example to build a Windows 11 template run: \n```bash\n./build-11.sh\n``` \nIf you are on a Windows machine then use the `build-*.ps1` files.\n\n\n### Optional: Windows Template default credentials\n\nthe default credentials after a successful build are   \nUsername: `vagrant`   \nPassword: `vagrant`  \n    \nIf you would like to change the default ćredentials before a packer build, then you need to edit the following files: \n\n- **variables.auto.pkrvars.hcl**\n- **autounattend.xml** \n\n### Optional: Install Windows Updates during build\n\nYou can optionally install Windows Updates during the build operation. \nIf you would like this feature then you need to edit the [windows.pkr.hcl](windows.pkr.hcl) file before the build operation. Please uncomment the following sections:  \n  \nLine: 11-14\n```hcl\n    windows-update = {\n      version = \"0.14.0\"\n      source = \"github.com/rgl/windows-update\"\n    }\n```\nLine: 163-170\n```hcl\n  provisioner \"windows-update\" {\n    search_criteria = \"IsInstalled=0\"\n    filters = [\n      \"exclude:$_.Title -like '*Preview*'\",\n      \"include:$true\",\n    ]\n    update_limit = 25\n  }\n```\nAfter that you have to run `packer init .` again to automatically download the Packer Windows-Update Plugin.\n```bash\npacker init .\n```\n\n## Windows 11 - BypassTPMCheck\n\nNormaly Windows 11 requires a TPM to get installed successfully. \nVMware vSphere provides a virtualized TPM since Version 6.7 and later. \nIn this repo we do not configure a vTPM in vSphere for Windows 11.   \nInstead we use a easy workaround to turn off TPM check during Windows 11 installation.   \nIn the [autounattend.xml](answer_files/11/en/autounattend.xml) we add some registrykeys which effectively enable the **BypassTPMCheck** in Windows 11.\n\n```xml\n    \u003cRunSynchronousCommand wcm:action=\"add\"\u003e\n        \u003cOrder\u003e1\u003c/Order\u003e\n        \u003cDescription\u003eBypassTPMCheck\u003c/Description\u003e\n        \u003cPath\u003ecmd /c reg add \"HKLM\\SYSTEM\\Setup\\LabConfig\" /v \"BypassTPMCheck\" /t REG_DWORD /d 1\u003c/Path\u003e\n    \u003c/RunSynchronousCommand\u003e\n    \u003cRunSynchronousCommand wcm:action=\"add\"\u003e\n        \u003cOrder\u003e2\u003c/Order\u003e\n        \u003cDescription\u003eBypassSecureBootCheck\u003c/Description\u003e\n        \u003cPath\u003ecmd /c reg add \"HKLM\\SYSTEM\\Setup\\LabConfig\" /v \"BypassSecureBootCheck\" /t REG_DWORD /d 1\u003c/Path\u003e\n    \u003c/RunSynchronousCommand\u003e\n    \u003cRunSynchronousCommand wcm:action=\"add\"\u003e\n        \u003cOrder\u003e3\u003c/Order\u003e\n        \u003cDescription\u003eBypassRAMCheck\u003c/Description\u003e\n        \u003cPath\u003ecmd /c reg add \"HKLM\\SYSTEM\\Setup\\LabConfig\" /v \"BypassRAMCheck\" /t REG_DWORD /d 1\u003c/Path\u003e\n    \u003c/RunSynchronousCommand\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandif888%2Fpacker-windows-vsphere-iso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandif888%2Fpacker-windows-vsphere-iso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandif888%2Fpacker-windows-vsphere-iso/lists"}