Migrating jails from one server to another - cannot use on new user

Status
Not open for further replies.

Crispin

Explorer
Joined
Jun 8, 2011
Messages
85
Folks,

I installed a new FN server and moving jails from one to the other causes the new one fail.

On old server I used the following:
Code:
warden export jailname


It then creates a file for me.
I copy said file over and use
Code:
warden import path/to/file
Code:

It imports fine.

In the new server gui I can see the jail. When trying to start it or edit it I get the following:
Code:
Environment:

Software Version: FreeNAS-9.10.1 (d989edd)
Request Method: GET
Request URL: http://nas/jails/restart/1


Traceback:
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  105.					 response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/usr/local/www/freenasUI/../freenasUI/freeadmin/middleware.py" in process_view
  156.		 return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  22.				 return view_func(request, *args, **kwargs)
File "/usr/local/www/freenasUI/../freenasUI/jails/views.py" in jail_restart
  183.	 jail = models.Jails.objects.get(id=id)
File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py" in get
  151.		 return self.get_queryset().get(*args, **kwargs)
File "/usr/local/www/freenasUI/../freenasUI/jails/queryset.py" in get
  155.				 "Query returned multiple Jails"

Exception Type: MultipleObjectsReturned at /jails/restart/1
Exception Value: Query returned multiple Jails

upload_2016-10-1_8-37-13.png
Any interaction with the jail produces this. Should you be able to migrate jails in this way? Thanks C
 
D

dlavigne

Guest
What are the FreeNAS build versions (from System -> Information) on each FreeNAS system? Was the jail originally created on a 9.3 or 9.10 system?
 

Crispin

Explorer
Joined
Jun 8, 2011
Messages
85
Sorry, should have said -

System Information
Hostname
nas.local Edit
Build FreeNAS-9.10.1 (d989edd)
Platform AMD Turion(tm) II Neo N54L Dual-Core Processor
Memory 16322MB
System Time Sun Aug 21 09:53:22 BST 2016
Uptime 9:53AM up 15 days, 11:28, 1 user
Load Average 0.76, 0.70, 0.62


The new server is also on the same version.

I first tried this with a jail built on the previous version (would that be 9.3?) but it also happens with a test jail created on the same versions.

C
 
D

dlavigne

Guest
It's my understanding that warden import/export isn't fully supported on FreeNAS. One quick and dirty way would be to make a tarball of the jail's dataset. Alternately, you could mount a snapshot of the jail's dataset and copy it's contents to the other system.
 

Crispin

Explorer
Joined
Jun 8, 2011
Messages
85
It does seem that it's not fully sound.

I tried doing a zfs send with the aim of copying the content over but in reality, none of my jails have content; they are just empty "machines" so I ended up reinstalling them all one at a time.

I will put in a feature request for a way to migrate them. While not the most used thing out they sure will be handy.
 
Status
Not open for further replies.
Top