Building GNS/Openstack and cloud-init iso/qcow2?

I have compiled an ISO and I want to create a qcow2 image for GNS3/Openstack.

Is there any support for cloud-init in VyOS?
How can I build VyOS with cloud-init support?
I have tried what’s in:

But wasn’t able to compile it.

Hello @elico,

Try it:

1 Like

Hey @RyVolodya I have compiled 1.3 rolling iso and then I applied the next to create a qcow2 image for GNS3/Openstack:
ansible-playbook qemu.yml -e iso_local=/opt/src/vyos-1.3-rolling-202211182123-amd64.iso -e disk_size=20 -e cloud_init=true -e guest_agent=qemu -e pxe=true -e keep_user=true -e grub_console=kvm -e enable_dhcp=true -e enable_ssh=true -e cloud_init_ds=NoCloud,ConfigDrive,None -e cloud_init_disable_config=false

Now I have two issues with the qcow2 image resulted from this.
The first is on OpenStack. The machine should receive an ip address automatically on eth0 (enable_dhcp=true) but it doesn’t happen.
After I get into the console using vyos/vyosI tried to configure the eth0 interface…which is the only one on the VM I see that there is no IP address at all.
I tried to configure manually the address as dhcp and commit but then I am receiving and error that the maximum MTU of the interface can be 1450.

And the second issue is that the keys are not added into the VM instance and I am not sure but believe it’s because of the first MTU issue.

I like the way that the image is created but not sure if it’s a problem in my specific use case or a general problem.

Pay attention - for OpenStack you need to use OpenStack data source. Actually, better to cut the options list to:

-e cloud_init=true -e cloud_init_ds=OpenStack,ConfigDrive,None -e grub_console=KVM

You do not need all that user/DHCP options, because if the Cloud-Init Data source is available it will take care of all of this. If not - a fallback DHCP client on the main interface and authentication credentials will be added.
Appropriate MTU size should be configured as well if a data source provides it with network-config.

@zsdc I have tried this but there are still issues.
I cannot loging to the machine via console and cannot even ping the VM.
In the KMV console I see the next:

Both a configure failed!
and vyos/vyos user/password doesn’t work.