VMware

Christian FERRERO

Blog de Christian FERRERO, IT AEQUALIS

29 Posts 1 2 Previous Next
2

This issue may occur if the IP address of an ESX host is changed while being managed by vCenter.

Symptoms

VirtualCenter cannot connect to host when performing operations such as:

Storage vMotion
Cold Migration
Cloning a Virtual Machine
Deploying from Template

Resolution

Verifying the cause
To verify the cause of the issue:

1. Log in as root to the ESX host using an SSH client.
2. In the /etc/opt/vmware/vpxa/vpxa.cfg file, locate the Host IP address. The entry looks similar to:

<vpxa>
<hostIp>10.21.48.121</hostIp>
</vpxa>

If the IP address is incorrect, perform the following steps in order. If step 1 does not solve the issue, proceed to step 2. If step 2 does not solve the issue, proceed to step 3. Do not skip a step.


Step 1

1. Right-click the ESX host in VirtualCenter and click Disconnect.
2. Reconnect the ESX host in VirtualCenter.

Step 2

1. Stop the vpxa service with the command:

# service vmware-vpxa stop

2. Open the /etc/opt/vmware/vpxa/vpxa.cfg file in a text editor and correct the IP address of the ESX host.
3. Start the vpxa service with the command:

# service vmware-vpxa start

Step 3

Note: This step removes all host and virtual machine historical statistics counters.

1. Right-click the ESX host in VirtualCenter and click Disconnect.
2. Remove the disconnected ESX host from VirtualCenter.
3. Backup thevpxa.cfg file with the command:

# mv /etc/opt/vmware/vpxa/vpxa.cfg /etc/opt/vmware/vpxa/vpxa.oldcfg

4. Add the disconnected ESX host to the VirtualCenter inventory.
5. Run the following command to examine the contents of /etc/opt/vmware/vpxa/vpxa.cfg and confirm that the host IP address is correct:

# cat /etc/opt/vmware/vpxa/vpxa.cfg

2 Comments Permalink
0

SCOM 2007

Posted by cfo Nov 9, 2009

Event ID 7030:

The VMware Tools Service service is marked as an interactive service. However, the system is configured to not allow interactive services. This service may not function properly.

Resolve: http://technet.microsoft.com/en-us/library/cc756339(WS.10).aspx

Change the interact with desktop setting

0 Comments Permalink
0

RVTools

Posted by cfo Nov 6, 2009

RVTools is a small .NET 2.0 application which uses the VI SDK to display information about your virtual machines. Interacting with VirtualCenter 2.x or ESX 3.x RVTools is able to list information about cpu, memory, disks, nics, cd-rom, floppy drives, snapshots, VMware tools, ESX hosts, datastores and health checks. With RVTools you can disconnect the cd-rom or floppy drives from the virtual machines and RVTools is able to list the current version of the VMware Tools installed inside each virtual machine. and update them to the latest version.

http://rvtools.deveij.com/

0 Comments Permalink
1

Disk free space

Posted by cfo Oct 28, 2009

df - Disk free space
List all file systems :# df -h

1 Comments Permalink
1

TCP port VMWARE ESX

Posted by cfo Oct 1, 2009

Tcp Port

  • 80 = http pour le client web, redirigé vers les port 443
  • 443 = https pour le client web
  • 902 = port tcp utilisé pour la VI Client
  • 903 = port tcp utilisé pour la remote console
  • 2049 = NFS
  • 2050 - 5000 et *8042*-*8045*= VM HA ( High Avaibility )
  • 3260 = iSCSI
  • 8000 = port tcp utilisé pour VMotion
  • 27000 & 27010 = port tcp pour le Serveur de Licence*

Flux in VI3 architecture

1 Comments Permalink
0

Performing management, configuration, and troubleshooting tasks is an important skill set for Virtual Infrastructure administrators; This post focuses on commands that are most likely to be used to manage an ESX Server from the Service Console.

The Service Console is a modified version of Red Hat Linux which is used to boot and load the VMkernel for VMware ESX Server and provide services such as the Apache web server for the MUI and command-line management. It has several commands that are unique to ESX Server such as vmware-cmd, vmkfstools, vmkpcidivy, esxtop, and some custom scripts.

Practical Examples

  • If you need to view current partitions, sizes, and the amount of disk space consumed, type :
vdf -h
the output should be similar to the one showed bellow

http://www.ntsysv.com/wp-content/uploads/2009/01/view-consumed-disk-space-on-esx-host-300x88.jpghttp://www.ntsysv.com/wp-content/uploads/2009/01/view-consumed-disk-space-on-esx-host.jpg

View consumed disk space on esx host

  • If you want to view the contents of a VMFS volume on your server, type :
vmkfstools -l vmfs_label
  • To check disk space consumption under a specific directory, type :
