Specify the Image Store
The image store for a virtual container host (VCH) is the vSphere datastore in which to store container image files, container VM files, and the files for the VCH itself.
Specifying an image store is mandatory if there is more than one datastore in your vSphere environment. If there is only one datastore in your vSphere environment, vic-machine
uses it automatically and you do not need to specify the datastore.
When container developers create and run containers, vSphere Integrated Containers Engine stores the files for container VMs at the top level of the image store, in folders that have the same names as the container VMs.
vic-machine
Option
You specify an image store by using the vic-machine create --image-store
option.
--image-store
Short name: -i
If you are deploying the VCH to a vCenter Server cluster, the datastore that you designate as the image store must be shared by at least two ESXi hosts in the cluster. Using non-shared datastores is possible, but limits the use of vSphere features such as vSphere vMotion® and VMware vSphere Distributed Resource Scheduler™ (DRS).
If you do not specify the --image-store
option and multiple possible datastores exist, or if you specify an invalid datastore name, vic-machine create
fails and suggests valid datastores in the failure message.
Usage:
To specify a whole datastore as the image store, specify the datastore name in the --image-store
option:
--image-store datastore_name
If you designate a whole datastore as the image store, vic-machine
creates the following set of folders in the target datastore:
datastore_name/VIC/vch_uuid/images
, in which to store all of the container images that you pull into the VCH.datastore_name/vch_name
, that contains the VM files for the VCH.datastore_name/vch_name/kvstores
, a key-value store folder for the VCH.
You can specify a datastore folder to use as the image store by specifying a path in the --image-store
option:
--image-store datastore_name/path/to/folder
If the folder that you specify does not already exist, vic-machine create
creates it.
If you designate a datastore folder as the image store, vic-machine
creates the following set of folders in the target datastore:
datastore_name/path/VIC/vcu_uuid/images
, in which to store all of the container images that you pull into the VCH.datastore_name/vch_name
, that contains the VM files for the VCH. This is the same as if you specified a datastore as the image store.datastore_name/vch_name/kvstores
, a key-value store folder for the VCH. This is the same as if you specified a datastore as the image store.
By specifying the path to a datastore folder in the --image-store
option, you can designate the same datastore folder as the image store for multiple VCHs. In this way, vic-machine create
creates only one VIC
folder in the datastore, at the path that you specify. The VIC
folder contains one vch_uuid/images
folder for each VCH that you deploy. By creating one vch_uuid/images
folder for each VCH, vSphere Integrated Containers Engine limits the potential for conflicts of image use between VCHs, even if you share the same image store folder between multiple hosts.
Example vic-machine
Commmand
This example deploys a VCH with the following configuration:
- Provides the vCenter Single Sign-On user name and password for a vSphere administrator account in the
--target
option. - Deploys a VCH named
vch1
to the clustercluster1
in datacenterdc1
. - Uses an existing port group named
vch1-bridge
for the bridge network. - Designates the folder
vch1_images
indatastore1
as the image store.
vic-machine-operating_system create --target 'Administrator@vsphere.local':password@vcenter_server_address/dc1 --compute-resource cluster1 --image-store datastore1/vch1_images --bridge-network vch1-bridge --name vch1 --thumbprint certificate_thumbprint --no-tlsverify