{"action":"created","issue":{"url":"https://api.github.com/repos/pradels/vagrant-libvirt/issues/492","repository_url":"https://api.github.com/repos/pradels/vagrant-libvirt","labels_url":"https://api.github.com/repos/pradels/vagrant-libvirt/issues/492/labels{/name}","comments_url":"https://api.github.com/repos/pradels/vagrant-libvirt/issues/492/comments","events_url":"https://api.github.com/repos/pradels/vagrant-libvirt/issues/492/events","html_url":"https://github.com/pradels/vagrant-libvirt/issues/492","id":113314505,"number":492,"title":"Tunnel source IP not configurable via libvirt__tunnel_ip","user":{"login":"muelli","id":322807,"avatar_url":"https://avatars.githubusercontent.com/u/322807?v=3","gravatar_id":"","url":"https://api.github.com/users/muelli","html_url":"https://github.com/muelli","followers_url":"https://api.github.com/users/muelli/followers","following_url":"https://api.github.com/users/muelli/following{/other_user}","gists_url":"https://api.github.com/users/muelli/gists{/gist_id}","starred_url":"https://api.github.com/users/muelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muelli/subscriptions","organizations_url":"https://api.github.com/users/muelli/orgs","repos_url":"https://api.github.com/users/muelli/repos","events_url":"https://api.github.com/users/muelli/events{/privacy}","received_events_url":"https://api.github.com/users/muelli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pradels/vagrant-libvirt/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-26T09:24:29Z","updated_at":"2016-03-31T16:57:42Z","closed_at":null,"body":"I have two physical hosts and I want virtual machines running on them to talk to each via a private network.  I thought libvirt's tunnelling mechanism is appropriate.\r\n\r\nNow I've tried to follow the examples in the readme to bind the TCP server port on 0.0.0.0, but I failed.\r\nI ended up trying this:\r\n\r\n```\r\n  config.vm.define \"trusty\" do |machine|\r\n    machine.vm.network \"private_network\",\r\n        :libvirt__tunnel_type => 'server',\r\n        :libvirt__tunnel_ip => '0.0.0.0',\r\n        :libvirt__tcp_tunnel_ip => '0.0.0.0',\r\n        :libvirt__tunnel_local_ip => '0.0.0.0',\r\n        :libvirt__tcp_tunnel_local_ip => '0.0.0.0',\r\n        :libvirt__tunnel_port => 33344,\r\n        :libvirt__tunnel_local_port => 33345\r\n  end\r\n```\r\nwhich yields this machine XML:\r\n\r\n```\r\n    <interface type='server'>\r\n      <mac address='52:54:00:48:a4:76'/>\r\n      <source address='127.0.0.1' port='33344'/>\r\n      <model type='virtio'/>\r\n      <alias name='net1'/>\r\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>\r\n    </interface>\r\n```\r\nI am missing the \"0.0.0.0\" in the `<source address=>`.\r\n\r\nSimilarly, I'm trying to make a client connect to the remote host, but I seem to be unable to configure the target IP address.\r\nI've ended up trying\r\n```\r\n\r\n    config.vm.network \"private_network\",\r\n        :libvirt__tunnel_type => 'client',\r\n        :libvirt__tunnel_ip => '10.200.17.123',\r\n        :libvirt__tcp_tunnel_ip => '10.200.17.123',\r\n        :libvirt__tunnel_port => 33344\r\n\r\n```\r\nwhich yields\r\n```\r\n    <interface type='client'>\r\n      <mac address='52:54:00:85:5d:f7'/>\r\n      <source address='127.0.0.1' port='33344'/>\r\n      <model type='virtio'/>\r\n      <alias name='net1'/>\r\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>\r\n```\r\nand again, the target IP address is missing in the XML description.\r\n\r\nI seem to be running libvirt0-1.2.16-2ubuntu9 with vagrant-libvirt (0.0.32)."},"comment":{"url":"https://api.github.com/repos/pradels/vagrant-libvirt/issues/comments/204020462","html_url":"https://github.com/pradels/vagrant-libvirt/issues/492#issuecomment-204020462","issue_url":"https://api.github.com/repos/pradels/vagrant-libvirt/issues/492","id":204020462,"user":{"login":"infernix","id":162537,"avatar_url":"https://avatars.githubusercontent.com/u/162537?v=3","gravatar_id":"","url":"https://api.github.com/users/infernix","html_url":"https://github.com/infernix","followers_url":"https://api.github.com/users/infernix/followers","following_url":"https://api.github.com/users/infernix/following{/other_user}","gists_url":"https://api.github.com/users/infernix/gists{/gist_id}","starred_url":"https://api.github.com/users/infernix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infernix/subscriptions","organizations_url":"https://api.github.com/users/infernix/orgs","repos_url":"https://api.github.com/users/infernix/repos","events_url":"https://api.github.com/users/infernix/events{/privacy}","received_events_url":"https://api.github.com/users/infernix/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T16:57:42Z","updated_at":"2016-03-31T16:57:42Z","body":"@skamithi FWIW I had no problems with this config:\r\n\r\n```ruby\r\nENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'\r\nVAGRANTFILE_API_VERSION = \"2\"\r\n\r\nVagrant.configure(VAGRANTFILE_API_VERSION) do |config|\r\n\r\n  config.vm.box = \"CumulusVX-2.5.6-4048c0a8213324c0-libvirt\"\r\n  config.vm.box = \"https://spirit.infernix.net/vagrant/CumulusVX-2.5.6-4048c0a8213324c0-libvirt.box\"\r\n  config.vm.network :private_network, \r\n    :libvirt__tunnel_type => 'udp', \r\n    :libvirt__tunnel_local_ip => '192.168.0.3',\r\n    :libvirt__tunnel_local_port => 30001,\r\n    :libvirt__tunnel_ip => '192.168.0.3',\r\n    :libvirt__tunnel_port => 31001\r\n\r\n  config.vm.provider \"libvirt\" do |vb|\r\n    vb.memory = 4000\r\n    vb.cpus = 2\r\n  end\r\n  config.vm.synced_folder \".\", \"/vagrant\", disabled: true\r\nend\r\n```\r\n\r\nResults in this domain XML snippet:\r\n```xml\r\n    <interface type='udp'>\r\n      <mac address='52:54:00:44:b9:1a'/>\r\n      <source address='192.168.0.3' port='31001'>\r\n        <local address='192.168.0.3' port='30001'/>\r\n      </source>\r\n      <target dev='tnet1'/>\r\n      <model type='virtio'/>\r\n      <alias name='net1'/>\r\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>\r\n    </interface>\r\n```\r\n\r\nAnd this commandline snippet:\r\n\r\n`-netdev socket,udp=192.168.0.3:31001,localaddr=192.168.0.3:30001,id=hostnet1 `\r\n\r\nCan you confirm the issue is local? I'm on libvirt 1.3.1 with qemu 2.5."}}