du -sk directory-name
  • To find out which device file maps to a LUN,
# type : vmkpcidivy -refreshnames (This refreshes the table of device files.)
  1. type : vmkpcidivy -q vmhba_devs* To export a virtual disk from vmfs to a different location on your ESX Server, type :
vmkfstools -e /targetdirectory/filename.vmdk /vmfs/volume_label/sourcefile.vmdk
  • To display all registered VMs, type :
vmware-cmd -l
http://www.ntsysv.com/wp-content/uploads/2009/01/list-registred-virtual-machine-on-esx-host-300x72.jpghttp://www.ntsysv.com/wp-content/uploads/2009/01/list-registred-virtual-machine-on-esx-host.jpg

List Registred virtual machine on esx host

  • To power on VMs from the Service Console, type :
vmware-cmd vmx-configfile start soft
  • To power off VMs from the Service Console, type :
vmware-cmd vmx-configfile stop soft or vmware-cmd vmx-configfile stop hard
I'm trying here to list some available commands and their options, but it is not intended to replace the officiel documentation neither a better reference.

Using esxcfg

In addition to the standard Linux commands, VMware has implemented a specific set of commands directed toward ESX-specific tasks. The following list of commands show how to manage various components of the ESX Server configuration.

esxcfg-auth Used to configure an ESX Server host to support network-based authentication methods (e.g., Active Directory AD).

  • - -enablead to configure Service Console for AD authentication
  • - -addomain to set the domain the Service Console will authenticate against
  • - -addc to set the domain controller to authenticate against for AD authentication
  • - -usecrack to enable the pam_cracklib for managing password complexity

esxcfg-firewall Used to query, enable, and disable services on the Service Console firewall. Note that everything is blocked by default.

  • -q to query the current firewall settings
  • -q servicename to query the status of a specific service
  • -q incoming/outgoing to query the status of incoming and outgoing ports
  • - -blockIncoming to block all incoming connections on ports not required for system function
  • - -blockOutgoing to block all outgoing connections on ports not required for system function
  • - -allowIncoming to allow incoming connections on all ports
  • - -allowOutgoing to allow outgoing connections on all ports
  • - -e servicename to enable a specific service
  • - -d servicename to disable a specific service

esxcfg-info Used to review the hardware information for Service Console and VMKernel.

  • -w to print hardware information
  • -s to print storage and disk information
  • -n to print network information

esxcfg-mpath Used to view and configure the multipathing settings for an ESX Server host's fibre channel or iSCSI storage devices. Multipathing is the ability to connect to SAN or iSCSI storage devices through multiple pahs, and it suppose that the host has at least (and it is enough) 2 HBA cards.

  • -p to set the policy for mru (most recently used), fixed, or rr (round-robin)
  • -P to define a path to operate on
  • -s with "on" or "off" to enable or disale a specific path
  • -f to set a specified path as the preferred

esxcfg-nas Used to configure NAS storage on ESX Server. NAS is supported by ESX but limits its features like vMotion which is not allowed in this case (but still it is a low cost solution)

  • -l to list all NAS
  • -a to add a new NAS datastore on a specified host
  • -o to provide the name of the NAS host
  • -s to provide the name of the NAS share
  • -delete to delete a NAS datastore

esxcfg-nics Used to obtain information about and configure the physical network adapters installed in an ESX Server host.

  • -s to set the speed of a card to 10,100,1000, or 10,000.
  • -d to set the duplex to half or full

esxcfg-route Used to configure the default gateway for the VMkernel.

esxcfg-swiscsi Used to configure the software iSCSI component of ESX Server.

  • -e to enable software iSCSI
  • -d to disable software iSCSI
  • -q to query if software iSCSI is enabled
  • -s to scan for new LUNs using software iSCSI

esxcfg-vmhbadevs Used to obtain information about the LUNs available to the ESX Server.

  • -m to print the VMFS UUID if formatted as VMFS esxcfg-vmknic Used to configure the VMkernel NIC.
  • -a to add a VMkernel port group
  • -d to delete a VMKernel
  • -e to enable the VMkernel NIC
  • -D to disable the VMkernel port
  • -i to set the IP address of the VMkernel NIC
  • -n to set the network mask for the IP of the call

esxcfg-vswif Used to set the parameters of the Service Console; the Service Console interface allow management of the ESX.

  • -a to add a Service Console NIC (this option is predicated on having IP information and port group names)
  • -d to delete a the Service Console NIC
  • -e to enable the Service Console NIC
  • -D to disable the Service Console NIC
  • -p to set the port group name for the Service Console NIC
  • -i to set the IP address to be used for the Service Console NIC
  • -n to set the network mask of for the Service Console NIC

