# How to stop vnet Jails?



## gpatrick (Jun 7, 2012)

The title says it all. 

I can start vnet Jails at boot, but there is no method I have found that allows a vnet Jail to be stopped.

Has anyone stopped a vnet Jail and want to share how it is done?


----------



## SirDice (Jun 8, 2012)

Stop them like any other jail? Doesn't that work?

`# service jail stop`
Or 
`# /etc/rc.d/jail stop`

You can also stop/start a specific jail:
`# service jail stop myjail`


----------



## girgen@ (Jun 9, 2012)

[cmd=]# /etc/rc.d/jail stop left.example.net[/cmd]

```
Cannot 'stop' jail. Set Jail_enable to YES in /etc/rc.conf or use 'onestop' instead of 'stop'.
```

*Y*ou need, in rc.conf:

```
jail_enable="YES"
jail_list="left center right jtest"
...
jail_left_...
```
and then you stop the jail using `/etc/rc.d/jail stop left` not using the hostname but the "handle" name used in rc.conf.


----------



## girgen@ (Jun 9, 2012)

It seems to me that if you have PF in the kernel, then VIMAGE is extremely unstable when tearing down the vnet network, and it will almost always panic when the jail is killed.

But I just commented out the PF part in my kernel config, (basically all that is left is just VIMAGE, NULLFS and include GENERIC now) and while I still see the Freed UMA like described  above, it finally does not panic anymore.

I've tried both epair, using a heavily modified jail script, and netgraph using the vimage script from DruidBSD. While I like the simplicity of epairs, the sequential numbering annoys me, whereas with netgraph the interfaces are named using the jail name, nicer and simpler.

But anyway, for me, panics went away after removing PF from the kernel. It wasn't supported in 2010 and apparently still isn't properly working.


----------

