VMware Management Assistant

crashclappergapΛογισμικό & κατασκευή λογ/κού

13 Δεκ 2013 (πριν από 3 χρόνια και 10 μήνες)

216 εμφανίσεις

© 2012 VMware Inc. All rights reserved

VMware Management Assistant

Module 16

16
-
2

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

You Are Here

Course Introduction

Introduction to Virtualization

Creating Virtual Machines

VMware vCenter Server

Configuring and Managing Virtual Networks

Configuring and Managing Virtual Storage

Virtual Machine Management

Resource Management and Monitoring

High Availability and Fault Tolerance

Network Scalability

Host and Management Scalability

Storage Scalability

Data Protection

Patch Management

Access and Authentication Control

VMware Management Assistant

Installing VMware vSphere Components

16
-
3

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Performing configuration and troubleshooting tasks from the
command line is a very useful skill that a VMware vSphere®
administrator should have.

VMware vSphere® Command
-
Line Interface (vCLI), which is available
with VMware vSphere® Management Assistant (vMA), provides the
administrator with these command
-
line capabilities.


Importance

16
-
4

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

After this module, you should be able to do the following:


Understand the purpose of the vCLI commands.


Discuss the options for running commands.


Deploy and configure vMA.


Learner Objectives

16
-
5

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Ways to get command
-
line access on an VMware ESXi™ host:


VMware vSphere® ESXi™ Shell


vMA, which includes the vCLI package


Methods to Run Commands

16
-
6

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

ESXi Shell includes a set of fully supported ESXCLI commands and a
set of commands for diagnosing and repairing ESXi hosts.

Use ESXi Shell only at the request of VMware® technical support.


You should be familiar with how ESXi Shell works in case VMware
technical support directs you to use it.

ESXi Shell can be accessed:


Locally, from the direct console user interface (DCUI)


Remotely, from a Secure Shell (SSH) session


ESXi Shell

16
-
7

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

To access ESXi Shell locally, you must have physical access to the
DCUI and administrator privileges.

By default, the local ESXi Shell is disabled:


Enable the local ESXi Shell from the DCUI or from the VMware
vSphere® Client™.

After you enable ESXi Shell access, you can access the local shell:


In the main DCUI screen, press Alt+F1 to open a virtual console
window to the host.

Local users with administrator privileges automatically have local
shell access:


Shared root access is no longer required.


Accessing ESXi Shell Locally

16
-
8

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

You can access ESXi Shell remotely with a secure shell client like
SSH or PuTTY.


The SSH service must be enabled first.


This service is disabled by default.


Disable SSH access when you are done using it.



Accessing ESXi Shell Remotely

Enable SSH on an ESXi host only as a last resort for
troubleshooting. Enabling SSH creates a major security
vulnerability and reduces ESXi resources.

16
-
9

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A


The vCLI
command set enables you to run common system
administration commands against ESXi hosts.


You can run
most vCLI
commands against a VMware® vCenter
Server™ system and target the ESXi hosts that it manages.


vCLI commands normally require the following options to connect and
log in to a server:


--
server <name>


--
username <user>


--
password <string>


vCLI commands run on top of the VMware vSphere® SDK for Perl.


vCLI commands are available as a standalone installation package for
Linux or Windows systems packaged with vMA


vCLI

16
-
10

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

vMA is a virtual appliance that includes the following:


SUSE Linux Enterprise Server 11 SP1


VMware® Tools™


vCLI


vSphere SDK for Perl


Java JRE version 1.6


vi
-
fastpass an authentication component for

the appliance


vMA

16
-
11

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Hardware requirements:


AMD Opteron, rev E or later


Intel Processors with EM64T and VT enabled

Software requirements:


vMA can be deployed on the following:


vSphere ESX 4.0 Update 2 or later


vSphere ESXi 4.1, 5.0, and 5.1


vCenter Server 4.0 Update 2 or later


vCenter Server 4.1, 5.0, and 5.1

By default, vMA uses the following:


One virtual processor


600MB of RAM


3GB virtual disk


vMA Hardware and Software Requirements

16
-
12

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

To set up a vMA appliance:

1.
Deploy vMA from a URL or a downloaded file.

2.
Configure vMA virtual machine and time
-
zone network settings.

3.
Add target servers to vMA. Target servers include the vCenter Server
system or ESXi hosts or both.

4.
Initialize
vi
-
fastpass authentication.

Configuring vMA

Deploy

Configure

Add Targets

Authenticate

16
-
13

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

ESXi
host

Connecting to the Infrastructure

.

vSphere SDK
for Perl
API

private vCenter protocol

