{"id":15352439,"url":"https://github.com/vorburger/openstack-devstack-opendaylight-vagrant","last_synced_at":"2026-05-20T05:32:11.070Z","repository":{"id":137679161,"uuid":"84119043","full_name":"vorburger/openstack-devstack-opendaylight-vagrant","owner":"vorburger","description":null,"archived":false,"fork":false,"pushed_at":"2018-04-03T16:35:09.000Z","size":37,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T18:45:06.085Z","etag":null,"topics":["devstack","opendaylight","openstack","vagrant"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vorburger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-03-06T20:45:28.000Z","updated_at":"2024-07-16T18:20:55.000Z","dependencies_parsed_at":"2024-02-01T20:59:12.017Z","dependency_job_id":"f0309104-682f-4c56-b3fd-aea536d3565b","html_url":"https://github.com/vorburger/openstack-devstack-opendaylight-vagrant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorburger%2Fopenstack-devstack-opendaylight-vagrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorburger%2Fopenstack-devstack-opendaylight-vagrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorburger%2Fopenstack-devstack-opendaylight-vagrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorburger%2Fopenstack-devstack-opendaylight-vagrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vorburger","download_url":"https://codeload.github.com/vorburger/openstack-devstack-opendaylight-vagrant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245864805,"owners_count":20685108,"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":["devstack","opendaylight","openstack","vagrant"],"created_at":"2024-10-01T12:09:29.949Z","updated_at":"2026-05-20T05:32:06.051Z","avatar_url":"https://github.com/vorburger.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"If you like/use this project, a Star / Watch / Follow me on GitHub is appreciated.\n\n\nWhat?\n=====\n\nopenstack-devstack-opendaylight-vagrant is a Vagrant-based utility\nto create an OpenStack devstack environment virtual machine\n(based on a Fedora Cloud base image) useful for development\nof OpenDaylight.\n\n\nHow?\n----\n\nThe very first time, make sure you have Vagrant incl. KVM (_TODO or, test later, VirtualBox) installed, e.g. like this on Fedora:\n\n    sudo dnf install vagrant libvirt vagrant-libvirt\n\nor like this on Ubuntu:\n\n    sudo apt-get install qemu-kvm libvirt-bin libvirt-dev\n    vagrant plugin install vagrant-libvirt\n\nThe very first time, optionally one time install required Vagrant plugins, e.g. like this on Fedora:\n\n    sudo dnf install zlib-devel libvirt-devel ruby-devel\n    gem install nokogiri -v '1.6.8.1'\n    vagrant plugin install vagrant-sshfs\n\nor like this on Ubuntu:\n\n    sudo dnf install zlib1g-dev libvirt-dev ruby-dev\n    sudo gem install nokogiri -v '1.6.8.1'\n    vagrant plugin install vagrant-sshfs\n\nIf you are having any trouble with this, you can alternatively also just comment out the \"synced_folder type: sshfs\" in the Vagrantfile.  This (vagrant-sshfs) is only used to keep a .dnf-cache/ dir outside the VM, so that frequent vagrant up \u0026 vagrant destroy are faster.  So you can forget about it (by commenting out the use of sshfs), if you don't mind waiting a moment longer for the dnf in the VM.\n\nNow get an OpenDaylight distribution on your host (not in the VM); either by DL a package, or build a local development env, for example:\n\n    git clone https://git.opendaylight.org/gerrit/p/netvirt.git\n    cd netvirt/vpnservice/distribution/karaf\n    mvn clean package\n\nAnd start OpenDaylight and install the (Karaf) feature `odl-netvirt-openstack` like this:\n\n    cd target/assembly/bin\n    ./karaf\n\n    opendaylight-user@root\u003efeature:install odl-netvirt-openstack\n\nTest that OpenDaylight started and netvirt openstack is running e.g. with a `grep \"StateManager all is ready\" ../data/log/karaf.log` and no unexpected exceptions.\n\nNow to provision and start the VM with OpenStack devstack using the Vagrant libvirt provider for KVM, just:\n\n    vagrant up --provider=libvirt\n\nand that should finish, after quite a while, with a `DevStack Component Timing` message.  http://192.168.150.10/identity/ should return some JSON now.\n\nThe OpenStack /dashboard UI (Horizon) is now available on http://192.168.150.10/dashboard/ (unless de-activated by commenting `enable_service horizon` in local.conf, to save memory); login as admin/admin.\n\n\nlocal.conf changes\n------------------\n\nTo tweak the OpenStack configuration, login to the VM, and in local.conf change the `RECLONE` from `True` to `False` (and `OFFLINE` from `False` to `True`, *unless* you're e.g. enabling a new service):\n\n    vagrant ssh\n    sudo su - stack\n    cd /opt/stack/devstack\n\n    nano local.conf\n    ./unstack.sh\n    ./stack.sh\n\n\nRestart\n-------\n\nIf your VM dies (or you have to `vagrant halt` it for some reason), then you have to restart OS procs by doing `./stack.sh` again, as above.  Make sure you have `RECLONE=False` and `OFFLINE=True`.  It's slow! :-(\n\n_NB You may want to use `vagrant suspend` (NB the KVM qemu proc stays in memory!) and `vagrant resume` to save time re-stacking, but it seems to be broken with devstack VM (it resumes, but doesn't work... TODO Fix?!)_\n\n_TODO Figure out how to get \"vagrant snapshot\" working with KVM using https://github.com/miurahr/vagrant-kvm-snapshot, or switch to using VirtualBox instead of KVM?_\n\n\n\nUsage\n-----\n\n    vagrant ssh\n    sudo su - stack\n    cd /opt/stack/devstack\n    . openrc admin admin\n\n    neutron net-create n1\n    neutron subnet-create n1 --name s1 --allocation-pool start=10.11.12.20,end=10.11.12.30 10.11.12.0/24\n\n    nova flavor-list\n    nova flavor-create m1.nano auto 64 0 1\n    nova boot --image cirros-0.3.4-x86_64-uec --nic net-id=$(neutron net-list | awk \"/n1/ {print \\$2}\") --flavor m1.nano vm1\n    nova boot --image cirros-0.3.4-x86_64-uec --nic net-id=$(neutron net-list | awk \"/n1/ {print \\$2}\") --flavor m1.nano vm2\n    nova list\n    nova show vm2\n    sudo virsh list\n    nova console-log vm1\n\nUse web-based noVNC to get into vm1 \u0026 vm2:\n\n    nova get-vnc-console vm1 novnc\n\n_atkbd serio0: Use 'setkeycode 00 \u003ckeycode\u003e' to make it known. Unknown key pressed_ is an issue with novnc that has been fixed but not in this version, so: `cd /opt/stack/noVNC; git checkout v0.6.0; cd -`.\n\nIf it just says `further output written to /dev/ttyS0` but then waits for a long time (minutes, not seconds) until the \"login as 'cirros' user\" login prompt appears, then your vm1/vm2 failed to obtain an IP from DHCP; as an `ipconfig` will prove, after you've finally been able to login when the prompt does ultimately appear.. You can try to `sudo ifdown eth0` (it will probably say `ifdown: interface eth0 not configured`) and `sudo ifup eth0`, but that will probably just \"udhcp started\" (`/sbin/cirros-dhcp up|down`) and try x3 to \"Send discover\" and then `No leave, failing` ...  see [ODL OpenStack Troubleshooting](http://docs.opendaylight.org/en/stable-boron/submodules/netvirt/docs/openstack-guide/openstack-with-netvirt.html#vm-dhcp-issues) re. how to debug the 10.11.12.0/24 network namespace. (... _TODO_ ...)  _Workaround: Do a complete restack when this happens (?)_;, **TODO better solution for this problem?**\n\nIf the noVNC screen is just black, then this typically 'just' means that the VM is not reachable, see Troubleshoot section below.\n\n\n**PING**\n\nNow, from the novnc console or SSH of `vm1`, make sure that you can successfully ping the IP of `vm2` (shown by `nova list`).\n\n\nUndo\n----\n\nYou can undo what you've done above using these commands:\n\n    nova delete vm2\n    nova delete vm1\n    neutron subnet-delete s1\n    neutron net-delete n1\n\n_TODO test and confirm if this really works well, or document unstack os_reset.sh_\n\n\nTopology\n--------\n\n* 192.168.150.10 is the OpenStack devstack VM, hostname \"control\"\n* 192.168.150.1 is the host (your laptop / workstation), reachable from control\n* 192.168.121.x vagrant-libvirt default???\n* 192.168.122.1 virbr0 in BOTH control VM as well as host laptop - HUH?!\n* 10.11.12.20 tap* in the network namespace (not on control's `ifconfig`; visible with `netns exec qdhcp-... ifconfig`)\n* 10.11.12.2x range of `subnet-create n1` (above)\n\n\nTroubleshoot\n------------\n\nUse `-v` for verbose output from all `nova`, `neutron` etc. commands; e.g. `neutron -v net-create n2`.  But NB that `-v` _\"gives only the interaction with keystone\"_, for more, see:\n\nIn [devstack](https://docs.openstack.org/developer/devstack/development.html), all services run as [screen](https://www.gnu.org/software/screen/manual/screen.html#Commands), so:\n\n    vagrant ssh\n    sudo su - stack\n    screen -x stack\n\nDetach with `Ctrl-a, d`; Next/Previous screen with `Ctrl-a, n/p` (NB `*` indicating current screen) - e.g. `q-svc` is Neutron Server, where log messages from the _neutron.plugins.ml2.managers_ re. _Mechanism driver 'opendaylight'_ show any ODL related problem.\n\nEnter _scrolling (copy) mode_ with `Ctrl-a, [` - but beware, this will \"lock up\" (pause) processses, so you *MUST* exit scroll/copy mode by pressing `Enter` twice (or `Ctrl-a, ]`).\n\nTo debug the networking, compare the output of the following commands between a broken and a working environment, examples:\n\n    $ sudo ovs-vsctl show\n    Manager \"tcp:192.168.150.1:6640\"\n        is_connected: true\n    Bridge br-int\n        Controller \"tcp:192.168.150.1:6653\"\n            is_connected: true\n\n    $ sudo ovs-ofctl -OOpenFlow13 show br-int\n    It's OK to see DOWN here, this doesn't actually indicate a problem (TODO why?):\n      config:     PORT_DOWN\n      state:      LINK_DOWN\n\n    $ sudo ovs-ofctl -OOpenFlow13 dump-flows br-int | head\n     cookie=0x8000000, duration=100175.679s, table=0, n_packets=1351, n_bytes=130184, priority=4,in_port=1 actions=write_metadata:0x10000000000/0xffffff0000000001,goto_table:17\n     cookie=0x8000000, duration=99996.114s, table=0, n_packets=176, n_bytes=14956, priority=4,in_port=2 actions=write_metadata:0x20000000000/0xffffff0000000001,goto_table:17\n     cookie=0x8000000, duration=99679.741s, table=0, n_packets=143, n_bytes=13570, priority=4,in_port=3 actions=write_metadata:0x30000000000/0xffffff0000000001,goto_table:17\n\nMake sure there are flows for table=0, and the n_packets and n_bytes counters actually show traffic, not just 0.  It's then interesting to watch a christmas of the flow hits light up on live traffic while you e.g. ping:\n\n    watch -d \"sudo ovs-ofctl -OOpenFlow13 dump-flows br-int\"\n\nIf there is too much happening, or to zoom in to certain flows, it helps to use `grep` e.g. like this:\n\n    watch -d \"sudo ovs-ofctl -OOpenFlow13 dump-flows br-int | grep -o table=24.*\"\n\nan alternative (more suitable for low traffic) is to see the exact live action happening is to use `ovs-dpctl dump-flows` instead of `ovs-ofctl dump-flows` :\n\n    while true; do echo \"\u003e\u003e\u003e\u003e\u003e\"; sudo ovs-dpctl dump-flows; sleep 1; done\n\nUsing `ofproto/trace` is useful, as seen [ODL OpenStack Troubleshooting](http://docs.opendaylight.org/en/stable-boron/submodules/netvirt/docs/openstack-guide/openstack-with-netvirt.html#vm-dhcp-issues):\n\n    sudo ovs-appctl ofproto/trace br-int ...\n\nHere's how to check things on the OpenDaylight side:\n\n    curl -u admin:admin http://localhost:8181/restconf/config/neutron:neutron/networks | python -mjson.tool\n    curl -u admin:admin http://localhost:8181/restconf/config/ietf-interfaces:interfaces | python -mjson.tool\n    curl -u admin:admin http://localhost:8181/restconf/operational/ietf-interfaces:interfaces-state | python -mjson.tool\n\nYou can also attempt to launch commands inside the network namespace, but it's normal that the following does NOT WORK, the flows prevent this traffic _(TODO why?):_\n\n    ip netns\n    qdhcp-...\n    sudo ip netns exec qdhcp-... ping 10.11.12.x\n    sudo ip netns exec qdhcp-... ssh cirros@10.11.12.x\n\nbut you CAN e.g. check `ifconfig`and `route` inside the network namespace, like this:\n\n    $ sudo ip netns exec qdhcp-4d732098-0f04-4a39-8249-c7b48290ed7e ifconfig\n    lo: flags=73\u003cUP,LOOPBACK,RUNNING\u003e  mtu 65536\n        inet 127.0.0.1  netmask 255.0.0.0\n    (...)\n    tapd1ff9e96-3a: flags=4163\u003cUP,BROADCAST,RUNNING,MULTICAST\u003e  mtu 1450\n        inet 10.11.12.20  netmask 255.255.255.0  broadcast 10.11.12.255\n\n    $ sudo ip netns exec qdhcp-... route\n    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface\n    default         gateway         0.0.0.0         UG    0      0        0 tapd1ff9e96-3a\n    10.11.12.0      0.0.0.0         255.255.255.0   U     0      0        0 tapd1ff9e96-3a\n    link-local      0.0.0.0         255.255.0.0     U     0      0        0 tapd1ff9e96-3a\n\nIf you hit this, while playing around with both KVM \u0026 VirtualBox:\n\n    Error while activating network: Call to virNetworkCreate failed: internal error: Network is already in use by interface vboxnet3.\n\nthen just stop VirtualBox completely and use `VBoxManage` to remove the interface created by VB on the network as Vagrant wants to create it for KVM:\n\n    /etc/init.d/virtualbox stop\n    VBoxManage hostonlyif remove vboxnet3\n\n\nSee also...\n-----------\n\nBackground:\n\n* http://docs.opendaylight.org/en/stable-boron/submodules/netvirt/docs/openstack-guide/openstack-with-netvirt.html#installing-openstack-and-opendaylight-using-devstack\n* https://docs.openstack.org/developer/devstack/networking.html\n* https://docs.openstack.org/developer/devstack/guides/devstack-with-nested-kvm.html\n\nFor local OpenDaylight development:\n\n* https://github.com/vorburger/opendaylight-eclipse-setup\n\nOther similar OpenStack installer kind of projects:\n\n* https://github.com/vpickard/ovs-lab\n* https://github.com/openstack-dev/devstack-vagrant/\n* https://github.com/flavio-fernandes/devstack-nodes\n* https://github.com/icclab/vagrant-devstack\n* https://github.com/julienvey/devstack-vagrant/\n* https://github.com/jhershberg/devstack-fedora-packer/blob/master/devstack-setup.sh\n* https://github.com/dfarrell07/ansible-opendaylight\n* https://github.com/opendaylight/integration-packaging/tree/master/docker/openstack/compute and more in opendaylight/integration-packaging\n* https://git.opendaylight.org/gerrit/#/c/43880/\n* OPNFV Apex installer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvorburger%2Fopenstack-devstack-opendaylight-vagrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvorburger%2Fopenstack-devstack-opendaylight-vagrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvorburger%2Fopenstack-devstack-opendaylight-vagrant/lists"}