esxcfg-vswitch Used to add, remove, or modify a virtual switch. All network communications of virtual machines go through virtual switches.

  • -a to add a new virtual switch
  • -d to delete a new virtual switch
  • -l to list all existing virtual switches
  • -L to unlink a network adapter from a hosting provider
  • -U to link a network adapter
  • -v to set the vLAN ID for a port group
  • -A to add a new port group
  • -D to delete a port group
  • -C to query for the existence of a port group name

Using vicfg

The latest updates to the VI3 product suite, ESX Server 3.5, ESXi, and VirtualCenter 2.5 have also brought about the introduction of a new set of command line tools in the vicfg. The commands are similar to the esxcfg commands but are more directly dedicated to remote host management functions using the new remote command line interface tool available from VMware.

Just to remid you, ESX 3.5i comes without the "management virtual machine" that everybody takes for the OS of the ESX! In fact, the ESX 3.5i is a 32Mb OS, in other words, the least set of commands to manage VMs.

vicfgvicfg-nas Used to manipulate NAS/NFS.

  • - -add or -a to add a new NAS file syste
  • - -delete or -d to delete a NAS file system
  • - -help to display help text
  • - -nasserver or -o followed by <n_host> to add the hostname of the new NAS file system
  • - -share or -s used with -a to provide the name of the directory that is exported on the NAS device
  • - -vihost or -h followed by <host> to direct the command to a particular ESX Server host

vicfg-vmhbadevs Used to discover information about available LUNs.

  • - -help to display help text
  • - -query or -q to print the output in 2.6 compatibility mode
  • - -vihost or -h followed by <host> to direct the command to a particular ESX Server host
  • - -vmfs or -m to print the VMFS UUID in addition to the HBA and /dev names for LUNs that are formatted as VMFS

vicfg-mpath Used to manipulate multipathing.

  • - -help to display help text
  • - -bulk or -b to show all LUNs and paths in parsable format
  • - -detailed or -d to show all information about a LUN, including its globally unique name
  • - -hbas or -a to print the list of HBAs that can be identified by a unique ID
  • - -list or -l to list all LUNs on the system and the paths to each LUN
  • - -lun or -L followed by <lun> to specify the LUN to use in the operations command (this option is not used by itself)
  • - -path or -P followed by <path> to specify the path to use in the operations command (this option is not used by itself)
  • - -policy or -p followed by mru to set the policy for a given LUN (the option for round-robin (rr) can be used but is still experimental)
  • - -preferred or -f to set the specified path (-path) as the preferred path
  • - -query or -q to query a LUN for information
  • - -state or -s followed by on or off to enable or disable a given path
  • - -vihost or -h followed by <host> to direct the command to a particular ESX Server host

vicfg-rescan Used to perform a rescan for discovering new LUNs.

  • - -help to display help text
  • - -vihost or -h followed by <host> to direct the command to a particular ESX Server host
    <VMkernel_SCSI_adapter_name> to provide the name of the adapter to rescan (i.e., vmhba1)

vicfg-dumppart Used to query, set, and scan diagnostic partitions on ESXi.

  • - -activate or -a to activate the configured diagnostic partition (performs the same as -set)
  • - -deactivate or -d to deactivate the currently active diagnostic partition
  • - -find or -f to find all diagnostic partitions
  • - -get-active or -t to get the active diagnostic partition for the system
  • - -get-config or -c to get the configured diagnostic partition for the system
  • - -list or -l to list all partitions on the system that can act as a diagnostic partition
  • - -set or -s followed by <vmhbaw:x:y:z> to set the active and configured diagnostic partition
  • - -vihost or -h followed by <host> to direct the command to a particular ESX Server host

vicfg-nics Used to report on and manage physical network adapters.

  • - -help to display help text
  • - -auto or -a to set the given adapter to autonegotiate the speed and duplex settings
  • - -duplex or -d followed by full <nic> to set the duplex value for a given NIC
  • - -speed or -s followed by <speed><nic> to set the speed value for a given NIC
  • - -list or -l to list the physical adapters in the system
  • - -vihost or -h followed by <host> to direct the command to a particular ESX Server host

vicfg-vmknic Used to configure virtual network adapters.

  • - -help to display help text
  • - -add or -a to add a virtual network adapter to the system (an IP address and port group name must be specified)
  • - -del or -d followed by <port_group> to delete the virtual network adapter on the specified port group
  • - -ip or -i followed by <IP address> to set the virtual network adapter to a given IP address or to obtain an address from a DHCP server
  • - -list or -l to list virtual network adapters on the system
  • - -netmask or -n followed by <netmask> to set the network mask for the assigned IP address
  • - -vihost or -h followed by <host> to direct the command to a particular ESX Server host

