Open jay7x opened 1 year ago
Thanks, I will take a closer look at it.
You can use VirtualBox builtin provider as a reference I guess.. my Ruby foo is not that great so it's hard to say where to look exactly.. feel free to ask for testing and for cloud-init-related help.
Roughly it's enough to add the following to QEMU call:
-drive file=/path/to/cidata.iso,media=cdrom
The ISO MUST have cidata
label and MUST contain 2 files:
Then cloud-init
will consider this CD as a data source to apply the configuration from.
Few more on how to get that working if/when support will be implemented:
vagrant up
Vagrant should be able to spin the VM up and to ssh into as vagrant
user with the vagrant insecure key.
Usually cloud-init output is visible on the VM console (serial console in this case). E.g. below is the output from my packer when everything is good. You can see the DataSourceNoCloud [seed=/dev/vdb]
is recognized here (this is an CDROM image made by packer).
[ 4.365327] cloud-init[587]: Cloud-init v. 20.4.1 finished at Tue, 06 Dec 2022 04:38:18 +0000. Datasource DataSourceNoCloud [seed=/dev/vdb][dsmode=net]. Up 4.36 seconds
If anything is wrong with the CD image you'll see some datasource-related error at early cloud-init stage.
Feel free to contact me if need any help!
It'd be great to have
cloud-init
experimental feature supported in the QEMU provider. Though it meansdisks
feature is required too (as cloud-init works this way for non-cloud VMs).This way it's possible to use e.g. Ubuntu and Debian cloud images unmodified.
Links: