-
Notifications
You must be signed in to change notification settings - Fork 4
Working with ESXi Hosts
Here's how you can use the photon host
command or the Photon web interface to work with ESXi hosts. You can, for example, add ESXi hosts to your Photon Controller cluster by using the photon host create
command. Adding ESXi hosts to the cluster can expand the cluster's capacity for computation and storage so that you can run more VMs or create larger Kubernetes clusters.
The Photon Platform web interface lets you add an ESXi host:
You can also add an ESXi host by using the photon host create
command:
photon host create --username root --password ESXiHostPw --address <ip-address-of-new-ESXi-host>
Here's the usage information the photon host create
command:
NAME:
photon host create - Create a new host
USAGE:
photon host create [command options] [arguments...]
OPTIONS:
--username, -u username to create host
--password, -p password to create host
--address, -i ip address of the host
--availability_zone, -z availability zone of the host
--tag, -t tag for the host
--metadata, -m metadata for the host
--deployment_id, -d deployment id to create host
List the ESXi hosts in a Photon Controller cluster and show their status:
photon host list
ID State IP Tags
137d4e5a5437f85fea900 READY 198.51.100.44 MGMT CLOUD
Total: 1
Show complete information for a host by citing its ID:
photon host show 137d4e5a5437f85fea900
Host ID: 137d4e5a5437f85fea900
Username: root
IP: 198.51.100.44
Tags: [MGMT CLOUD]
State: READY
Metadata: map[MANAGEMENT_VM_DISK_GB_OVERWRITE:80 MANAGEMENT_NETWORK_DNS_SERVER:198.51.98.1 MANAGEMENT_NETWORK_NETMASK:255.255.0.0 MANAGEMENT_NETWORK_IP:198.51.100.207 MANAGEMENT_NETWORK_GATEWAY:198.51.100.253 MANAGEMENT_DATASTORE:datastore1 MANAGEMENT_VM_CPU_COUNT_OVERWRITE:4 MANAGEMENT_PORTGROUP:VM Network MANAGEMENT_VM_MEMORY_MB_OVERWRITE:6144]
AvailabilityZone:
Version: 6.0.0
List the VMs on an ESXi host and show their state by citing the ID of the host:
photon host list-vms 137d4e5a5437f85fea900
ID Name State
1305ecbd-8717-4dad-bc4f-1e7b6cebb897 Photon-OS STARTED
19d197fc-2653-466f-bb7f-5f03a5a6bdb1 ec-mgmt-10-118-100-448095e STARTED
1eba91ba-c926-41dc-adb1-4b82e0797c4b master-7a0c629b-52dc-49c9-b58f-f37100948487 STARTED
71b20ca1-5055-4530-8218-e0ca0730e79d worker-7daa6a2c-39f9-4834-be33-4ccac548f8da STARTED
85c9325b-ed0f-4f63-8bd6-8c581d4593fa etcd-96cae740-3c65-4ac8-96e9-c6b170990934 STARTED
ebce1024-1282-49d5-a4dc-930d40923d18 Photon-OS-2 STARTED
Total: 6
STARTED: 6
Show the tasks on a host:
photon host tasks 137d4e5a5437f85fea900
Task Start Time Duration
137d4e5a5437f85fee398 2016-12-12 04:44:31.00 00:00:10
CREATE_HOST, COMPLETED
You can run 'photon task show <id>' for more information
Total: 1
There are additional commands for managing the ESXi hosts in a Photon Controller cluster:
photon host --help
NAME:
photon host - options for host
USAGE:
photon host command [command options] [arguments...]
COMMANDS:
create Create a new host
delete Delete a host with specified id
list List all the hosts
show Show host info with specified id
list-vms List all the vms on the host
set-availability-zone Set host's availability zone
tasks Show tenant tasks
suspend Suspend host with specified id
resume Resume host with specified id
enter-maintenance Host with specified id enter maintenance mode
exit-maintenance Host with specified id exit maintenance mode
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help
- Home
- Installation Guide
- Download Photon Controller
- Release Notes
- User Guide
- Installation and Setup
- Administration and Operations
- Command-Line Cheat Sheet
- Overview of Commands
- Authenticating Multitenant Users and Groups
- Authorization Model
- Connecting to the Load Balancer and Logging In
- Tenants, Quotas, and Projects
- Creating Tenants, Projects, and Quotas
- Working with Tenants
- Creating a Project
- Uploading Images
- Creating Images
- Replicating Images in Datastores
- Creating Flavors
- Working with Virtual Machines
- Using a Photon OS VM
- Creating a Network
- Performing Host Maintenance
- Working with ESXi Hosts
- Configuring Your Own Load Balancer
- Troubleshooting
- Deploying Clusters
- Integration
- API
- Information for Developers
- References
- Legal