UDP Tunnel connect failed when the vm is running

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
feverwind
Posts: 13
Joined: 17. Jul 2013, 09:49

UDP Tunnel connect failed when the vm is running

Post by feverwind »

Below is my topology:

VM1 <-----------------> VM2
network adpter1 network adpter1

I use udp tunnel connect two network card when the both side VM is running. If i connect and disconnect the two Adapter more than 3 times, sometimes I ping peer side VM failed.

my code is below

connect

Code: Select all

netadp = Session.getNetworkAdapter(0)
netadp.attachmentType = self.constants.NetworkAttachmentType_Generic
netadp.genericDriver = u"UDPTunnel"
netadp.setProperty(u"sport", str(iSrcPort))
netadp.setProperty(u"dest", str(daddr))
netadp.setProperty(u"dport", str(iDestPort))
Session.saveSettings()

disconnect

Code: Select all

netadp = Session.getNetworkAdapter(0)

netadp.genericDriver = u""
netadp.setProperty(u"sport", u"")
netadp.setProperty(u"dest", u"")
netadp.setProperty(u"dport", u"")
netadp.attachmentType = self.constants.NetworkAttachmentType_Null
Session.saveSettings()
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: UDP Tunnel connect failed when the vm is running

Post by noteirak »

Please post a standalone code that produce your error, not just a snipset.
Also, you use UDPTunnel as driver - this is not part of the official package AFAIK (maybe in the SVN?) so you might need to seek support to the entity who created that driver.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
feverwind
Posts: 13
Joined: 17. Jul 2013, 09:49

Re: UDP Tunnel connect failed when the vm is running

Post by feverwind »

noteirak wrote:Please post a standalone code that produce your error, not just a snipset.
Also, you use UDPTunnel as driver - this is not part of the official package AFAIK (maybe in the SVN?) so you might need to seek support to the entity who created that driver.
I use the official version 4.2.22, the genericDriver parameter i use accord to the virtualbox API Handbook.
what is your method to create the udp tunnel by virtualbox API.
Post Reply