TrueNAS SCALETrueNAS SCALE Version Documentation
This content follows the TrueNAS SCALE 23.10 (Cobia) releases. Use the Product and Version selectors above to view content specific to different TrueNAS software or major version.

Accessing NAS From a VM

  5 minute read.

Last Modified 2024-04-24 14:31 EDT

If you want to access your TrueNAS SCALE directories from a VM, you have multiple options. If your system has more than one physical interface, you can assign your VMs to a NIC other than the primary one your TrueNAS server uses. This method makes communication more flexible, but does not offer the potential speed of a bridge.

If you have only one physical interface, you must create a bridge interface for the VM to use.

Creating a Bridge: Single Physical Interface

If the only interface you have is a single physical interface, complete the following steps in order to create a network bridge:

  • If you have apps running, disable them before proceeding.
  • Clear the DHCP checkbox on the single physical interface you have, but don’t apply the changes.
  • Create a bridge interface and add your physical interface as a member. Configure relevant networking options such as DHCP.
  • Then apply the changes and connect to the UI with the new networking settings.
  • These steps are outlined below.

Creating a Bridge: One Active Interface

Go to Virtualization, find the VM you want to use to access TrueNAS storage, and toggle it off.

VirtualMachinesScreenwithVM

Edit Interface

You can also get the IP address and subnet mask in the TrueNAS SCALE CLI by entering network interface query.

network interface query
+--------+----------+------------------+------------------+-----------+-----------+-------------+--------+
| name   | type     | state.aliases    | aliases          | ipv4_dhcp | ipv6_auto | description | mtu    |
+--------+----------+------------------+------------------+-----------+-----------+-------------+--------+
| eno1   | PHYSICAL | 10.220.20.160/20 | 10.220.20.160/20 | false     | false     |             | <null> |
| eno2   | PHYSICAL | <empty list>     | <empty list>     | false     | false     |             | <null> |
| ens9f0 | PHYSICAL | <empty list>     | <empty list>     | false     | false     |             | <null> |
| ens9f1 | PHYSICAL | <empty list>     | <empty list>     | false     | false     |             | <null> |
| ens9f2 | PHYSICAL | <empty list>     | <empty list>     | false     | false     |             | <null> |
| ens9f3 | PHYSICAL | <empty list>     | <empty list>     | false     | false     |             | <null> |
+--------+----------+------------------+------------------+-----------+-----------+-------------+--------+

Go to Network > Interfaces and find the active interface you used as the VM parent interface. Note the interface IP Address and subnet mask. Click the interface.

NetworkInterfacesSCALE

The Edit Interface screen appears. If selected, clear the DHCP checkbox. Note the IP address and mask under Aliases. Click the X next to the listed alias to remove the IP address and mask. The Aliases field now reads No items have been added yet. Click Save.

EditInterfaceNicDeviceSCALE

The Interfaces widget displays the edited interface with no IP information.

NetworkInterfacesNoIPSCALE

Add Bridge Interface

To set up a bridge interface, from the Network screen:

  1. Click Add in the Interfaces widget. The Add Interface configuration screen displays.

AddInterfaceNicDeviceSCALE

  1. Select Bridge from the Type dropdown list. You cannot change the Type field value after you click Save.

  2. Enter a name for the interface. Use the format bondX, vlanX, or brX where X is a number representing a non-parent interface. Read-only when editing an interface. You cannot change the Name of the interface after you click Save.

  3. (Optional but recommended) Enter any notes or reminders about this particular bridge in the Description field.

  4. Select the interfaces on the Bridge Members dropdown list.

  5. Next to Aliases click Add to enter the IP address for this bridge interface. (Optional) click Add to display an additional IP address field for each additional IP address you want to add.

AddInterfaceNicDeviceOtherSettingsSCALE

  1. Click Save when finished. The created bridge shows in Interfaces with its associated IP address information.

To determine if network changes are suitable, click Test Changes.

VMTestNetworkChanges

VMTestNetworkChangesConfirm

Once TrueNAS finishes testing the interface, click Save Changes if you want to keep the changes. Click Revert Changes to discard the changes and return to the previous configuration.

VMSaveNetworkChanges

The new bridge interface displays with associated IP information.

NetworkInterfacesBridgeSCALE

Edit VM Device Configuration

Go to Virtualization, expand the VM you want to use to access TrueNAS storage, and click Devices. Click in the NIC row and select Edit. Select the new bridge interface from the Nic to Attach dropdown list, then click Save.

VMEditDeviceNIC

You can now access your TrueNAS storage from the VM. You might have to set up shares or users with home directories to access certain files.

VM Access Examples

Linux VMs can access TrueNAS storage using FTP, SMB, and NFS.

In the example below, the Linux VM is using FTP to access a home directory for a user on TrueNAS.

AccessNASfromVM6

AccessNASfromVM7

Windows VMs can access TrueNAS storage using FTP and SMB.

In the example below, the Windows VM accessing an SMB share on TrueNAS.

AccessNASfromVM8

AccessNASfromVM9

Related Content

Related Network Articles