You are on page 1of 2

Virtual Infrastructure 3.

0 Command Reference
COMMANDS TO DEPLOY AN ESX SERVER Configure ESX Server Networking
Display physical NIC configuration Set physical NICs speed and duplex Add a virtual switch Check to see if a virtual switch already exists Add a portgroup (for either SC, VMkernel or VMs) Check to see if a portgroup already exists Link a physical NIC to a virtual switch Unlink a physical NIC from a virtual switch Display virtual switch configuration Add a VMkernel port Display VMkernel ports Set the VMkernel port gateway Display the VMkernel default gateway Add a service console interface (vswif) Display service console interfaces esxcfg-nics l esxcfg-nics s speed d duplex vswitch_name esxcfg-vswitch a vswitch_name:#_ports esxcfg-vswitch c vswitch_name esxcfg-vswitch A portgroup_name vswitch_name esxcfg-vswitch C portgroup_name esxcfg-vswitch L vmnic# vswitch_name esxcfg-vswitch U vmnic# vswitch_name esxcfg-vswitch l esxcfg-vmknic a i IP_addr n netmask VMkernel_port_name esxcfg-vmknic l esxcfg-route gateway_IP_address esxcfg-route esxcfg-vswif a i IP_addr n netmask p sc_port_name vswif# esxcfg-vswif l

Configure ESX Server iSCSI Storage


Display iSCSI software adapter settings Enable (-e) or disable (-d) the iSCSI software adapter Display the software iSCSI node name Display the software iSCSI node alias Discover iSCSI targets Display discovered iSCSI targets Rescan for iSCSI LUNs Display iSCSI LUNs esxcfg-swiscsi q esxcfg-swiscsi e -OResxcfg-swiscsi -d

vmkiscsi-tool I l vmhba40 vmkiscsi-tool k l vmhba40 vmkiscsi-tool D a target_IP_address vmhba40 vmkiscsi-tool T l vmhba40 esxcfg-rescan vmhba40 vmkiscsi-tool L l vmhba40

Manage Datastores
List device file names associated with a servers LUNs Map VMFS volumes to their LUNs and vmhba name Create one or more partitions on a LUN Display the partition table for the specified LUN Create a VMFS volume Map label names with physical VMFS volumes Change the VMFS volume label Display VMFS volume metadata Extend a VMFS volume Remove a VMFS volume extent Display VMFS and service console filesystem usage esxcfg-vmhbadevs esxcfg-vmhbadevs -m fdisk device_file_name fdisk -l device_file_name vmkfstools C vmfs3 S VMFS_volume_label partition_address (vmhba#.#.#.#) ls l /vmfs/volumes ln sf /vmfs/volumes/UUID /vmfs/volumes/new_label_name vmkfstools P h /vmfs/volumes/volume_label vmkfstools Z VMFS_extent Recreate the VMFS volume vdf h name_of_existing_VMFS

Configure Services
Synchronize the VI Client to reflect command-line changes service mgmt-vmware restart

Copyright 2007 VMware, Inc. All rights reserved.

EDU-VI3DSA-JA2

Virtual Infrastructure 3.0 Command Reference


COMMANDS TO SECURE AN ESX SERVER Configure Service Console Firewall
Display the current firewall settings Display the firewall setting for a specific service Enable all incoming (or outgoing) ports Block all incoming (or outgoing) ports Enable (-e) or disable (-d) a service in the firewall List all available services Open a port (not required for management use) in the firewall Close a port in the firewall esxcfg-firewall q esxcfg-firewall q service_name esxcfg-firewall allowIncoming esxcfg-firewall blockIncoming esxcfg-firewall e service_name esxcfg-firewall d service_name esxcfg-firewall s esxcfg-firewall o port,protocol,direction,name esxcfg-firewall c port,protocol,direction (or allowOutgoing) (or blockOutgoing) -OR-

Configure Password Aging


Configure password aging using pam_cracklib.so Configure password aging using pam_passwdqc.so esxcfg-auth usecrack=retries min_length lc uc d oc esxcfg-auth usepamqc=N1 N2 min_passphrase_length N3 N4 match where lc, uc, d, or oc, if set, will decrement the minimum password length where N1, N2, N3 and N4 are # required chars for a password using one-, two-, three- or four- character classes respectively

COMMANDS TO PROTECT YOUR DATA USING VCB


List ways to identify the VM to backup Perform a full VM backup Create a VM snapshot Get a list of disks in a VM snapshot Remove a snapshot Export a virtual disk Restore an individual virtual disk Restore a complete virtual machine (perform on service console only) Mount a virtual disk file (perform on VCB Proxy only) Unmount a virtual disk file (perform on VCB Proxy only) vcbVmName <hup> s ipaddr:VM_IP_address vcbMounter <hup> a name:VM_display_name t fullvm r directory_to_place_backup vcbSnapshot <hup> c moref:moref_value vcbSnapshot <hup> -l ssid:snapshot_ID vcbSnapshot <hup> -d vmid_value ssid_value vcbExport d exported_virtual_disk_name s virtual_disk_name vmkfstools i exported_virtual_disk_name restored_virtual_disk_name vcbRestore <hup> -s directory_to_restore_to mountvm d backed_up_virtual_disk_filename cycleId mount_point_name mountvm u mount_point snapshot_name

<hup> = h hostname_of_VirtualCenter_Server_or_ESX_Server u user p passwd

FAULT ANALYSIS TOOLS


Restart a service Display the last time the system was rebooted Check IP connectivity Check IP connectivity using the VMkernel stack Gather debugging information (on ESX Server) Gather debugging information (on VirtualCenter Server) Display ESX Server resource utilization Capture performance snapshots Replay performance snapshots Start VirtualCenter Server in standalone mode Re-initialize VirtualCenter Servers database service service_name restart last reboot ping ip_address_or_hostname vmkping ip_address vm-support cscript vc-support.wsf esxtop vm-support S i time_between_snapshots d snapshot_duration esxtop R vm_support_directory_path vpxd s vpxd b

Copyright 2007 VMware, Inc. All rights reserved.

EDU-VI3DSA-JA2

You might also like