vicfg-vswitch Used to configure virtual switches.

  • - -help to display help text
  • - -add or -a followed by <vswitch_name> to add a new virtual switch
  • - -add-pg or -A followed by <portgroup> <switch> to add a port group to the specified switch
  • - -check or -c followed by <virtual_switch> to check for the existence of a virtual switch
  • - -check-pg or -C followed by <port_group> to check for the existence of a port group
  • - -delete or -d followed by <vswitch_name> to delete the specified virtual switch (this command will not work if any of the virtual switch ports are in use)
  • - -del-pg or -D followed by <portgroup> to delete the specified port group (this command will not work if the port group is in use)
  • - -link or -L followed by <pnic> to add a physical adapter to a virtual switch
  • - -list or -l to list all virtual switches and port groups
  • - -mtu or -m to set the maximum transmission unit (MTU) of the virtual switch
  • - -pg or -p followed by <port_group> to provide the name of a port group when using the -vlan option (use the ALL parameter to set VLAN IDs on all port groups of a virtual switch)
  • - -vlan or -v to set the VLAN ID for a specific port group (using the parameter 0 disables all VLAN IDs; using -vlan requires the -pg option)
  • - -vihost or -h followed by <host> to direct the command to a particular ESX Server host

vicfg-route Used to configure the default route for VMkernel ports.

  • - -help to display help text
  • - -vihost or -h followed by <host> to direct the command to a particular ESX Server host <gateway> to specify the default gateway to be used by the VMkernel

vicfg-ntp Used to configure NTP settings.

  • - -help to display help text
  • - -add or -a followed by <server> to add an NTP server
  • - -delete or -d followed by <server> to delete an NTP server
  • - -list or -l to list the configured NTP servers
  • - -vihost or -h followed by <host> to direct the command to a particular ESX Server host

0 Comments Permalink
1

List all process running : ps -A

SCM client on ESX Server (Other UNIX)

jacclient { start | stop | restart | status | console | version }

start: Starts the client component.
stop: Stops the client component.
restart: Stops and then starts the client component.
status: Displays the runtime status of the client component.
console: Displays the recent contents of the client log file and then displays updates to the log file until Ctrl+C is pressed.
version Displays the version of the client component.

Location

Client installation directory. (Default directory is /opt/IBM/SCM/client.)
Fully qualified name is not required if /usr/bin is in the command path.

Examples

Start the client: ./jacclient start
Stop the client: ./jacclient stop
Restart the client: ./jacclient restart

1 Comments Permalink
1

The last password: XXXXXXXX
The new password: YYYYYY
FQDN : ESX Server

Connect-VIServer -Server FQDN -Protocol https -User root -Password XXXXXXXX
Set-VMHostAccount -UserAccount root -Password YYYYYY

1 Comments Permalink
1

Add user: userA with the password: YYYYYY
FQDN : ESX Server

Connect-VIServer -Server FQDN -Protocol https -User root -Password XXXXXXXX
New-VMHOSTAccount -ID userA -Password YYYYYY -UserAccount

1 Comments Permalink
2

Add user on ESX 3.5

Posted by cfo Jun 24, 2009

  • Login to service console
  • Type "useradd sshuser" (or whatever username you want to use) to add the user
  • Type "passwd sshuser" to set the password for this user
  • Type "usermod -g root sshuser" to add the user to the root group
  • Type "usermod -u 0 sshuser" to change the UID of the user to zero to match root

2 Comments Permalink
4

#esxcfg-vswif -l
#esxcfg-vswif -i x.x.x.x -n x.x.x.x vswif0

Change GW
Edit this file "/etc/sysconfig/network" and change IP GW

4 Comments Permalink
1

If ESX is not responding, you will need to start/restart the VMware Management service. Here is the command you would use:

  1. service mgmt-vmware stop
  2. service mgmt-vmware start (can take up to 1 minute before fully online)
OR
  1. service mgmt-vmware restart

1 Comments Permalink
1

Adding static route to ESX

Posted by cfo Mar 2, 2009

Use Route command as follow:

route add -net xxx.xxx.xx.xx netmask xxx.xxx.xxx.xx gw xxx.xxx.xx.xx

1 Comments Permalink
3

how to determine the ESX version

Posted by cfo Feb 3, 2009

In a SSH command use "vmware -v"

3 Comments Permalink
1

Deploy VM on Esxi with SCOM 2007

Posted by cfo Oct 31, 2008

For deploy a virtual machine with scom 2007, you need modify network settings to the .vmx file

  • Remove VM to Virtual Center
  • Edit .vmx file
  • Add line « ethernet0.virtualDev = “e1000" »
  • Add VM to Virtual Center Inventory
- browsing DataStore
- click right to .vmx file
- Add Inventory

  • Add network card
  • Start VM

1 Comments 0 References Permalink
1 2 Previous Next

cfo

Click to view cfo's profile Member since: Aug 12, 2008

Blog de Christian FERRERO, IT AEQUALIS

View cfo's profile

Communities