FreeBSD is a Unix-like operating system known for its advanced networking, high performance, robust security, and broad compatibility. This topic covers support for different FreeBSD versions on Alibaba Cloud and explains how to upgrade across major releases.
Support in the Alibaba Cloud console
Operating system | Image ID | Password at creation | Key pair at creation | Password change | Key pair change |
FreeBSD 15.0 | freebsd_15_0_x64_30G_alibase_20260320.qcow2 | Not supported | Supported | Supported | Supported |
FreeBSD 14.4 | freebsd_14_4_x64_30G_alibase_20260320.qcow2 | Not supported | Supported | Supported | Supported |
FreeBSD 14.3 | freebsd_14_3_x64_30G_alibase_20260320.qcow2 | Not supported | Supported | Supported | Supported |
FreeBSD 14.1 | freebsd_14_1_x64_30G_alibase_20241209.qcow2 | Not supported | Supported | Not supported | Not supported |
FreeBSD 13.5 | freebsd_13_5_x64_30G_alibase_20260320.qcow2 | Not supported | Supported | Supported | Supported |
FreeBSD 13.4 | freebsd_13_4_x64_30G_alibase_20241209.qcow2 | Not supported | Supported | Not supported | Not supported |
FreeBSD 13.0 | freebsd_13_0_x86_30G_alibase_20220324.vhd | Not supported | Supported | Not supported | Not supported |
FreeBSD 12.3 | freebsd_12_3_x64_30G_alibase_20220331.vhd | Not supported | Supported | Not supported | Not supported |
FreeBSD 12.1 | freebsd_12_1_x64_30G_alibase_20201022.vhd | Not supported | Supported | Not supported | Not supported |
FreeBSD 11.4 | freebsd_11_4_x64_30G_alibase_20210319.vhd | Supported | Supported | Supported | Supported |
FreeBSD 11.3 | freebsd_11_3_x64_30G_alibase_20200803.vhd | Supported | Supported | Supported | Supported |
FreeBSD 11.2 | freebsd_11_02_64_30G_alibase_20190806.vhd | Supported | Supported | Supported | Supported |
The following examples illustrate the support differences for FreeBSD in the Alibaba Cloud console.
FreeBSD 11.4
When you create an ECS instance, you can set a password or an SSH key pair as the login credential.

After the ECS instance is created, you can change the password.

FreeBSD 13.0
When you create an ECS instance, you can only select an SSH key pair as the login credential. Password authentication is not supported.

After the ECS instance is created, the SSH key pair cannot be changed.

Support for FreeBSD 11/12
FreeBSD 11 and 12 require kernel patches to run on ECS instances of fifth-generation or later instance families. Without these patches, the operating system cannot start. The public images for FreeBSD provided by Alibaba Cloud include these patches and support these instance families. You can check the instance family generation by calling the DescribeInstanceTypeFamilies API operation and checking the Generation parameter.
The operating system may fail to start in the following scenarios. To prevent or resolve this issue, you can apply a patch to the FreeBSD kernel source code and compile the kernel.
If you use a custom image or a FreeBSD image not provided by Alibaba Cloud to create an ECS instance, the instance may fail to start if it belongs to a fifth-generation or later instance family.
If you use a public image of FreeBSD to create an ECS instance and then update the kernel by using a command such as
freebsd-update, the instance may fail to start if it belongs to a fifth-generation or later instance family.NoteYou can use
freebsd-updateto upgrade to a FreeBSD 13 release. For details, see Upgrade FreeBSD across major releases.
This example shows how to patch and compile the kernel using the FreeBSD 12.4 source code.
Download and decompress the FreeBSD kernel source code.
wget https://mirrors.aliyun.com/freebsd/releases/amd64/12.4-RELEASE/src.txz -O /src.txz cd / tar -zxvf /src.txzDownload the patch.
This example applies
0001-virtio.patchto the virtio driver.cd /usr/src/sys/dev/virtio/ wget https://ecs-image-tools.oss-cn-hangzhou.aliyuncs.com/0001-virtio.patch patch -p4 < 0001-virtio.patchCopy the kernel configuration file, and then compile and install the kernel.
The
make -j<N>command specifies the number of parallel compilation jobs. The value of N depends on your vCPU count. For example, on an instance with 1 vCPU, we recommend setting the value to-j2for a vCPU-to-job ratio of1:2.cd /usr/src/ cp ./sys/amd64/conf/GENERIC . make -j2 buildworld KERNCONF=GENERIC make -j2 buildkernel KERNCONF=GENERIC make -j2 installkernel KERNCONF=GENERICAfter the compilation is complete, delete the source code.
rm -rf /usr/src/* rm -rf /usr/src/.*
Support for FreeBSD 13 and later
FreeBSD 13 and later versions already include the kernel patches required to run on fifth-generation and later ECS instance families. The relevant patches are:
However, you must add the kern.maxphys=65536 kernel parameter to ensure the system runs correctly. Run the following command to set this parameter:
echo "kern.maxphys=65536" >>/boot/loader.confThe official Alibaba Cloud public image for FreeBSD 13 uses kernel version 13.0-Release-p8. This image includes both patches and the required kernel parameter, making it ready to use.
Upgrade FreeBSD across major releases
This example shows how to upgrade FreeBSD from version 12.3 to 13.1.
Run the upgrade command.
freebsd-update upgrade -r 13.1-RELEASE
Expected output:

Follow the prompts to run the installation command.
/usr/sbin/freebsd-update install
Expected output:

Run the following command to configure loader.conf to ensure the new system runs correctly.
echo "kern.maxphys=65536" >>/boot/loader.confRun the following command to restart the instance.
WarningRestarting the instance causes it to stop, which may interrupt your services. We recommend that you perform this operation during off-peak hours.
rebootRun the following command to check the version.
uname -r
If the upgrade was successful, the output shows the new version number.

References
For more information about FreeBSD, see the FreeBSD official documentation.