1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
webvirtcloud/instances
catborise f004552148 feat(instances): a new VM can get a cloud-init seed with its hostname and SSH keys
Cloud images read their first-boot settings with cloud-init. The panel
served them only over HTTP, which a VM reaches only with the network
and a reverse DNS name for its address. A new VM can now carry them
itself: Cloud-init seed (Advanced) on the create form, or cloud_init in
the API.

The job writes a NoCloud seed, an ISO labelled cidata, into the disk's
directory pool as cidata-<uuid>.iso and puts it in the VM's CD-ROM
drive. Its meta-data holds the VM's UUID as instance-id and its name as
hostname, written as JSON so a VM named 123 or yes keeps a string
hostname; its user-data is what the HTTP datasource serves, with the
creating user's SSH keys. The ISO is built with pycdlib and written
through a libvirt stream, as the NVRAM copy is, now one helper for both.

A seed needs a CD-ROM bus and a directory pool, else the create is
refused. A failed create deletes the seed with the new disk, recovery
names one left behind, and deleting the VM with its disks deletes its
seed, found in the pools by name even when ejected. A clone's drive is
left empty: the seed is the source VM's identity.
2026-10-25 19:57:15 +03:00
..
api feat(instances): a new VM can get a cloud-init seed with its hostname and SSH keys 2026-10-25 19:57:15 +03:00
fixtures Instances overhaul 2020-07-13 15:33:09 +06:00
migrations fix(computes): VM ownership survives a move or a short absence 2026-10-04 01:08:11 +03:00
templates feat(instances): a new VM can get a cloud-init seed with its hostname and SSH keys 2026-10-25 19:57:15 +03:00
templatetags feat(instances): a new VM is made on one form in three steps 2026-10-23 23:26:28 +03:00
tests feat(instances): a new VM can get a cloud-init seed with its hostname and SSH keys 2026-10-25 19:57:15 +03:00
__init__.py Fixe migrations for new deployments 2020-05-28 18:19:25 +06:00
addresses.py fix(instances): the IP search asks a guest agent with a timeout 2026-10-25 16:15:18 +03:00
apps.py format python code with black 2022-11-02 08:54:35 +03:00
forms.py fix(instances): a new VM's vCPUs, memory and disk size are at least 1 2026-10-24 09:31:12 +03:00
jobs.py feat(instances): a new VM can get a cloud-init seed with its hostname and SSH keys 2026-10-25 19:57:15 +03:00
models.py feat(instances): a new VM can get a cloud-init seed with its hostname and SSH keys 2026-10-25 19:57:15 +03:00
report.py feat(instances): a report of every VM with its addresses and OS, as an Excel file 2026-10-24 22:30:07 +03:00
states.py fix(instances): every VM state has a label and the actions it allows 2026-10-05 19:34:30 +03:00
urls.py feat(instances): a report of every VM with its addresses and OS, as an Excel file 2026-10-24 22:30:07 +03:00
utils.py feat(logs): every VM operation writes an audit row the VM's Logs tab finds by UUID 2026-10-24 14:14:53 +03:00
views.py fix(instances): a timed-out root password or SSH key change says it may still be made 2026-10-25 18:51:56 +03:00