Most of them are outdated, but provide historical design context.
They are not user documentation and should not be treated as such.
Documentation is available here.
VM Payload
Summary
The purpose of the feature is to allow passing a payload to a guest upon startup.
Owner
- Name: Shahar Havivi (Shaharh)
- Email: shavivi@redhat.com
Current status
- In progress of defining the requirements
Detailed Description
There are many cases in which there is a need to pass a payload to a VM. For example, running windows sysprep, external management of installation of 3rd party products, etc. The purpose of the feature is to allow adding such a payload externally, specify the payload method (CD, floppy), specify when this data has to be available, etc.
The payload options are:
- Availability
- Permanent payload - payload which will be available in the guest at all times
- Temporary payload - via “run-once” - will be available only when running the guest via the run-once option
- No payloads - the VM won’t get any payload upon startup/run-once
- Payload passing method
- Floppy
- CD
- In the future also libguestfs injection and payload downloaded via private IP
Implementation notes:
- backend, frontend: only one payload per vm
- backend, forntend: For now we will limit the content of the file to 16K.
- backend, frontend: add support to run-once
- backend, frontend: add support to add/edit VM
- backend, frontend: add GetVmPayloadQuery() (needed because there is no persistence to payload in VmBase)
- backend: The Modelling of this feature will include OVF schema changes as well
- backend: payload will be as cdrom/floppy device, if we use payload-cdrom we don’t allow regular cdrom
- backend: add 3 fields to VM class (not persistence) payload_type, payload_filename, payload_content
- bacnend: payload will be present as a cdrom/floppy device with the payload data in the specParams (and will be persist to db)
- backend: change cd will be enabled on the payload-cdrom (which will be the only cdrom)
- vdsm: will parse the device and create temp cdrom/floppy file-system file.
- vdsm: will remove the payload data when returning the vmStats to backend
- vdsm: on migration will have the same devices
- vdsm: on destroy will delete the temp file-system
- bacnend: the file names should be passed in Unicode
- backend:The payload data will be encoded using base64 encoding
- vdsm: should re-encode them as utf8 when writing them to disk
API Design
This is an example for the API for this feature, the vm_paload element will work in add/edit VM and for Run-VM actions
<vm>
...
<payloads>
<payload type='cdrom'>
<files>
<file>
<name>my.txt</name>
<content>some content</content>
</file>
</files>
</payload>
</payloads>
</vm>
Design Notes
vmPayload is passed in the create params:
'vmPayload': { 'cdrom': [{'filename': 'content' }, {'filename': 'content'}],
'floppy': [{'filename': 'content' }, {'filename': 'content'}],
'sysprep': {'filename': 'content' },
'network': '...' }
User work-flows
The Administrator and User Portal should allow the following operations in edit VM:
- Enable/Disable payload
- Once enabled
- Choose payload method
- Floppy
- CD
- For each payload
- Choose the path
- Provide the base64 data
- Choose payload method
Benefit to oVirt
The VM payload feature will ease the installation of third party products, mainly in a cloud environment.
Dependencies / Related Features
Affected oVirt projects:
- VDSM
- API
- CLI
- SDK
- Engine
- Webadmin
- User Portal