Virtual machines

Modified: 09 Mar 2023 22:10 UTC

Triton virtual machines (VMs) are hardware virtual machines (HVMs), wrapped in highly secure zones, that support a variety of images including Linux, FreeBSD, Windows, and Docker Engine. They offer a solution for a wide variety of applications that have certain operating system dependencies or applications that can't be run in a containerized environment. Triton offers support for these applications via hardware virtualization but there are some differences between infrastructure containers and virtual machines to be aware of.

Infrastructure containers run on top of a bare metal hypervisor. They do not run a separate guest OS, resulting in better performance, scalability, and stability than a hosted hypervisor. All VMs get the same high performance networking stack, regardless of the instance type or size.

Machine resizing

Most infrastructure containers can be resized to add memory, CPU, and disk space without rebooting. KVM Hardware Virtualization instances do not support resizing.

Note: Bhyve Hardware Virtualization instances will need to be stopped in order to increase CPU and/or memory.

With Triton CLI version 7.1.1, you can resize Bhyve hardware virtual machines (HVMs) disks. Older PI versions do not support flexible disk space with bhyve. If you are an Operator, visit the Managing Packages documentation to learn how to set up an environment to use the resizing feature.

Resizing disks

In order to use the flexible disk space capability:

  1. Upgrade Triton CLI tools to version 7.1.1 to meet the minimum platform requirements.
  2. To resize a disk, run the following example command, substituting the instance_id for the machine that you are resizing as well as the disk_id you want to resize:
triton -i inst disk resize 37bc876e 4a79a08e 2048 -w

Resizing disk "4a79a08e-2c08-eba7-eb0b-a28b1025bcd5"
Resized disk "4a79a08e-2c08-eba7-eb0b-a28b1025bcd5" in 9s
  1. To validate that the resize was successful, run the following example command, substituting the instance_id for the machine that you are checking:
$ triton -i inst disk list 37bc876e

SHORTID   SIZE   PCI_SLOT
4a79a08e  2048   0:4:0
cd83fc61  14336  0:4:1

Snapshots

Formerly available only for Docker and SmartOS, flexible disk space functionality allows you to create snapshots for bhyve instances.

Snapshots must first be enabled by an Operator. If you require snapshots, please contact your system administrator.

Creating snapshots

To create snapshots, follow the instructions for Creating a Machine snapshot snapshot from the Triton DataCenter CloudAPI documentation.

Snapshots aren't required to resize Bhyve disks. However, it is a best practice to have a backup in case something goes wrong and you need to revert back to a stable state.

Machine resizing

Live resizing of HVM instances is not supported. Infrastructure containers can be resized to add memory, CPU, and disk space without rebooting, but the nature of hardware virtualization does not allow that convenience.

What do you want to do next?