Class: Chef::Knife::ProxmoxVmCreate
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::ProxmoxVmCreate
- Includes:
- ProxmoxBase, ProxmoxVmProvision
- Defined in:
- lib/chef/knife/proxmox_vm_create.rb
Overview
‘knife proxmox vm create NAME` — clone a Proxmox VE template, configure it, start it, and wait for the guest to come up. Stops there: no Chef bootstrap runs.
Subclasses plain Knife (NOT Bootstrap) — there is no post-provision lifecycle to inherit. The clone→configure→start→wait pipeline and the CLI surface come from ProxmoxVmProvision, shared with ‘vm bootstrap`. cloud-init auth is optional here: a VM with a template-baked login is a valid result, so a missing –ssh-public-key / cloud-init password is not fatal (unlike `vm bootstrap`, which must connect).
The command never connects to the VM, so it does NOT wait for SSH and does NOT treat a missing IP as failure (see #wait_for_ssh?/#require_ip?): its contract is “the VM is cloned, configured and started”. The IP is reported best-effort — known immediately for a static –ip, or polled from the guest agent (bounded by –boot-timeout) for dhcp.
Constant Summary
Constants included from ProxmoxVmProvision
Chef::Knife::ProxmoxVmProvision::ENV_CIPASSWORD, Chef::Knife::ProxmoxVmProvision::PRIVATE_KEY_MARKER, Chef::Knife::ProxmoxVmProvision::PUBLIC_KEY_PREFIXES, Chef::Knife::ProxmoxVmProvision::VMBR_PATTERN
Constants included from ProxmoxBase
Chef::Knife::ProxmoxBase::BYTE_UNITS, Chef::Knife::ProxmoxBase::ENV_SECRET_GLOBAL, Chef::Knife::ProxmoxBase::ENV_SECRET_PREFIX
Instance Method Summary collapse
Methods included from ProxmoxVmProvision
Methods included from ProxmoxBase
#human_bytes, #human_duration, included, #msg_pair, #proxmox_api, #proxmox_client, #proxmox_cluster_config, #proxmox_token_secret_present?
Instance Method Details
#run ⇒ Object
35 36 37 38 39 |
# File 'lib/chef/knife/proxmox_vm_create.rb', line 35 def run (require_ssh_auth: false) result = provision_vm! msg_provision_result(result) end |