vMA command paths


vCenter Server

vMA

16
-
14

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Deploying vMA

Deploy vMA like any other virtual
appliance.


16
-
15

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Configure vMA at the command prompt or through the Web interface:


https://<appliance_name_or_IP_address>:5480


Log in as vi
-
admin.

From the Web interface,

you can do the following:


Configure

time
-
zone

settings


Configure

network and

proxy server

settings


Update vMA

to the latest

version


Configuring vMA

https://vma.vclass.local:5480

16
-
16

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

A target server is a server that you access from vMA:


Either a vCenter Server system or ESXi host

To add a vCenter Server system as a target server:

1.
Log in as vi
-
admin.

2.
Run
vifp
addserver <vCenter_Server_system>
.

a.
Enter a vCenter Server user name with administrator privilege.

b.
Enter the user’s password.

c.
Agree to store this information in the credential store.

3.
Run
vifp listservers

to verify that the vCenter Server system has
been added as a target.

4.
Run
vifptarget
-
s <vCenter_Server_system>

to set the target as
the default for the current vMA session.

5.
Test operation by running
vicfg
-
nics

l

vihost <ESXi_host>
.


Adding a Target Server

16
-
17

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

The vi
-
fastpass authentication component
supports unattended authentication to vCenter
Server system or ESXi host targets:


Prevents the user from having to continually add
login credentials to every command being
executed


Facilitates unattended scripted operations








vMA Authentication

ESXi

vCenter
Server

vMA

authenticated
commands

l
ogging

16
-
18

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

vMA can be configured for Active Directory (AD), so the ESXi hosts
and vCenter Server systems can be added to vMA without having to
store passwords in the vMA credential store.

Joining vMA to Active Directory


vCenter Server

ESXi host

vMA

Active
Directory

16
-
19

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Command Structure
(If not using vi
-
fastpass
)

.

vicfg
-
nics
--
server vC1
--
username vcadmin
--
password
vmware
--
vihost ESXa
-
l


vCLI syntax on a vMA appliance:

vicfg
-
nics
--
server ESXa
--
username
mike
--
password vmware
-
l

A vCLI
command targeted directly at an ESXi host:

A vCLI
command targeted at an ESXi host
through a vCenter Server
instance:

<command>

<conn_options>

<target_option>

<command_options>

16
-
20

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

vMA includes the following commands:


esxcli


resxtop


svmotion


vicfg
-
*

commands


esxcfg
-
*
commands (
deprecated)


vifs


vihostupdate


vmkfstools

vMA Commands

16
-
21

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Many vCLI commands used
esxcfg

commands in scripts to manage
ESX or ESXi 3.x and 4.x hosts:


In vCLI many
vicfg

commands are equivalent to
esxcfg

commands.


Commands that use
esxcfg

are still available for compatibility reasons
and might become obsolete.


Use
vicfg

commands when developing new scripts.

esxcfg

Commands

16
-
22

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

esxcfg

Equivalent
vicfg

Commands Examples

esxcfg

Command

Equivalent

vicfg

Command

esxcfg
-
advcfg

vicfg
-
advcfg

esxcfg
-
cfgbackup

vicfg
-
cfgbackup

esxcfg
-
nics

vicfg
-
nics

esxcfg
-
vswitch

vicfg
-
vswitch

16
-
23

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Managing Hosts with vMA

Host

management task

vMA command

Reboot and shut down hosts.

vicfg
-
hostops

Enter and exit maintenance mode.

vicfg
-
hostops

Back up and restore host
configuration

settings.

vicfg
-
cfgbackup

Add ESXi hosts to an Active
Directory domain.

vicfg
-
authconfig

16
-
24

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Common Connection Options for vCLI Execution (1)

Connection Option

Description

--
cacertsfile

Specifies the CA certificate

file

--
config

Path to a configuration file

--
credstore

Name

of credential store file

--
encoding

Specifies the encoding to use

--
passthroughauth

Use Microsoft

Windows Security SSPI

--
passthrough
authpackage

Specifies Domain
-
level authentication
protocol to be used.

--
password

Log

in password

--
portnumber

Uses specified port to connect

16
-
25

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Common Connection Options for vCLI Execution (2)

Connection Option

Description

--
protocol

Uses the specified protocol

to connect

--
savesessionfile

Saves the session to the specified file

--
server

The

ESXi or vCenter Server host

--
sessionfile

Uses the specified

file to load a saved session

--
url

Connects to URL for VMware vSphere® Web
Services SDK

--
username

User name to log in to system.

--
vihost

Name of ESXi host to run the command

against

16
-
26

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Use the
vicfg
-
hostops

