LXD image support (no box)
It would be very useful to have support for direct image use (much like the AWS Vagrant plugin) where a dummy box is specified and the image details are specified in the provider.
For example:
config.vm.box 'dummy'
config.vm.provider 'lxd' do |lxd, override|
lxd.name = 'my-ubuntu-16'
lxd.image = 'ubuntu-daily:xenial'
# optionally create users and add private keys using #cloud-config in the profile if they're
# not baked in to the image
lxd.profiles = ['private-key-cloud-config']
# [...]
override.ssh.username = 'ubuntu'
override.ssh.private_key_path = '/path/to/private.key'
end
This would make it much easier to leverage existing LXD image infrastructure without also needing to build/update/upload/download/manage Vagrant boxes separately.
These are the potential issues I can think of:
- Remotes are a client-only concept handled by
lxc
so the image details (server
,secret
,protocol
, etc) may need to be specified explicitly for remote images - Using
#cloud-config
to configure the remote user may not always yield a determinateuid
/gid
(required inlxd.vagrant_uid
/lxd.vagrant_gid
)