Placement as a pure function, the same for standalone ESXi and vCenter.
reboot_host on ESXi (maintenance mode only). vCenter has no reboot.
GUEST_AGENT_PACKAGES = ("open-vm-tools",).
New dependencies: pycdlib, PyYAML, requests. Where the driver runs it needs qemu-img and HTTPS to the ESXi hosts; through vCenter the NFC upload goes straight to the host.
Related
Needs NAPALM/napalm-device-types#1. Consumed by netOrk PR #311.
Testing
286 tests, including end-to-end against vcsim (ESXi + vCenter): provisioning with MAC, disk growth, status, config, removal.
vcsim surfaced two real bugs, both fixed and now pinned by tests: chunked upload with Content-Length gets a 500, and a device edit without its backing crashes vcsim.
ruff and mypy clean.
Unverified until netOrk#305: whether each distro's cloud kernel has the PVSCSI/VMXNET3 drivers.
## Summary
VM provisioning (netOrk #307) and host reboot (netOrk #308) for both drivers.
## Changes
- `create_vm_from_cloud_init` from netOrk's catalog images:
1. Download with checksum check (one retry).
2. `qemu-img` conversion to a streamOptimized VMDK, cached per URL.
3. OVF import over NFC.
4. MACs pinned, disk grown, NoCloud seed ISO attached as a CD-ROM on a new SATA controller.
5. Power-on.
If anything fails after the import, the VM is removed again.
- `destroy_vm`, `get_vm_status`, `get_network_targets` (port groups, `kind="portgroup"`, fixed VLAN), `get_image_storages`.
- Placement as a pure function, the same for standalone ESXi and vCenter.
- `reboot_host` on ESXi (maintenance mode only). vCenter has no reboot.
- `GUEST_AGENT_PACKAGES = ("open-vm-tools",)`.
- New dependencies: `pycdlib`, `PyYAML`, `requests`. Where the driver runs it needs `qemu-img` and HTTPS to the ESXi hosts; through vCenter the NFC upload goes straight to the host.
## Related
Needs NAPALM/napalm-device-types#1. Consumed by netOrk PR #311.
## Testing
- 286 tests, including end-to-end against vcsim (ESXi + vCenter): provisioning with MAC, disk growth, status, config, removal.
- vcsim surfaced two real bugs, both fixed and now pinned by tests: chunked upload with Content-Length gets a 500, and a device edit without its backing crashes vcsim.
- ruff and mypy clean.
- Unverified until netOrk#305: whether each distro's cloud kernel has the PVSCSI/VMXNET3 drivers.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
create_vm_from_cloud_init takes the same qcow2/raw cloud images netOrk
offers for Proxmox. ESXi can neither boot nor download them, so the
driver does both: download with checksum check and one retry, convert
with qemu-img to a streamOptimized VMDK (cached by URL), import through
a minimal OVF descriptor over NFC, pin requested MACs, grow the disk,
and attach a NoCloud seed ISO placed next to the VM's files. NoCloud
rather than guestinfo because it needs nothing in the guest; the
user-data installs open-vm-tools, which the driver declares as its
guest agent. A failure after the import removes the VM again.
Placement is a pure decision over inventory rows: a connected host
outside maintenance mode that sees the datastore and every port group,
with the resource pool and VM folder found by walking up to the
datacenter -- one path for a standalone host and for a vCenter.
Two faults vcsim surfaced and the tests now pin: a chunked upload body
next to a Content-Length is refused with 500, so the disk goes up as a
sized file object that also reports lease progress; and a device edit
replaces the device as sent, so disk and NIC edits start from the live
objects, backing included (vcsim panicked on a disk without one).
destroy_vm, get_vm_status, get_network_targets (port groups with their
fixed VLAN) and get_image_storages complete the contract.
reboot_host on ESXi uses RebootHost_Task and refuses outside
maintenance mode: force=True would cut power to running VMs.
Tested against vcsim in ESXi and vCenter mode, end to end.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
VM provisioning (netOrk #307) and host reboot (netOrk #308) for both drivers.
Changes
create_vm_from_cloud_initfrom netOrk's catalog images:qemu-imgconversion to a streamOptimized VMDK, cached per URL.If anything fails after the import, the VM is removed again.
destroy_vm,get_vm_status,get_network_targets(port groups,kind="portgroup", fixed VLAN),get_image_storages.Placement as a pure function, the same for standalone ESXi and vCenter.
reboot_hoston ESXi (maintenance mode only). vCenter has no reboot.GUEST_AGENT_PACKAGES = ("open-vm-tools",).New dependencies:
pycdlib,PyYAML,requests. Where the driver runs it needsqemu-imgand HTTPS to the ESXi hosts; through vCenter the NFC upload goes straight to the host.Related
Needs NAPALM/napalm-device-types#1. Consumed by netOrk PR #311.
Testing
🤖 Generated with Claude Code