-
Notifications
You must be signed in to change notification settings - Fork 276
providers/virtualbox: investigate using GuestProperties #629
Description
Ignition currently supports a virtualbox provider, which reads straight JSON bytes from a well-known GPT partition: https://github.com/coreos/ignition/blob/v0.28.0/internal/providers/virtualbox/virtualbox.go
This means that at the injection site (e.g. vagrant-virtualbox) we have a bunch of logic to handcraft a raw GPT disk: https://github.com/coreos/vagrant-ignition/blob/v0.0.1/lib/vagrant-ignition/action/IgnitionDiskGenerator.rb
However, virtualbox already provides an HostService to exchange node properties between host<->guest, which can be used from the guest to consume host-provided userdata: https://www.virtualbox.org/browser/vbox/trunk/src/VBox/HostServices/GuestProperties/service.cpp
Those can be directly managed via VBoxManage guestproperty: http://underpop.online.fr/v/virtualbox/vboxmanage-guestproperty-virtualbox.html
At the same time, another point is that the guest-property can also be used to report back provisioning status (outside the scope of this ticket, but nice).
The main problem I see is that property values are currently limited to 128 bytes: https://www.virtualbox.org/browser/vbox/trunk/include/VBox/HostServices/GuestPropertySvc.h?rev=71010#L40
It would be good to investigate:
- whether vbox upstream would be ok taking a patch to enlarge that size to something slightly larger (e.g. 16KiB like the AWS limit)
- whether there is already a good away to consume this from userspace or if we need additional features in kernel guest drivers (i.e. recent Linux
VBOXGUEST) - whether it makes sense to implement and use this in ignition (e.g. to get rid of udev settling races)