command with the
shutdown

or
reboot

operation:


vicfg
-
hostops <conn_options>
--
operation shutdown <cmd_options>


vicfg
-
hostops <conn_options>
--
operation reboot <cmd_options>

Examples:


vicfg
-
hostops

-
server esxi01

-
username mike

-

password vmware1!

-
operation shutdown


vicfg
-
hostops

-
server esxi01

-
username mike

-

password vmware1!

-
operation reboot
--
force


vicfg
-
hostops

-
server esxi01

-
username mike


-
operation shutdown

-
cluster “LabCluster”

The command prompts for user names and passwords if you do not
specify them.


vicfg Command Example

16
-
27

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Use the
vicfg
-
hostops

command with the
enter
,
exit
, or
info
operations:


vicfg
-
hostops <conn_options>
--
operation enter <cmd_options>


vicfg
-
hostops <conn_options>
--
operation exit <cmd_options>


vicfg
-
hostops <conn_options>
--
operation info <cmd_options>

Examples:


vicfg
-
hostops

-
server vc01

-
username administrator

--
operation info

-
cluster “LabCluster”


vicfg
-
hostops

-
server vc01

-
username administrator

--
operation enter

-
action poweroff

vicfg
-
hostops
:


Does not work with VMware vSphere® Distributed Resource Scheduler™ (DRS)


Suspends the virtual machines by default:


Use the

-
action poweroff
option to power off virtual machines.

Entering and Exiting Host Maintenance Mode

16
-
28

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A


esxcli

namespace


esxcli fcoe
namespace


esxcli hardware
namespace


esxcli iscsi
namespace


esxcli license
namespace


esxcli network
namespace


esxcli software
namespace


esxcli storage
namespace


esxcli system
namespace


esxcli vm
namespace



esxcli Command Hierarchies

16
-
29

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Use the
esxcli

command with the
vm
namespace to list all the
virtual machine processes
.


esxcli <conn_options> vm process list




Example esxcli command

16
-
30

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Use the
resxtop

utility to examine real
-
time resource usage for

ESXi hosts.

resxtop

can be run in these modes:


Interactive mode


Batch mode


Replay mode


resxtop Utility

16
-
31

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

To start
resxtop

interactively:


Log in to a system installed with vCLI.


Run
resxtop

with one or more connection parameters. Example:


# resxtop
--
server vc01.vmeduc.com

--
username administrator
--
vihost esxi01.vmeduc.com


# resxtop
--
server esxi01.vmeduc.com
--
username mike

Using resxtop Interactively

16
-
32

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

When using
resxtop

in interactive mode, type a character to change
the screen or behavior. Commands are case
-
sensitive.

Navigating resxtop

c

CPU view (default)

m

Memory view

d

Disk (adapter) view

u

Disk (device) view

v

Virtual disk view

n

Network view

f/F

Add or remove statistic
columns

V

Virtual machine view

h

Help

q

Quit

16
-
33

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

Sample Output from resxtop

host

statistics

Per world

statistics

(CPU screen)

Type
V

(uppercase V):

Per virtual

machine

statistics

16
-
34

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

To run
resxtop

in batch mode and print all performance counters:


resxtop

a

b > analysis.csv


The

a
option shows all statistics.

Always start your virtual machines before running
resxtop

in batch
mode.


resxtop

will produce virtual machine data based only on the virtual
machines that were running at the time the command was launched.

To run
resxtop
in replay mode:


Use
vm
-
support

and
resxtop

to create a file with sampled
performance data and replay the file. For example:


vm
-
support

S

d 300

l 30


resxtop

r <filename>


Using
resxtop

in Batch and Replay Modes


16
-
35

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

In this lab, you will use
vMA to manage networking, manage storage,
and monitor hosts
.

1.
Log in to vMA and connect to your vCenter Server and ESXi host.

2.
Create a standard virtual switch.

3.
Configure storage.

Lab 28
Break until 10:30AM

VMware vSphere: Fast Track


Revision A (BETA)

16
-
36

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A

You should be able to do the following:


Understand the purpose of the vCLI commands.


Discuss the options for running commands.


Deploy and configure vMA.

Review of Learner Objectives

16
-
37

© 2012 VMware Inc. All rights reserved

VMware
vSphere
: Fast Track


Revision A


vCLI is a command
-
line interface to manage the infrastructure, either by
running commands or by executing scripts.


vMA is a virtual appliance that is used to manage the infrastructure at
the command prompt. vMA includes vCLI.


vMA can be used to monitor, configure, and manage hosts, storage,
and virtual networking.


Questions?

Key Points