Before creating a new zone, a zone template dataset must be imported. Zone templates are SmartOS images with pkgsrc included. Datasets are available through the imgadm tool.
You will then be able to create and install zones and virtual machines using vmadm create.
|"imgadm" used to be named "dsadm" in releases prior to the 20120614 release.|
|If the filedoes not exist, the imgadm utility won't know where to fetch datasets from. Running this command should fix it:|
To list all available datasets from Joyent:
To list all local datasets installed in zones:
To import a dataset from Joyent, use the UUID of the dataset (from imgadm avail):
The dataset is now downloaded and installed at zones/UUID.
vmadm create is a tool for fast provisioning of zones; it takes a json payload and clones a dataset in to a working zone.
To use vmadm create you must first start by creating your zone definition file, for instance copying this in to /tmp/zonedef (substituting the dataset_uuid and network information that's appropriate):
and vmadm will respond with a status and your zone will be created and booted.
Once you have created a zone with vmadm create, you can log into your zone via one of two methods:
Please refer to the manpage for vmadm and zlogin respectively, for the escape sequence to exit out of console mode.