Packer:创建 proxmox VM 而不是模板
Packer: Create proxmox VM not Template
我们可以通过 Packer 创建 Proxmox 虚拟机吗(不是模板)?
因为在我的例子中,它创建了一个 VM 而不是停止它并使其成为模板。我不需要模板我需要 VM
muhammadfaizanyounus@Muhammads-MacBook-Pro proxmox % packer build test3.json
proxmox: output will be in this color.
==> proxmox: Creating VM
==> proxmox: Starting VM
==> proxmox: Waiting 3m0s for boot
==> proxmox: Typing the boot command
==> proxmox: Using ssh communicator to connect: aaa.bbb.ccc.ddd
==> proxmox: Waiting for SSH to become available...
==> proxmox: Connected to SSH!
==> proxmox: Stopping VM
==> proxmox: Converting VM to template
==> proxmox: Adding a cloud-init cdrom in storage pool local-lvm
Build 'proxmox' finished.
==> Builds finished. The artifacts of successful builds are:
--> proxmox: A template was created: 152
原来是这样……
至于我,在 Packer 进程结束时,我 运行 VM conf 文件上的 sed 命令从 "Template: 1" 更改为 "Template: 0"
此致
Packer 是创建 'golden images' 而不是 VM 的工具,所以我认为这是不可能的。
Packer is an open source tool that enables you to create identical machine images for multiple platforms from a single source template. A common use case is creating "golden images" that teams across an organization can use in cloud infrastructure.
您可以查看其他工具来执行您想要的操作,例如 Terraform(也来自 HashiCorp)或 salt-cloud(来自 Saltstack/Salt 项目)。但是我觉得两者都需要一张图片才能使用。
我们可以通过 Packer 创建 Proxmox 虚拟机吗(不是模板)? 因为在我的例子中,它创建了一个 VM 而不是停止它并使其成为模板。我不需要模板我需要 VM
muhammadfaizanyounus@Muhammads-MacBook-Pro proxmox % packer build test3.json
proxmox: output will be in this color.
==> proxmox: Creating VM
==> proxmox: Starting VM
==> proxmox: Waiting 3m0s for boot
==> proxmox: Typing the boot command
==> proxmox: Using ssh communicator to connect: aaa.bbb.ccc.ddd
==> proxmox: Waiting for SSH to become available...
==> proxmox: Connected to SSH!
==> proxmox: Stopping VM
==> proxmox: Converting VM to template
==> proxmox: Adding a cloud-init cdrom in storage pool local-lvm
Build 'proxmox' finished.
==> Builds finished. The artifacts of successful builds are:
--> proxmox: A template was created: 152
原来是这样…… 至于我,在 Packer 进程结束时,我 运行 VM conf 文件上的 sed 命令从 "Template: 1" 更改为 "Template: 0"
此致
Packer 是创建 'golden images' 而不是 VM 的工具,所以我认为这是不可能的。
Packer is an open source tool that enables you to create identical machine images for multiple platforms from a single source template. A common use case is creating "golden images" that teams across an organization can use in cloud infrastructure.
您可以查看其他工具来执行您想要的操作,例如 Terraform(也来自 HashiCorp)或 salt-cloud(来自 Saltstack/Salt 项目)。但是我觉得两者都需要一张图片才能使用。