You need to have an active Cisco VIRL subscription to download the VMDK images or buy the Cisco CSR1000V to get access to the ISO on the Cisco website!
IOS XE was the easiest because I found a Github repository to convert an existing CSR1000V ISO to vbox image to use with Vagrant. The only thing I needed to do was to converting the vbox image to KVM using vagrant mutate.
==> rtr-1: Creating image (snapshot of base box volume).
==> rtr-2: Creating image (snapshot of base box volume).
System image file is "bootflash:packages.conf"
Running IOSv on KVM wasn't that easy because you only get VMDK (Virtual Machine Disk) which you need to convert to a QCOW2 image. The next step is to boot the QCOW2 image and add some additional configuration changes before you can use this with Vagrant. Give the VM at least 2048 MB and min. 1 vCPU.
action 2.2 syslog priority informational msg "SSH is currently \$status"
action 3.1 cli command "configure terminal"
action 3.2 cli command "crypto key generate rsa usage-keys label SSHKEYS modulus 2048"
action 3.3 cli command "end"
action 3.4 cli command "copy run start"
action 3.5 syslog priority informational msg "SSH keys generated by EEM"
The IOSv image is ready to use with Vagrant, just create an Vagrantfile with the needed configuration and boot up the VMs.
System image file is "flash0:/vios-adventerprisek9-m"
Basically thats it, your on-demand IOSv and IOS XE lab using Vagrant, ready for some automation and continuous integration testing.
I am working on something similar. Thx for posting this. Gonna use Packer to automate the iOS prep steps to make it into a vagrant box.
I get asav up and running but csr1k IOS-XE fails with grub error.
What disk bus is configured in your Vagrantfile?
The CSR worked for me directly without problems, had issues with the ASAv but this was related to the type of network card used.
But check the disk bus type this could be the reason why it's not booting.
To get csr1k up and running.
Yes, well spotted didn't thought about this.
The disk needs to be 8GB.
That seems like vagrant can't create a virtual network for the instance.
How does your Vagrantfile looks like?
The IOSv VM boots successfully, natively in Libvirt?