{"id":25690166,"url":"https://github.com/mweisel/cisco-csr1kv-vagrant-libvirt","last_synced_at":"2025-08-08T21:23:35.041Z","repository":{"id":229240628,"uuid":"230574058","full_name":"mweisel/cisco-csr1kv-vagrant-libvirt","owner":"mweisel","description":"A procedure for creating a Cisco CSR 1000V Vagrant box for the libvirt provider.","archived":false,"fork":false,"pushed_at":"2021-05-29T04:20:06.000Z","size":20,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-22T23:46:50.421Z","etag":null,"topics":["cisco-ios-xe","libvirt-provider","vagrant-box"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mweisel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-12-28T07:17:42.000Z","updated_at":"2024-03-22T23:46:53.375Z","dependencies_parsed_at":"2024-03-22T23:46:52.844Z","dependency_job_id":"0c4e3a8c-8c6f-49e5-b645-5b847bfe7d19","html_url":"https://github.com/mweisel/cisco-csr1kv-vagrant-libvirt","commit_stats":null,"previous_names":["mweisel/cisco-csr1kv-vagrant-libvirt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mweisel%2Fcisco-csr1kv-vagrant-libvirt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mweisel%2Fcisco-csr1kv-vagrant-libvirt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mweisel%2Fcisco-csr1kv-vagrant-libvirt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mweisel%2Fcisco-csr1kv-vagrant-libvirt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mweisel","download_url":"https://codeload.github.com/mweisel/cisco-csr1kv-vagrant-libvirt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240564597,"owners_count":19821422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cisco-ios-xe","libvirt-provider","vagrant-box"],"created_at":"2025-02-24T22:16:35.254Z","updated_at":"2025-02-24T22:16:35.857Z","avatar_url":"https://github.com/mweisel.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg alt=\"Vagrant\" src=\"https://img.shields.io/badge/vagrant%20-%231563FF.svg?\u0026style=for-the-badge\u0026logo=vagrant\u0026logoColor=white\"/\u003e\n\n# Cisco CSR 1000V Vagrant box\n\nA procedure for creating a Cisco CSR 1000V (Cisco IOS XE Denali 16.3.1 or later) Vagrant box for the [libvirt](https://libvirt.org) provider.\n\n## Prerequisites\n\n  * [Git](https://git-scm.com)\n  * [Python](https://www.python.org)\n  * [Ansible](https://docs.ansible.com/ansible/latest/index.html) \u003e= 2.7\n  * [libvirt](https://libvirt.org) with client tools\n  * [QEMU](https://www.qemu.org)\n  * [Expect](https://en.wikipedia.org/wiki/Expect)\n  * [Telnet](https://en.wikipedia.org/wiki/Telnet)\n  * [Vagrant](https://www.vagrantup.com) \u003e= 2.2.10\n  * [vagrant-libvirt](https://github.com/vagrant-libvirt/vagrant-libvirt)\n\n\u003e Vagrant version **2.2.16** introduced a bug that *breaks* SSH connectivity - [#12344](https://github.com/hashicorp/vagrant/issues/12344)\n\n## Steps\n\n0\\. Verify the prerequisite tools are installed.\n\n\u003cpre\u003e\n$ \u003cb\u003ewhich git python ansible libvirtd virsh qemu-system-x86_64 expect telnet vagrant\u003c/b\u003e\n$ \u003cb\u003evagrant plugin list\u003c/b\u003e\nvagrant-libvirt (0.5.1, global)\n\u003c/pre\u003e\n\n1\\. Log in and download the Cisco Cloud Services Router 1000V software from your [Cisco](https://software.cisco.com/download/home/284364978/type) account. Save the file to your `Downloads` directory.\n\n2\\. Copy (and rename) the disk image file to the `/var/lib/libvirt/images` directory.\n\n\u003cpre\u003e\n$ \u003cb\u003esudo cp $HOME/Downloads/csr1000v-universalk9.17.03.02-serial.qcow2 /var/lib/libvirt/images/cisco-csr1kv.qcow2\u003c/b\u003e\n\u003c/pre\u003e\n\n3\\. Modify the file ownership and permissions. Note the owner may differ between Linux distributions.\n\n\u003e Ubuntu 18.04\n\n\u003cpre\u003e\n$ \u003cb\u003esudo chown libvirt-qemu:kvm /var/lib/libvirt/images/cisco-csr1kv.qcow2\u003c/b\u003e\n$ \u003cb\u003esudo chmod u+x /var/lib/libvirt/images/cisco-csr1kv.qcow2\u003c/b\u003e\n\u003c/pre\u003e\n\n\u003e Arch Linux\n\n\u003cpre\u003e\n$ \u003cb\u003esudo chown nobody:kvm /var/lib/libvirt/images/cisco-csr1kv.qcow2\u003c/b\u003e\n$ \u003cb\u003esudo chmod u+x /var/lib/libvirt/images/cisco-csr1kv.qcow2\u003c/b\u003e\n\u003c/pre\u003e\n\n4\\. Create the `boxes` directory.\n\n\u003cpre\u003e\n$ \u003cb\u003emkdir -p $HOME/boxes\u003c/b\u003e\n\u003c/pre\u003e\n\n5\\. Start the `vagrant-libvirt` network (if not already started).\n\n\u003cpre\u003e\n$ \u003cb\u003evirsh -c qemu:///system net-list\u003c/b\u003e\n$ \u003cb\u003evirsh -c qemu:///system net-start vagrant-libvirt\u003c/b\u003e\n\u003c/pre\u003e\n\n6\\. Clone this GitHub repo and _cd_ into the directory.\n\n\u003cpre\u003e\n$ \u003cb\u003egit clone https://github.com/mweisel/cisco-csr1kv-vagrant-libvirt\u003c/b\u003e\n$ \u003cb\u003ecd cisco-csr1kv-vagrant-libvirt\u003c/b\u003e\n\u003c/pre\u003e\n\n7\\. Run the Ansible playbook.\n\n\u003cpre\u003e\n$ \u003cb\u003eansible-playbook main.yml\u003c/b\u003e\n\u003c/pre\u003e\n\n8\\. Copy (and rename) the Vagrant box artifact to the `boxes` directory.\n\n\u003cpre\u003e\n$ \u003cb\u003ecp cisco-csr1kv.box $HOME/boxes/cisco-csr1000v-17.03.02.box\u003c/b\u003e\n\u003c/pre\u003e\n\n9\\. Copy the box metadata file to the `boxes` directory.\n\n\u003cpre\u003e\n$ \u003cb\u003ecp ./files/cisco-csr1000v.json $HOME/boxes/\u003c/b\u003e\n\u003c/pre\u003e\n\n10\\. Change the current working directory to `boxes`.\n\n\u003cpre\u003e\n$ \u003cb\u003ecd $HOME/boxes\u003c/b\u003e\n\u003c/pre\u003e\n\n11\\. Substitute the `HOME` placeholder string in the box metadata file.\n\n\u003cpre\u003e\n$ \u003cb\u003eawk '/url/{gsub(/^ */,\"\");print}' cisco-csr1000v.json\u003c/b\u003e\n\"url\": \"file://\u003cb\u003eHOME\u003c/b\u003e/boxes/cisco-csr1000v-VER.box\"\n\n$ \u003cb\u003esed -i \"s|HOME|${HOME}|\" cisco-csr1000v.json\u003c/b\u003e\n\n$ \u003cb\u003eawk '/url/{gsub(/^ */,\"\");print}' cisco-csr1000v.json\u003c/b\u003e\n\"url\": \"file://\u003cb\u003e/home/marc\u003c/b\u003e/boxes/cisco-csr1000v-VER.box\"\n\u003c/pre\u003e\n\n12\\. Also, substitute the `VER` placeholder string with the Cisco IOS XE version you're using.\n\n\u003cpre\u003e\n$ \u003cb\u003eawk '/VER/{gsub(/^ */,\"\");print}' cisco-csr1000v.json\u003c/b\u003e\n\"version\": \"\u003cb\u003eVER\u003c/b\u003e\",\n\"url\": \"file:///home/marc/boxes/cisco-csr1000v-\u003cb\u003eVER\u003c/b\u003e.box\"\n\n$ \u003cb\u003esed -i 's/VER/17.03.02/g' cisco-csr1000v.json\u003c/b\u003e\n\n$ \u003cb\u003eawk '/\\\u0026lt;version\\\u0026gt;|url/{gsub(/^ */,\"\");print}' cisco-csr1000v.json\u003c/b\u003e\n\"version\": \"\u003cb\u003e17.03.02\u003c/b\u003e\",\n\"url\": \"file:///home/marc/boxes/cisco-csr1000v-\u003cb\u003e17.03.02\u003c/b\u003e.box\"\n\u003c/pre\u003e\n\n13\\. Add the Vagrant box to the local inventory.\n\n\u003cpre\u003e\n$ \u003cb\u003evagrant box add cisco-csr1000v.json\u003c/b\u003e\n\u003c/pre\u003e\n\n## Debug\n\nTo view the telnet session output for the `expect` task:\n\n\u003cpre\u003e\n$ \u003cb\u003etail -f ~/csr1kv-console.explog\u003c/b\u003e\n\u003c/pre\u003e\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmweisel%2Fcisco-csr1kv-vagrant-libvirt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmweisel%2Fcisco-csr1kv-vagrant-libvirt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmweisel%2Fcisco-csr1kv-vagrant-libvirt/lists"}