# Hamachi Xen DomU

## jon123

I am trying to run Hamachi inside a DomU.  I have it running fine on my Dom0.  

I am using a 2.6 kernel for both they are the same kernel except the changes specifed at http://gentoo-wiki.com/Xen#Manually_building_the_kernel.  

I know this is set with * 

 *Quote:*   

> device drivers->network device support->Universal TUN/TAP device driver

 

Also /proc/config.gz has CONFIG_TUN=y.

Here is the error when trying to start the service.

 *Quote:*   

> mercury ~ # /etc/init.d/hamachi start
> 
>  * Starting tuncfg ...
> 
> tuncfg: cannot stat() /dev/net/tun -- No such file or directory
> ...

 

Trying to run tuncfg on its own gives the same response

 *Quote:*   

> mercury ~ # tuncfg
> 
> tuncfg: cannot stat() /dev/net/tun -- No such file or directory
> 
> tuncfg: visit http://www.hamachi.cc/tuntap for more information

 

The error is right there is no /dev/net.  Am I trying to do something not possible?  I am thinking that one of the XEN kernel settings is blocking this. 

Here is the settings from XEN in menuconfig for my domU.

 *Quote:*   

> 
> 
> [ ] Privileged Guest (domain 0)
> 
> < > PCI device backend driver
> ...

 

Maybe i need to set Block device tap driver?

----------

## mathfeel

 *jon123 wrote:*   

> I am trying to run Hamachi inside a DomU.  I have it running fine on my Dom0.  
> 
> I am using a 2.6 kernel for both they are the same kernel except the changes specifed at http://gentoo-wiki.com/Xen#Manually_building_the_kernel.  
> 
> I know this is set with * 
> ...

 

Check lsmod, I suspect that tun is not inserted, which you can do by

```
modprobe tun
```

To do this automatically at startup, add:

```
tun
```

in your /etc/modules.autoload.d/kernel-2.6

This solution is simple enough, but I want to ask a follow up question. Is it possible to use some sort of udev rule or dbus whatever (I am very unfamiliar with these two items) to have this modules loaded when, say, eth1 is started?

----------

## jon123

Since tun is compiled into the kernel and not as a module modprobe doesnt work.  

On the dom0 where tun is working

```

myth kernel # modprobe tun

FATAL: Module tun not found.

```

```

myth kernel # lsmod

Module                  Size  Used by

usb_storage            64448  0

usblp                  13440  0

uhci_hcd               29328  0

atkbd                  16656  0

pcspkr                  4356  0

ohci1394               31792  0

ieee1394               88376  1 ohci1394

ehci_hcd               27656  0

ohci_hcd               19460  0

rtc                    10000  0

usbcore               114052  6 usb_storage,usblp,uhci_hcd,ehci_hcd,ohci_hcd

ntfs                   92916  0

fuse                   36620  4

```

The domU has no modules running and gives the same error with modprobe.

This is strange on the domU.  It is the same output as the dom0

```

mercury log # dmesg | grep tun

tun: Universal TUN/TAP device driver, 1.6

tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>

```

I don't know about having udev or dbus to load the modules.  sry

----------

