{"id":29694192,"url":"https://github.com/juanfont/packer-plugin-vcd","last_synced_at":"2026-04-02T21:56:32.696Z","repository":{"id":301635758,"uuid":"1009493951","full_name":"juanfont/packer-plugin-vcd","owner":"juanfont","description":"A Packer Plugin for VMware Cloud Director","archived":false,"fork":false,"pushed_at":"2026-02-02T16:14:48.000Z","size":214,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-03T04:41:20.532Z","etag":null,"topics":["cloud-director","packer","packer-plugin-vcd","vcd","vmware-cloud-director"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juanfont.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-27T08:15:44.000Z","updated_at":"2026-02-02T16:22:00.000Z","dependencies_parsed_at":"2025-06-27T22:53:37.565Z","dependency_job_id":"afa257f7-0313-40e6-9bf0-4256f81a36ef","html_url":"https://github.com/juanfont/packer-plugin-vcd","commit_stats":null,"previous_names":["juanfont/packer-plugin-vcd"],"tags_count":4,"template":false,"template_full_name":"hashicorp/packer-plugin-scaffolding","purl":"pkg:github/juanfont/packer-plugin-vcd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanfont%2Fpacker-plugin-vcd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanfont%2Fpacker-plugin-vcd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanfont%2Fpacker-plugin-vcd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanfont%2Fpacker-plugin-vcd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juanfont","download_url":"https://codeload.github.com/juanfont/packer-plugin-vcd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanfont%2Fpacker-plugin-vcd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29191995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cloud-director","packer","packer-plugin-vcd","vcd","vmware-cloud-director"],"created_at":"2025-07-23T08:39:09.876Z","updated_at":"2026-02-07T10:04:05.357Z","avatar_url":"https://github.com/juanfont.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Packer Plugin for VMware Cloud Director\n\nThe Packer Plugin for VMware Cloud Director is a plugin that can be used to create virtual machine\nimages on [VMware Cloud Director][vmware-vcd] (VCD).\n\nThe plugin includes one builder:\n\n- `vcd-iso` - This builder creates a virtual machine, uploads an ISO to a VCD catalog, installs an\n  operating system using boot commands, provisions software within the operating system, and then\n  exports the virtual machine as a vApp template. This is best for those who want to create images\n  from scratch using ISO files.\n\n## Features\n\n- **ISO-based VM creation** - Upload ISOs to VCD catalogs and create VMs from scratch\n- **Boot command support** - Send keystrokes to VM console via WebMKS protocol for automated OS installation\n- **HTTP server** - Serve kickstart/preseed files during installation\n- **CD Content injection** - Add files directly to the ISO (workaround for VCD single media slot limitation)\n- **SSH/WinRM communicator** - Connect to VMs for provisioning (Linux and Windows)\n- **EFI and TPM support** - Create UEFI-based VMs with virtual TPM (required for Windows 11)\n- **Export to catalog** - Export finished VMs as vApp templates\n\n## VCD Limitations and Workarounds\n\n### Single Media Slot\n\nVMware Cloud Director only supports **one CD-ROM media attached at a time** per VM. This differs from\nother virtualization platforms like VMware vSphere or QEMU where you could mount multiple ISO images.\n\nThis limitation affects Packer workflows that need to provide additional files (kickstart, preseed,\nautounattend.xml) alongside the OS installer ISO.\n\n### The cd_content Solution\n\nThis plugin provides the `cd_content` feature as a workaround. Instead of mounting a separate ISO,\n`cd_content` **modifies the installer ISO** to include your additional files directly:\n\n```hcl\nsource \"vcd-iso\" \"example\" {\n  iso_url      = \"https://example.com/debian-12.iso\"\n  iso_checksum = \"sha256:...\"\n\n  # Files are injected directly into the ISO\n  cd_content = {\n    \"preseed.cfg\"          = file(\"${path.root}/http/preseed.cfg\")\n    \"scripts/post-install\" = file(\"${path.root}/scripts/post-install.sh\")\n  }\n\n  # ...\n}\n```\n\nThe modified ISO:\n- Contains all original files from the source ISO\n- Includes your additional files at the root level\n- Maintains bootability (isolinux/grub boot records are preserved)\n- Is uploaded to VCD and mounted as the boot media\n\n\u003e **Note:** For Linux ISOs (ISO9660), the plugin requires `xorriso` to modify the ISO while preserving\n\u003e boot records. For Windows ISOs (UDF filesystem), `p7zip-full` and `genisoimage` are required. Files\n\u003e are accessible from the mounted CD-ROM inside the VM (e.g., `/cdrom/preseed.cfg` during Debian installation).\n\n## Requirements\n\n- [Packer][packer-install] \u003e= 1.10.0\n- VMware Cloud Director 10.4+ (API version 38.0+)\n- For Linux ISO modification (cd_content): `xorriso`\n- For Windows ISO modification (cd_content): `p7zip-full` and `genisoimage`\n  ```bash\n  # Debian/Ubuntu\n  apt-get install xorriso p7zip-full genisoimage\n  ```\n\n\u003e [!NOTE]\n\u003e The plugin has been tested with VMware Cloud Director 10.6.\n\n## Usage\n\nFor examples on how to use this plugin with Packer refer to the [examples](examples/) directory of\nthe repository.\n\n## Installation\n\n### Using Pre-built Releases\n\n#### Automatic Installation\n\nPacker v1.7.0 and later supports the `packer init` command which enables the automatic installation\nof Packer plugins. For more information, see the [Packer documentation][docs-packer-init].\n\nTo install this plugin, copy and paste this code (HCL2) into your Packer configuration and run\n`packer init`.\n\n```hcl\npacker {\n  required_version = \"\u003e= 1.7.0\"\n  required_plugins {\n    vcd = {\n      version = \"\u003e= 0.0.1\"\n      source  = \"github.com/juanfont/vcd\"\n    }\n  }\n}\n```\n\n#### Manual Installation\n\nYou can download the plugin from the GitHub [releases][releases-vcd-plugin]. Once you have\ndownloaded the latest release archive for your target operating system and architecture, extract the\nrelease archive to retrieve the plugin binary file for your platform.\n\nTo install the downloaded plugin, please follow the Packer documentation on\n[installing a plugin][docs-packer-plugin-install].\n\n### From Source\n\nIf you prefer to build the plugin from sources, clone the GitHub repository locally and run the\ncommand `go build` from the repository root directory. Upon successful compilation, a\n`packer-plugin-vcd` plugin binary file can be found in the root directory.\n\n```bash\ngit clone https://github.com/juanfont/packer-plugin-vcd.git\ncd packer-plugin-vcd\ngo build\n```\n\nTo install the compiled plugin, please follow the Packer documentation on\n[installing a plugin][docs-packer-plugin-install].\n\n## Configuration\n\nFor more information on how to configure the plugin, please see the plugin documentation.\n\n- `vcd-iso` [builder documentation][docs-vcd-iso]\n\n## Network Considerations\n\nFor ISO-based builds with preseed/kickstart, the VM needs network connectivity during OS installation.\n\n### IP Allocation Modes\n\n| Mode | Description | Use Case |\n|------|-------------|----------|\n| `POOL` | VCD assigns IP from pool (default) | Networks with IP pools |\n| `MANUAL` | User specifies IP via `vm_ip` | When you need a specific IP |\n| `DHCP` | OS gets IP from DHCP server | Networks with DHCP enabled |\n\nFor `POOL` and `MANUAL` modes, the IP is available as template variables in `boot_command` and `cd_content`:\n- `{{ .VMIP }}` - The VM's IP address\n- `{{ .VMGateway }}` - Network gateway\n- `{{ .VMNetmask }}` - Network mask\n- `{{ .VMDNS }}` - DNS server\n\n### POOL Mode (Recommended)\n\nLet VCD assign an IP from the network pool. The plugin queries the assigned IP and makes it\navailable for templates:\n\n```hcl\nnetwork            = \"my-network\"\nip_allocation_mode = \"POOL\"  # This is the default\n\n# Debian preseed example\nboot_command = [\n  \"\u003cesc\u003eauto \",\n  \"netcfg/disable_autoconfig=true \",\n  \"netcfg/get_ipaddress={{ .VMIP }} \",\n  \"netcfg/get_netmask={{ .VMNetmask }} \",\n  \"netcfg/get_gateway={{ .VMGateway }} \",\n  \"netcfg/get_nameservers={{ .VMDNS }} \",\n  \"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg\u003center\u003e\"\n]\n```\n\n### MANUAL Mode\n\nSpecify the IP address explicitly:\n\n```hcl\nnetwork            = \"my-network\"\nip_allocation_mode = \"MANUAL\"\nvm_ip              = \"10.0.0.100\"\nvm_gateway         = \"10.0.0.1\"\nvm_dns             = \"8.8.8.8\"\n\nboot_command = [\n  \"\u003cesc\u003eauto \",\n  \"netcfg/disable_autoconfig=true \",\n  \"netcfg/get_ipaddress={{ .VMIP }} \",\n  \"netcfg/get_netmask={{ .VMNetmask }} \",\n  \"netcfg/get_gateway={{ .VMGateway }} \",\n  \"netcfg/get_nameservers={{ .VMDNS }} \",\n  \"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg\u003center\u003e\"\n]\n```\n\n### DHCP Mode\n\nIf your network has DHCP, the OS installer can get an IP automatically:\n\n```hcl\nnetwork            = \"my-network\"\nip_allocation_mode = \"DHCP\"\n\nboot_command = [\n  \"auto url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg\u003center\u003e\"\n]\n```\n\n\u003e **Note:** The boot command examples use Debian preseed. Other distributions use different\n\u003e methods: kickstart for RHEL/CentOS/Fedora, autoinstall for Ubuntu 20.04+.\n\n## Contributing\n\nIf you discover a bug or would like to suggest a feature or an enhancement, please use the GitHub\n[issues][issues].\n\n## GenAI Disclaimer\n\nI have used Claude Code for this project. I have been working with VMware Cloud Director and govcd ([docker-machine-driver-vcd][docker-machine-driver-vcd], [fleeting-plugin-vcd][fleeting-plugin-vcd]) for years now, but this project was way bigger than and it had a major showstopper: VCD does not have an API call to \"press keys\" and send them to the VM, so in order to type the boot command it was necessary to reverse engineering the WebSockets Web Console and \"type\" them in the console. Claude helped A LOT.\n\n## License\n\nBSD-3-Clause\n\n[vmware-vcd]: https://www.vmware.com/products/cloud-director.html\n[packer-install]: https://developer.hashicorp.com/packer/install\n[docs-packer-init]: https://developer.hashicorp.com/packer/docs/commands/init\n[docs-packer-plugin-install]: https://developer.hashicorp.com/packer/docs/plugins/install-plugins\n[docs-vcd-iso]: https://github.com/juanfont/packer-plugin-vcd/blob/main/docs/builders/vcd-iso.mdx\n[releases-vcd-plugin]: https://github.com/juanfont/packer-plugin-vcd/releases\n[issues]: https://github.com/juanfont/packer-plugin-vcd/issues\n[docker-machine-driver-vcd]: https://github.com/juanfont/docker-machine-driver-vcd\n[fleeting-plugin-vcd]: https://github.com/juanfont/fleeting-plugin-vcd\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanfont%2Fpacker-plugin-vcd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuanfont%2Fpacker-plugin-vcd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanfont%2Fpacker-plugin-vcd/lists"}