11. vCenter Plugin¶
The TrueNAS® vCenter Plugin integrates the control and operation of TrueNAS® into VMware vCenter Server.
11.1. New Features in 2.1.0¶
- Advanced provisioning
- Datastore snapshot management
- LUN management
- ZFS pool management
- ZFS pool heath status
- Role base access control
Note
The current vCenter plugin works with versions of vCenter up to vCenter 6.
11.2. Configuration¶
Click vCenter to open the plugin configuration screen shown in Figure 11.2.1.
Fig. 11.2.1 Configuring the vCenter Plugin
Table 11.2.1 lists the options on this screen.
| Setting | Value | Description |
|---|---|---|
| TrueNAS Management IP Address | drop-down menu | select the CARP address of the TrueNAS® system |
| vCenter Hostname/IP Address | string | the IP address or resolveable hostname of the vCenter Server |
| vCenter Port | integer | the port number on which the vCenter Server is listening |
| vCenter Username | string | the username for the vCenter Server |
| vCenter Password | string | the password associated with vCenter Username |
Enter the information, then click the Install button to add the TrueNAS® system as an object in vCenter Server. From vCenter Server, click the object to create its datastores.
In addition to the Install button, these buttons are available:
Uninstall: click to remove the TrueNAS® object from vCenter Server.
Upgrade: as more features are added to the vCenter plugin, the Available Plugin Version number is incremented. Click this button to upgrade to the newer version.
Repair: click this button at the request of an iXsystems support engineer. This reinstalls the TrueNAS® object to repair a corrupted object.
Note
In an HA system, the Upgrade button can only be used on the system that originally installed the plugin. The Upgrade button is disabled on the other HA node.
11.3. Secure Connections¶
The vCenter plugin can be configured for a secure connection by
clicking
vCenter → vCenter Auxiliary Settings
in the left tree. In the secure connection screen shown in
Figure 11.3.1, check the
Enable vCenter Plugin over https box.
Fig. 11.3.1 Securing the vCenter Plugin Connection
11.4. Using the vCenter Plugin¶
Log in to the vCenter server by entering the IP address in a web browser. From the main vSphere window, click vCenter Inventory Lists, TrueNAS Hosts, and TrueNAS to see the list of defined TrueNAS® hosts.
11.5. Hosts¶
The TrueNAS® hosts are listed on this screen. New hosts can be added by clicking the + button. Enter the new TrueNAS® host IP address, username, and password of that host to add it to the list of hosts managed by vCenter. Figure 11.5.1 shows the Add New Host window.
Fig. 11.5.1 Adding a New TrueNAS® Host
After a TrueNAS® host has been added, click its entry in the sidebar to view Summary and Manage options.
11.5.1. Host Information¶
Click the Summary tab to view basic information about the connected TrueNAS® host. IP address, Version, Storage Sizes, and status of additional features like NFS and HA are provided.
11.5.2. Manage Host¶
Click the Manage tab to view a number of options to modify a TrueNAS® host. Each option displays related modification buttons and, except for the TrueNAS Configuration option, a table that shows existing configurations. Highlight a table header and click the drop-down menu to sort the table or choose which columns to display.
11.6. Datastores¶
The vCenter plugin can create VMFS datastores on TrueNAS® hosts for iSCSI block-level access, or NFS datastores for file-level access.
11.6.1. VMFS Datastores¶
VMFS datastores provide block-level (iSCSI) storage for virtual machines.
11.6.1.1. Creating VMFS Datastores¶
Select the Datastore tab, then click the + button to create a datastore. Select the ESXi host on which the datastore is to be available, as shown in Figure 11.6.1, then click Next.
Fig. 11.6.1 Choosing an ESXi Host
Select VMFS as the datastore type and click Next. Figure 11.6.2 shows the configuration screen for the new datastore:
Fig. 11.6.2 Configuring a VMFS Datastore
Enter a name for the new datastore and the desired size. Datastore
names can only contain letters, numbers, and - and
. characters. Enter the IP address of the TrueNAS® system in
the Data Path IP box. Select the desired
VMFS Version from the drop-down. If a
Sparse Volume is desired, check the box.
Select the TrueNAS® volume on which to create the datastore, then click Next. Figure 11.6.3 shows the final summary screen:
Fig. 11.6.3 Finish Creating the Datastore
Click Finish to create the datastore. The datastore may not be immediately visible in the list of datastores. The Refresh button refresh the list contents to show new datastores.
11.6.1.2. Extending VMFS Datastores¶
Highlight a VMFS datastore from the list, then click the Edit button to begin extending the datastore. Figure 11.6.4 shows the Extend Datastore window.
Fig. 11.6.4 Extending a Datastore
Choose a new size for the datastore, then click Extend Datastore. A pop-up window appears, showing the system is extending the datastore.
Note
A datastore uses some of the space internally, resulting in the available capacity being slightly less than the amount chosen.
11.6.2. NFS Datastores¶
NFS datastores provide file-level storage access.
11.6.2.1. Creating NFS Datastores¶
Select the Datastore tab, then click the + button to create a datastore. Select the ESXi host on which the datastore is to be available. Click Next.
Select NFS as the datastore type, then click Next. Figure 11.6.5 shows the configuration window for the new NFS datastore.
Fig. 11.6.5 Configuring an NFS Datastore
Enter a name for the new datastore. Enter the IP address of the TrueNAS® system in the Data Path IP box. The path to the NFS share on the TrueNAS® system is entered in the Mount Share Path box. Click Next.
Fig. 11.6.6 New NFS Datastore Summary
The summary screen in Figure 11.6.6 is shown. Click Finish to create the datastore. The datastore might not be immediately visible in the list of datastores. Click the Refresh button to refresh the list contents.
11.6.3. Cloning Datastores¶
A datastore of either type can be cloned by selecting it in the list of datastores, then clicking the Clone button. Select the ESXi host on which the datastore is to be available. Click Next to see the window shown in Figure 11.6.7.
Fig. 11.6.7 Creating a Datastore Clone
Type a name for the clone datastore and click Clone Datastore. A pop-up displays when cloning begins. The new clone datastore may not be immediately visible. Click the Refresh button to refresh the list contents.
11.6.4. Snapshotting a Datastore¶
Highlight a datastore from the list and click the Create Snapshot button to snapshot that datastore. Type a name for the snapshot and click Create to create the new snapshot. The new snapshot is added to the Snapshot tab, separate from the Datastore tab.
11.7. Snapshots¶
See the Snapshots section for more details about creating and managing snapshots directly on the TrueNAS® system.
Available snapshots are listed in this tab. Figure 11.7.1 shows an example.
Fig. 11.7.1 Managing Snapshots
Buttons to Revert and Delete snapshots are available.
Revert returns a datastore to the state saved by the selected snapshot. When choosing a snapshot, be sure it is associated with the proper datastore. Click Revert and confirm this is correct by clicking Yes in the window that appears. The system then rolls the datastore back to the state saved in the snapshot.
11.7.1. Scheduling: Periodic Snapshots¶
See the Periodic Snapshot Tasks section for more details about native TrueNAS® periodic snapshots.
The Scheduling tab is used to Create, Edit, and Delete periodic snapshot schedules.
Click the + button to begin creating a new snapshot schedule, as shown in Figure 11.7.2.
Fig. 11.7.2 Creating a New Periodic Snapshot Task
The Datastore, Lifetime, Begin, End, Interval, and Weekdays options must be configured before the schedule can be saved.
Note
For detailed descriptions of each option, see the Periodic Snapshot Options table.
When satisfied with the configuration, click OK to save the schedule and add it to the list. If the new schedule is not immediately visible, click the Refresh button to repopulate the list of saved schedules.
Select a schedule from the list and click Edit to open the configuration window for that schedule. Make any needed adjustments, then click Save to save the updated schedule.
11.8. Replication¶
The Replication Tasks section shows examples of different replication configurations. Refer to this section for more general details about creating and modifying replications.
Note
A periodic snapshot task must be available before creating a new replication task.
Click the + button to open the Create Replication window, as shown in Figure 11.8.1.
Fig. 11.8.1 Create a new replication schedule
The Datastore, Remote Datastore, Replication Stream Compression, Limit (KB/s), Begin, End, Remote Hostname, Encryption Cipher, and Remote Host Key options must be set to create a replication.
Note
For detailed descriptions of each option, see Replication Task Options.
Instructions for obtaining the Remote Host Key are shown in Encryption Keys.
Click Ok to save the new replication schedule and add it to the list. If the task does not appear in the list, click the Refresh button.
Select an existing replication from the list and click Edit to modify the replication. Editing a replication provides the same options as creating a replication. Make any adjustments to the replication configuration and click OK to save the new settings.
11.9. Zvols¶
A zvol is a raw block device over ZFS.
In the vCenter ZVol tab, click the + button to begin creating a new zvol. Figure 11.9.1 shows the Create ZVol window.
Fig. 11.9.1 Create a new zvol
Select a volume from the drop-down menu. Type a name for the new zvol. Adjust the size of the zvol with the arrow buttons and Size drop menu. If desired, check Sparse to activate thin provisioning.
Warning
Be careful when using Sparse. Thin provisioning can cause writes to fail when the pool is low on space.
Click Ok to save the configuration and begin creating the new zvol. Click the Refresh button to repopulate the list and see the new zvol.
Select a zvol from the list and click the Edit button to change the size of an existing zvol. As Figure 11.9.2 shows, the only parameter that can be modified for an existing zvol is size.
Fig. 11.9.2 Edit a Zvol
Adjust the size of the ZVol and click OK to save any changes.
11.10. iSCSI Functions¶
iSCSI is a protocol standard for the consolidation of storage data. Refer to Block (iSCSI) for more details about this standard. This section describes configuring Targets, Extents, and Associated Targets from the vCenter plugin.
11.10.1. Targets¶
Click the + button to begin creating a new target. The Add Target window opens, as shown in Figure 11.10.1:
Fig. 11.10.1 Creating a Target
Type a target name. If desired, an alias for the target can also be provided. Choose a Portal Group ID and Initiator Group ID from the pulldown menus. Click OK to save and add the new target to the list. If not immediately visible, click the Refresh button to repopulate the list of targets.
Highlight an existing target and click the Edit button to open the Edit Target window, shown in Figure 11.10.2.
Fig. 11.10.2 Editing a Target
The current settings are displayed. Modify the values as needed, then click OK to save the new settings.
11.10.2. Extents¶
Note
The vCenter plugin only supports creating device/disk extents.
Click the + button to begin creating a new extent. Figure 11.10.3 shows the Create Extent window.
Fig. 11.10.3 Creating a new extent
The Extent Name, Extent Type, Serial, Device, Logical Block Size, Available Space Threshold, and LUN RPM options must be set before the extent can be created.
Note
Detailed explanations of each option are available in Extent Configuration Settings.
Click OK to save the settings and begin creating the extent. Enter the data, then click the Refresh button to repopulate the list of extents.
Highlight an extent in the list and click Edit. The Edit Extent window opens, which is the same as Create Extent, but populated with the current extent settings. Make any changes to the options, then click OK to save the new configuration.
11.10.3. Associated Targets¶
The Target/Extents section details the process of associating an extent with a target. vCenter requires previously created targets and extents before a new associated target can be created.
Click the + button to open the Add Target/Extent window. Using the drop-down menus, choose a target and extent to associate. It is recommended to leave the LUN ID set to Auto, but values from 0-24 are available.
Click OK to save the new associated target. The system may take some time to create the association. Click the Refresh button after a few moments to verify the new associated target.
Highlight an entry in the list and click the Edit button. The Target/Extent window appears, which allows modification of the Target, Extent, and LUN ID. Click OK to save any changes.
11.11. Role-Based Access Control (RBAC)¶
An administrator can grant vCenter users specific role-based access to a TrueNAS® system. The roles are listed in
| Role Name | User is allowed to: |
|---|---|
| Discovery | Add storage systems |
| Create Clones | Clone virtual machines |
| Create Storage | Create and provision storage |
| Modify Storage | Modify storage |
| Destroy Storage | Destroy storage |
Each role gives the user the ability to perform the functions in not just that role, but all of the roles that precede it in the list. For example, a user with a Create Storage role can create storage, but can also do Discovery and Create Clones. The vCenter administrator can perform all of these operations by default.
Note
The vCenter plugin RBAC tab cannot create new
vCenter users. That must be done from vCenter
Administration. Hover over the
House + lines icon on the top section of the window to
view a drop-down menu of links. Click Home. From the
Home menu, navigate from
Administration → Single Sign-On
and click Users and Groups. In the Users
tab, click the + button to open the
New User window. Enter a user name and password
(twice) in the related fields. Optional fields can further describe
the user, including first and last name and an email address for
the account. Click OK to create the new user.
11.11.1. Add a Role to an Existing vCenter User¶
Click the + button to open the
Add Role Based Access Control window. Type a user name
in the form DOMAIN.NAME\username. Click the
Assign Role drop-down menu and choose a role for the user.
Click Add to add the associated user and role to the list.
If the entry does not appear immediately, click the
Refresh button to repopulate the list.
Highlight an entry in the list and click the Edit button. The Edit window opens, and the entry can be edited. Click the Save button to save any changes. Changes may take a moment to redraw. Click the Refresh button to repopulate the list.
11.12. Copying iSCSI Configuration¶
The TrueNAS Configuration tab is used to duplicate some of the current TrueNAS® system’s iSCSI settings to another TrueNAS® system.
Note
Currently, only iSCSI targets are duplicated on the destination system.
Enter the IP address of the destination TrueNAS® system where the current TrueNAS® systems’s iSCSI configuration is to be copied. Provide a valid user name and password from the destination system. Click Submit to begin duplicating the TrueNAS® configuration to the destination system. This process may take some time. A popup window indicates when the task is complete.