Migrate jail system to fully virtualized system like qemu

Hi.

I have legacy (FreeBSD 7.4) bare metal host with jail in it.
Is it possible to move jail from this host into qemu virtual maschine by coping jail file system and kernel from host system?

Is it necessary to do anything else besides such copy?
 
Why do you have a need for a version that's been EoL for more than 6 years?
 
In ugly commercial software reasons on this host.
I have no chance to update system without brake this software =(
 
This software was written by request. Software support is no longer being implemented. We have no sources
 
Problen with this software is not it binary compatibility, but in library dependencies
I can't update the existing environment
 
You surprised me. I didn't know about misс/compat*. I will try, thanks.
But I want to remove the jail regardless of success. Сould You answer the main question of the topic?
 
I think it'll be easier if you do a clean install on the VM. Then move the application over. Just copying the files doesn't create the boot sector and swap for example. But you could do those by hand too. Set up the partitions, boot info, etc, then copy the files. Be careful though, there are lots of hard-linked files, a "plain" copy would break those and create independent files instead.
 
Hi.

I have legacy (FreeBSD 7.4) bare metal host with jail in it.
Is it possible to move jail from this host into qemu virtual maschine by coping jail file system and kernel from host system?

Is it necessary to do anything else besides such copy?

Yes, you can copy the Jail to a FreeBSD 12.0-RELEASE host physical or virtual. All you need to have is misc/compat7x installed on the host system.

You will need to adjust the rc.conf of the host system so that the jail can start properly
 
For the sake of the OP's original question: moving to qemu is possible. It all depends on the setup within the 7.4 system. But generally it's easier to first install FreeBSD and then move the application to it. My assumpiton: qemu host has graphics output. If not, you can play with the -console, -vnc and alike options to get the job done.

On a qemu host you could do the following:

Download the old FreeBSD from the archive here.
Prepare the virtual disk: qemu-img create -f qcow2 qbsd7.qcow2 10g
Launch the FreeBSD installer: qemu-system-x86_64 -hda qbsd7.qcow2 -cdrom FreeBSD-7.4-RELEASE-amd64-disc1.iso

Follow through the installation process and boot to the newly installed system. Then you can start migrating the application from old physical system to new virtual.
There's also an option to play with the virtio drivers to get the better performance out of it (I don't know if virtio drivers are supported on 7.4)

Again, there are more ways to skin a cat, this is one of them.
 
Yes, you can copy the Jail to a FreeBSD 12.0-RELEASE host physical or virtual. All you need to have is misc/compat7x installed on the host system.
To be complete, you actually need all these too:
misc/compat7x
misc/compat8x
misc/compat9x
misc/compat10x
misc/compat11x

7x is for running 7 binaries on 8, 8x is for 8 binaries on 9, etc. You need to "fill" this all the way to N-1, where N is the major version you have. The same is true for the required kernel options, COMPAT_FREEBSD7, COMPAT_FREEBSD8, etc.
 
Great thanks for all for help one more time.
I've run this jail in kvm virtual machine.

Best regards
 
There's also an option to play with the virtio drivers to get the better performance out of it (I don't know if virtio drivers are supported on 7.4)
Hello _martin, a little question, does qemu libraries serve as (devices, audio, copy/paste, folder) with FreeBSD as guest system?
 
does qemu libraries serve as (devices, audio, copy/paste, folder)
Not sure what you mean by that. You can define various types of devices within qemu instance. However all my FreeBSD machines are headless so I don't have any experience with setting up desktop-related features in qemu on FreeBSD.
 
Back
Top