Managing_VIC_Container_Hosts

December 13, 2016

Managing VIC Container Hosts (VCH)

To reboot or power off a vSphere Integrated Container host (VCH), enter “debug” mode using the VIC cli from a Docker client. Do not use the vSphere client.

“IMPORTANT: Do not use the vSphere Web Client to perform operations on VCH appliances or container VMs.
Specifically, using the vSphere Web Client to power off, or delete VCH appliances or container VMs can
cause vSphere Integrated Containers Engine to not function correctly. Always use vic-machine to perform
operations on VCHs. Always use Docker commands to perform operations on containers.”

Taken from Github:
https://vmware.github.io/vic-product/assets/files/pdf/0.8/vic_admin.pdf

Pre-requisites: make sure all containers running on the Virtual Conatiner Host are exited, stopped.

docker@ubuntu:~/vic$ sudo ./vic-machine-linux debug –target=192.168.1.3 –user=administrator@vsphere.local –password=xxxxxx –thumbprint=11:41:53:20:A1:60:81:CB:2B:9B:C3:1D:AF:42:76:AF:A4:35:C3:63 –name vmvicvch001

Sample output: entering debug mode and then shutting down a VCH

docker@ubuntu:~/vic$ sudo ./vic-machine-linux debug –target=192.168.1.3 –user=administrator@vsphere.local –password=xxxxxxxx –thumbprint=11:41:53:20:A1:60:81:CB:2B:9B:C3:1D:AF:42:76:AF:A4:35:C3:63 –name vmvicvch002
INFO[2016-12-10T22:45:00-08:00] ### Configuring VCH for debug ####
INFO[2016-12-10T22:45:00-08:00]
INFO[2016-12-10T22:45:00-08:00] VCH ID: VirtualMachine:vm-24
INFO[2016-12-10T22:45:01-08:00]
INFO[2016-12-10T22:45:01-08:00] Installer version: v0.8.0-7315-c8ac999
INFO[2016-12-10T22:45:01-08:00] VCH version: v0.8.0-7315-c8ac999
INFO[2016-12-10T22:45:01-08:00]
INFO[2016-12-10T22:45:01-08:00] SSH to appliance:
INFO[2016-12-10T22:45:01-08:00] ssh root@192.168.1.11
INFO[2016-12-10T22:45:01-08:00]
INFO[2016-12-10T22:45:01-08:00] VCH Admin Portal:
INFO[2016-12-10T22:45:01-08:00] https://192.168.1.11:2378
INFO[2016-12-10T22:45:01-08:00]
INFO[2016-12-10T22:45:01-08:00] Published ports can be reached at:
INFO[2016-12-10T22:45:01-08:00] 192.168.1.11
INFO[2016-12-10T22:45:01-08:00]
INFO[2016-12-10T22:45:01-08:00] Docker environment variables:
INFO[2016-12-10T22:45:01-08:00] DOCKER_HOST=192.168.1.11:2375
INFO[2016-12-10T22:45:01-08:00]
INFO[2016-12-10T22:45:01-08:00] Connect to docker:
INFO[2016-12-10T22:45:01-08:00] docker -H 192.168.1.11:2375 info
INFO[2016-12-10T22:45:01-08:00] Completed successfully

Notice ssh is enabled now. “ssh root@192.168.1.11”

docker@ubuntu:~/vic$ sudo ssh root@192.168.1.11
The authenticity of host ‘192.168.1.11 (192.168.1.11)’ can’t be established.
ECDSA key fingerprint is SHA256:OVBVYt/Bzc3HrnMpDfTqpevxk5tXLmyGiXGCa/7y7DM.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.1.11’ (ECDSA) to the list of known hosts.
Password:
root@vmvicvch002 [ ~ ]# shutdown -h now
root@vmvicvch002 [ ~ ]# Connection to 192.168.1.11 closed by remote host.
Connection to 192.168.1.11 closed.

Verify the VIC VCH performed the operation using the vSphere Web Client.

To power on a VIC VCH, use the vSphere Web client and power on the vAPP container host, not the containers. There currently is no power on command within vic-machine. See below output from vic-machine help. Containers must be stopped and started using docker commands.

See wiki here: vSphere Integrated Containers – Docker stop and start commands

docker@ubuntu:~/vic$ sudo ./vic-machine-linux –help
NAME:
vic-machine-linux – Create and manage Virtual Container Hosts

USAGE:
vic-machine-linux [global options] command [command options] [arguments…]

VERSION:
v0.8.0-7315-c8ac999

COMMANDS:
create   Deploy VCH
delete   Delete VCH and associated resources
ls       List VCHs
inspect  Inspect VCH
version  Show VIC version information
debug    Debug VCH

GLOBAL OPTIONS:
–help, -h     show help
–version, -v  print the version

Tested On: RKN

Rob Shaw – 12/13/2016

Comments are closed.