This content follows experimental nightly development software. Pre-release software is intended for testing purposes only. Use the Product and Version selectors above to view content specific to a stable software release.
Configuring TrueNAS to work with virtualized features, such as virtual machines (VMs) and applications, is part of the setup process that, when optimized, takes advantage of the network storage capabilities that TrueNAS offers.
Before You Begin
This article assumes you have the latest release version of TrueNAS installed on your system.
The following steps are a list of configuration prerequisites you have completed and are familiar with before beginning VM and application installations.
Network Configuration
The primary network interface is configured as part of the installation process.
Go to Network > Global Configuration screen in the TrueNAS web UI to determine if the default gateway, host name, domain, and DNS name servers have been configured correctly.
See Console Setup Menu Configuration for more information on network settings.
If VMs need to access local NAS storage, you need to create a network bridge and assign it to the VM.
Applications or sandboxes that need access to local storage within the container must use a bridge or mount a local storage location as a host path for the application.
VLAN Configuration (Optional)
You can configure a virtual LAN (VLAN) to route traffic for your VMs.
VLAN benefits include the reduction of broadcast traffic and the ability to group resources in different physical locations into a broadcast domain.
VLANs virtually segment a network.
Different VLANs can communicate with each other using layer 3 devices.
See Setting Up a Network VLAN for more information on creating virtual LANs (VLAN).
Storage Configuration
Storage pool creation is part of the initial process of setting up storage.
A TrueNAS dataset is a file system within a data storage pool.
See Setting Up Storage to review storage pool creation and Adding and Managing Datasets for information on dataset configuration.
Shares Configuration
After creating the pool and datasets, set up shares to enable data access and sharing.
Different types of data sharing methods are discussed in Setting Up Data Sharing.
You should investigate more specific coverage of each share based on your use case.
See Adding NFS Shares for information on creating a basic NFS share.
Adjust access permissions using the advanced options.
Directory Services Configuration
Certain directory services must be set up as part of SMB and NFS share configuration.
See Active Directory Screen for a better understanding of how to configure Active Directory and Configuring Kerberos for an outline of required Kerberos information.
For LDAP best practices see Configuring LDAP.
Virtualization Configuration
Virtualization in TrueNAS 25.04
With this change comes redesigned Virtualization screens in the TrueNAS UI.
The content in this article is in the process of being rewritten to reflect new virtualization features and procedures.
Migrating VMs from 24.10 to 25.04
Manual Migration Required
Due to configuration incompatibilities between the previous KVM hypervisor implementation (TrueNAS 24.10 and earlier) and Incus in TrueNAS 25.04 (and later), existing VMs do not automatically migrate on upgrade from 24.10.X to 25.04.
However, storage zvols are retained, allowing users to easily recreate previously configured VMs.
Manual Migration Instructions
To manually migrate VMs from 24.10 (latest) to 25.04, users should first prepare to migrate by gathering image files and recording existing configuration settings.
After updating to 25.04, use the configuration details gathered above to recreate VMs with the same resource allocations and mount existing storage zvols.
Preparing to Migrate VMs from 24.10
Screenshot or record existing VM configuration(s).
Go to Virtualization and click on a VM to expand that row.
Click Edit to open the Edit VM screen and note the existing configuration.
Save your configuration settings in an external location to reference later.
These settings do not migrate and must be recreated after upgrading to 25.04.
Record the existing zvol storage location and virtual device configuration.
Go to Virtualization and click on a VM to expand that row.
Click device_hubDevices.
Click more_vert in the Disk row and select Edit.
Note the configured path in Zvol as well as the storage Mode and the Disk Sector Size.
Continue to note all other VM devices and associated configuration settings.
Record this information in an external location along with the configuration settings gathered above.
Locate or download the required iso image files.
Access the VM via Display or Serial Shell and confirm the installed OS and version.
Refer to documentation for the installed OS if needed to locate the installed version.
If the installed image (iso) file is stored on the TrueNAS system or in an external location, note this path and record it along with the other configuration settings.
If needed, download a fresh image file matching the installed OS and Version
Recreating VMs in 25.04
After upgrading to 25.04, go to Virtualization and click Select Pool to open the virtualization Global Settings screen.
Use the Pool dropdown to select a pool for virtualization service storage.
Accept default networking settings or modify as needed, then click Save.
Click Create New Instance and recreate previous VM configuration(s).
Select VM for Virtualization Method and select or upload the iso file in Image.
Using the configuration settings you recorded before updating, replicate the previous VM configuration.
Select the existing zvol for the VM as the storage source in Disks.
Click Create.
To run a virtual machine (VM), hardware requirements include an x86 machine running a recent Linux kernel using either an Intel processor with VT extensions or an AMD processor with SVM extensions (AMD-V).
To install a VM, first research the minimum and recommended specifications for the OS you plan to use and your full use case for that VM.
Allocating too many resources to a VM can cause performance on the TrueNAS system to suffer.
We recommend you plan for and ensure your system has the resources to run itself and a full VM deployment effectively, taking into account the need for high availability (HA) and persistent storage.
Software requirements include an installer for the OS you intend to install on the VM.
A TrueNAS storage pool is required.
We recommend you create additional datasets beneath the storage pool to organize your VM data further.
The first time you open the Applications screen, it displays an Apps Service Not Configured status on the screen header.
Click Settings > Choose Pool to choose a storage pool for Apps.
A storage pool for applications must be chosen before application installation can begin.
Select a pool with enough space for all the application containers you intend to use.
Set up a new dataset before installing your applications if you want to store your application data in a separate location from other storage on your system.
After an Apps storage pool is configured, the status changes to Apps Service Running.
For custom applications, Install Custom App details each field on the Install Custom App screen.
Before beginning a custom application installation, determine the following information:
Container host networking requirements, including host interface
IP address management: DHCP or static IP
DNS policy and nameservers
Container entrypoint (executables run when the container is started): commands or arguments
Container environment variables: names and values
Port forwarding
Storage: host path and mount path configuration
You can find additional options for configuring general network interfaces and IP addresses for application containers in Apps > Settings > Advanced Settings.