ESX Qupdate 1.5

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Q.

Stop virtual machine


A1 To forcibly shutdown a VM type vmware-cmd <VM config file path & name> stop hard
A2. vmware-cmd <VM config file path & name> getstate. ps -ef | grep <virtualmachinename>
A3. ps -auwwwx |grep i virtual server name
kill -9 PID.
A3.vm-support X

Q. List all vms from commands
A1: vmware-cmd -l

Q. How to list all hba.
A1. esxcfg-mpath -l

Q. How to scan storage on esx.
A1.vmkfstools -s vmhba0
A2. esxcfg-rescan vmhba0

Q. Ports of ESX
A1.27000 license transaction, port 902,-virtual center to ESX,
VI client and web access to virtual machine-port 903,port 22- ssh access

Q. Pre requisite for vmotion.
A1. visibility to all san lun, gigabit Ethernet interconnection; source and destination should have same cpu family
although cpu no. can be different on ESX. ESX Servers must be configured with VMkenerl ports enabled for vmotion
and on the same network segment

Q. HA & DRS.
A1. HA and vmotion are two separate features and are not dependent on each other. DRS has a dependency on vMotion,
HA is used to move vm from one esx to another in event of failure, vms get rebooted on another host and DRS is use to balance vm within
cluster.

Q. vpxa,hostd,vpxd
A1. vpxa is the VC agent (ESX side); vpxd is the VC daemon (VC side)
hostd is the daemon for direct VIC connection (when you use VIC to connect to your ESX).


Q. List of virtual file
VMDK file a virtual disk file will be created to simulate the HDD for the VM.
vmx file a configuration file for the new VM
What is vmx file?
When we created a new virtual machine the description about the OS, disk and network are store in a simple plain text file, is vmx file.
vm-list a file in /etc/vm-list will get added an entry to identify the new VM and list.
Vmware.log: This is created once the virtual machine is powered on and running
Vmsd: This is a centralized file for storing information and metadata about snapshots.
Vmxf ; supplemental configuration file for virtual machines
Nvram- VMware virtual machine's BIOS state file
Vswp : swap file for memory

Q. To register the virtual machine
A1 Vmware-cmd s register /root/vmware/vm-cfg.vmx

Q. Expand disk space
A1.increase disk size use vmkfstools on ESX and than disk part,
vmkfstools -X -3Gb VMDK filename, start virtual machine, diskpart.exe, select volumes, extend

Q. NTP configuration
A1. Edit the ntp.conf file located in the /etc directory by typing the following command:

vi /etc/ntp.conf
Find the lines that say:
# restrict mytrustedtimeserverip mask 255.255.255.255 nomodify notrap noquery
# server mytrustedtimeserverip

vi /etc/ntp/step-tickers
chkconfig ntpd on
service ntpd start

Q. How to troubleshoot service console of ESX servers.
How do I troubleshoot ESX server issues?
You can check several log files on the ESX server based on the problem you are experiencing, these include:
o Vmkernel - /var/log/vmkernel records activities related to the virtual machines and ESX server
o Vmkernel Warnings - /var/log/vmkwarning records activities with the virtual machines
o Vmkernel Summary - /var/log/vmksummary - Used to determine uptime and availability statistics for ESX Server; human-readable summary
found in /var/log/vmksummary.txt
o ESX Server host agent log - /var/log/vmware/hostd.log - Contains information on the agent that manages and configures the ESX Server host
and its virtual machines (Search the file date/time stamps to find the log file it is currently outputting to.)
o Service Console - /var/log/messages - Contain all general log messages used to troubleshoot virtual machines or ESX Server
o Web Access - /var/log/vmware/webAccess - Records information on Web-based access to ESX Server
o Authentication log - /var/log/secure - Contains records of connections that require authentication, such as VMware daemons and actions
initiated by the xinetd daemon.
o VirtualCenter agent - /var/log/vmware/vpx - Contains information on the agent that communicates with VirtualCenter
o Virtual Machines - The same directory as the affected virtual machines configuration files; named vmware.log - Contain information when a
virtual machine crashes or ends abnormally

Q. All ESX commands
ESX Server management service (vmware-hostd) is running: ps -ef | grep hostd
Verifying that the VirtualCenter Agent Service is running on an ESX host : (vmware-vpxa) : ps -ef | grep vpxa
Verifying that the xinetd service is running on an ESX host : service xinetd status
Restarting the Management agents on an ESX : service mgmt-vmware restart

Q. What logs need to be submitted to vmware support.
/usr/bin/vm-support through ESX and it will create support bundle in esx-2010-01-30--
19.16.31594.tgz
script collects and packages all relevant VirtualCenter system and configuration information and VirtualCenter log
files. This information can be used to analyze the problem This needs to be attached for vmware support.

Also /var/log/messages from the service console will give additional information.
File > Export > Export Diagnostic Data. Thru Virtual Center

Q.CPU constraint
Ensure that your hosts have CPUs that are compatible, to allow VMotion.
Ensure the hosts have the same features turned on in the BIOS of the Servers. The two most common features to check are Non-
Execute Memory Protection (NX / XD) and Virtualization Technology (VT / AMD-V).

Q: Service Console CPU utilization of virtual machine
A: Run command esxtop and run command f to get all option
Interactive, Replay and Batch mode
Replay Mode : you can record and play the esxtop statistics for a specific period of time, and use also the interval of
your choice vm-support -S -i 5 -d 120
Batch mode : you can dump your esxtop stats into a .csv file for later use. You can utilize either Microsoft Excel, or
Microsoft perfmon tool to view these data at any time esxtop -b -a > output_file.csv
http://www.hypervizor.com/2009/06/interactive-replay-batch-esxtop-modes/


And review load average and CPU Idle
Load average is a measurement of the number of processes that currently waiting in the run-queue plus the number of
processes that being executed for one, five, and
15 minute intervals. A load average of 1.00 means that the ESX Server machine's physical CPUs are fully utilized, and a load
average of 0.5 indicates they are half utilized. A load average of 2.00 indicates that the system is busy. If the load average is
over 4.00, the system is heavily utilized and performance is be impacted

Q. Troubleshooting VC server
o To troubleshoot Virtual Center problems click on the Admin button in Virtual Center and then click the System Logs tab
o To view the log files directly open Windows Explorer and go to the C:\Windows\Temp\VPX directory on the Virtual Center server

Q. Troubleshooting the VMware VirtualCenter Server service when it does not start or fails
Verify that the VMware VirtualCenter Server service cannot be restarted.
If VirtualCenter is using Microsoft SQL, the VirtualCenter Server vpxd.log shows error:

ODBC error: (08001) - [Microsoft][ODBC SQL Server Driver][DBMSLPCN]SQL Server does not exist or
access denied. Than reconfigure ODBC.
Ensure that you are using SQL authentication if you are using a Microsoft SQL server because Windows NT authentication is not
supported.
Verify that ports 902, 80, and 443 are not being used by any other application

Q. How to configure SRM
A1.VCv2.5update1 installed at protected and Recovery site.SRM server installed at Protected & Recovery site; SRM
plug-in installed on VI client that will access Pro & Recov site.
TCP connectivity between VC server and SRM servers.
Oracle & SQL database that uses ODBC connectivity in Prot & Recov site.
A SRM license on VC server at Protected site.
Pre-Configured array based replication between prot & Recovery site.

Q. NFS data store
A1.The esxcfg-nas command is used to list, mount and dismount NFS exports for the VMkernel. In the first example we list the NFS datastores
which the VMkernel has mounted.
[root@esx1host root]# esxcfg-nas l

NFS01 is /NFS from 100.100.100.253 mounted
In the next example, we add a new VMkernel mount to a remote NFS server. This time we are connecting to the NFS server at IP address
100.100.100.253 and the name of the exported directory on the NFS server is /Test. We are labelling (from the ESX host perspective) this NFS
mount as NFS02. This will appear as the datastore name on the ESX host.
[root@esx1host etc]# esxcfg-nas -a -o 100.100.100.253 -s /Test NFS02
Connecting to NAS volume: NFS02
NFS02 created and connected.

Remember that to create a connection to an NFS datastore, the VMkernel needs to have an IP address, as it is the NFS client. We give the
VMkernel an IP address by creating a VMkernel port on a virtual Ethernet switch. We can do this at the command line using the command
esxcfg-vmknic

Q. What is ESXi
ESXi hypervisor lacks Service Console and requires only 32MB of space. Can be managed by VC, vmotion and vcb
can be used.
ESXI 4 lacks ssh. Ony esxi4.1 have ssh option to enable. It lacks snmp.

Q. Zoning on San
A1.Soft zoning at Storage processor level which controls lun visibility on per WWN basis
;hard zoning at Fibre channel switch per switch port basis

Q. Bootable from SAN
A1.Cheaper server-server can run cooler without internal storage.
Easier server replacement; less wasted space; easier backup processes; improved management

http://www.kreslavsky.com/2008/11/troubleshooting-common-system-management-issues-in-vmware-esx-
infrastructure.html

Q. how to configure port groups
All members of a port group share common attributes like a
tag.All members of a port group can see all of the packets sent by other members of this port group .A port
group is always connected to a single vswitch

3types
1. Virtual Machine Port Group - Used for Virtual Machine Network
2. Service Console Port Group - Used for Service Console Communications
3. VMKernel Port Group - Used for VMotion, iSCSI, NFS Communications

All the vm's which are configured in VM Port Group are able to connect to the physical machines on the network. So this port group
enables communication between vSwitch and Physical Switch to connect vm's to Physical Machine's

15. What is a VLAN ?
A VLAN is a logical configuration on the switch port to segment the IP Traffic. For this to happen, the port must be trunked with the
correct VLAN ID.
16. Does the vSwitches support VLAN Tagging? Why?
Yes, The vSwitches support VLAN Tagging, otherwise if the virtual machines in an esx host are connected to different VLANS, we need
to install a separate physical nic (vSwitch) for every VLAN. That is the reason vmware included the VLAN tagging for vSwitches. So every
vSwitch supports upto 1016 ports, and BTW they can support 1016 VLANS if needed, but an ESX server doesnt support that many VMs.
:)


Q. on crash PSOD where memory dmp is located.
After the system is rebooted the core dump is placed in the /root directory
Use vmkdumpl <core_dump_file>to extract the vmkernellog from the core dump
A vmware-log.1 file is extracted from the dump
Near the end of this file you will be able to see what had happened on the system

Details:
So you can do a few things. First is to generate a support bundle and send it off to VMware for analysis (which
you should do anyways). However, if youre like me, and cant wait, from the service console you can do foll:
Here is where the dump hides:
# ls -alh
total 14M
-rw-rr 1 root root 13M Feb 6 04:40 vmkernel-zdump-020609.04.40.1
Lets extract it:
# vmkdump -l vmkernel-zdump-020609.04.40.1
created file vmkernel-log.1
# ls -alh
-rw-rr 1 root root 186K Feb 11 14:32 vmkernel-log.1
-rw-rr 1 root root 13M Feb 6 04:40 vmkernel-zdump-020609.04.40.1
So there it is now lets take a look at the insides:
54:01:08:11.385 cpu15:1166)<6>Debug scsi underrun
54:01:08:11.385 cpu15:1166)<6>Debug scsi underrun
54:01:08:11.385 cpu15:1166)<6>Debug scsi underrun
Q. unlink and link network card if not getting network
[root@esx1host root]# esxcfg-vswitch -U vmnic1 vSwitch1


Q. view all vm not listed on VC inventory
/etc/vmware/vm-list

Q. primary server in HA
cat /var/log/vmware/aam/aam_config_util_listnodes.log
5 primary servers in HA

Q. Can 64bit operating system supported on 32bit ESC
No. VMware does not provide CPU virtualization. All the CPU requests are processes from the Guest to the Host's real
CPU. Because of this, you need a 64-bit processor to run 64-bit Virtual Guest operating systems.
For 64 bit processor, go into my BIOS and enable my Intel VT VMM capabilities



Q. Only one vm is listed on ESX and its showing very high utilization
In a multiprocessor virtual machine, Windows installs a multiprocessor HAL. Running a guest operating system with this
HAL in a uniprocessor virtual machine can cause undesirable idle loop behavior.
If your virtual machine is configured with an SMP-compatible HAL (ACPI Multiprocessor) but it has only one virtual CPU,
use the Device Manager and change to an SMP-upgradeable HAL (ACPI Uniprocessor). This reduces host CPU
utilization while the migrated virtual machine is running.
If a virtual machine is created as SMP and later changed to become UP, you can address the high CPU utilization by
installing VMware Tools.
Q.virtual hardware needs to be upgraded during ESX upgrade
ESX 4 introduced a new hardware version that can be assigned to VMs. You should upgrade your VMs to use the ESX
4 version of the VMware Tools prior to upgrading the hardware's version. If you have existing VMs that are using
hardware version 4, you can upgrade their hardware by performing the following steps:
1. Stop the VM whose hardware needs to be upgraded.
2. Select the Upgrade Virtual Hardware context menu option.
Click Yes in the confirmation dialog. The hardware in the VM will now be version 7.
Q. Licensing on ESX.
Earlier till ESX 3.5 2cpu-1license, ESX4.0-2cpu-1license

Q.Storage vmotion
Introduced with VMware ESX 3.5 and vCenter Server 2.5, Storage VMotion allows you to move VMs from one
storage data store to another while the VM is running. The difference between VMotion and Storage VMotion is that
VMotion simply moves a VM from one ESX host to another but keeps the storage location of the VM the same;
Storage VMotion changes the storage location of the virtual machine while it is running and moves it to another data
store on the same ESX host. The source and destination data stores can include any storage volume that is configured
on an ESX host, which includes local and shared storage

Q. Install vmware tool on linux virtual machine & its mandatory to install
Copy vmware tools VmwareTools-3.5.0-123630.tar.gz to tmp directory.
Run command gzip d VMwareTools-3.5.0-123630.tar.gz.
Run command tar xvf VmwareTools-3.5.0-123630.tar
Change directory to vmware-tools-distrib
Run ./vmware-install.pl
Q.Install vmware tools through command line

To upgrade a single virtual machine named myvm, in datacenter DC, in the root virtual machine folder:
vmware-vmupgrade -u user -n /DC/myvm
To upgrade two virtual machines, vm1 and vm2, both in datacenter DC, and to force all virtual machines to power off
after 5 five minutes. One virtual machine is a Linux virtual machine that does not have Advanced Power Management
configured, so that when the guest is shutdown, the virtual machine doesnt power off.Only 2 vm to be power on at a
time on host
vmware-vmupgrade -u user -n /DC/vm1 -n /DC/vm2 -t 5 m 2

Q.vmkping
vmkping issues pings from the vmotion interface (as opposed to the service console's vswif interface if you were to do a regular ping). It can be
use to verify connectivity between the kernel interface and other hosts or IP storage arrays.
vmkping -<option> address
-c how many packets
-i timeout
-s packte size
Q. how to mount SAN storage without formatting after storage up gradation
Procedure for Resignaturing
1. Before upgrading, check the vmhba datastore associated with your local storage. To do so, run the following
command from the service console:
$ vmkchdev L | grep A1 vmhba
Sample Output:
002:12.0 1077:2312 1077:0100 vmkernel vmhba0
QLogic Corp. QLA2312 Fibre Channel Adapter
--
002:14.0 1028:0013 1028:016c vmkernel vmhba1
PCI device 1028:0013 (Dell Computer Corporation)

The sample output shows that vmhba1 is associated with the local storage.
2. Note down the names with which your VMFS datastores are addressed.
3. Upgrade your PERC firmware. After upgrading, the vmhba local storage volumes are no longer visible to the
ESX Server system. When the system reboots, you are instructed to resignature the datastores. See the VMware
SAN Configuration Guide at http://www.vmware.com/pdf/vi3_esx_san_cfg.pdf for detailed information about
resignaturing.
4. Check /vmfs/volumes to confirm that the vmhba local storage volumes are inaccessible.
5. From the service console, run the following command:
$ esxcfg-advcfg s 1 /LVM/EnableResignature
This enables VMFS datastore resignaturing. VMFS datastore resignaturing involves resignaturing the UUID of
the VMFS datastore.
6. Rescan the vmhba local storage volume from the service console:

$ esxcfg-rescan vmhbaX
X is the value associated with your vmhba datastore.

After rescanning, the vmhba local storage volume appears as /vmfs/volumes/snap-<DIGIT>-<old-
label> . ESX Server logical volume manager sees the VMFS datastore as a snapshot of the original
datastore.
Caution: Perform a rescan from the service console only. Do not use the VI Client for this task because the
process will rescan and therefore resignature all the VMFS datastores including the ones on shared storage. This
creates a snapshot of the datastores on the shared storage and makes them inaccessible.
7. Rename your VMFS datastore (now visible as a snapshot) to the original name associated with your storage
from the VI Client.
8. Disable resignaturing by setting its value to 0:
$ esxcfg-advcfg s 0 /LVM/EnableResignature
9. Using VI Client, browse the local VMFS datastores and add your virtual machines to the inventory.
Outstanding issue.
ESx not connecting back to vc.
Temp directory under vmware folder.
Storage vmotion was not working. Need to disconnect ESX from vcs and connect it back
Q. Vmotion getting stuck at 10%.
Check vmkernel port,vmkping,vcpu assing more than esx capacity
Q.Unable to start vmware management service.
ps -ef | grep vmware-hostd
You should see something like:

root 3545 3504 1 11:40 ? 00:00:12 /usr/lib/vmware/hostd/vmware-hostd /etc/vmware/hostd/config.xml -u

You can kill the process by:

kill -9 <PID> (e.g. kill -9 3545)
Q.scsi reservation conflict
a. Increase the number of LUNs and try to limit the number of ESX hosts accessing the same LUN.
b. Reduce the number snapshots as they cause a lot of SCSI reservations.
c. Do not schedule backups (VCB or console based) in parallel from the same LUN.
d. Try to reduce the number of virtual machines per LUN.
e. Check if you have the latest HBA firmware across all ESX hosts.
f. Is the ESX running the latest BIOS (avoid conflict with HBA drivers)?
g. Contact your SAN vendor for information on SP timeout values and performance settings and storage array
firmware.
h. Turn off 3rd party agents (storage agents) and rpms not certified for ESX.
Q. one datastore not visible on one esx server but visible on another ESX in cluster.
) Select the Host which can't see the datastore
2) Go to configuration -> Advanced settings
3) Go to LVM -> DisallowSnapshotLUN right now is set to 1; change it to 0
4) Rescan all HBA on all the hosts
5) Verify that the missing LUN is visible on lasun221 & also verify all LUNs are visible on all hosts
6) Go back to Configuration -> Advanced Settings -> LVM -> DisallowSnapshotLUN -> change it back to 1
7) To verify everything is working fine you can rescan the LUNs one more time.

Q. Reservation
Reservation specified for the resource pool or VM, if the reservation is set to Zero (which is by default), it means no reservation is
set. VM will not start if its reservation is not met or guaranteed. When reservations are not utilized ESX host can assign them to
other VMs. Lets take example
You have VMs A and B. A & B is configured for 1GHZ reservation. Now during some days A only goes as far a 0.5 GHz, under
such case B can use 1.5 GHz. But if B is using 1.5GHz and A is poweroff, Once A is powerON B has to give away 0.5 GHz
Q.permit root login
nano /etc/ssh/sshd_config
Find the line that starts with PermitRootLogin and change the no to yes
service sshd restart

Q.get UUID of vm
get-vm ccixapp-nprd1-253 | %{(get-view $_.Id).config.uuid}


Q.Whether any virtual hardware advantage from ESX 3 to 3.5 to 4.
Virtual hardware changes from 4 to version 7 in ESX 4
Q. Command Line maintenance mode
To enter Maintenance Mode, at the ESX console type: vimsh -n -e /hostsvc/maintenance_mode_enter
To exit Maintenance Mode type: vimsh -n -e /hostsvc/maintenance_mode_exit
To display whether the ESX Server is currently in maintenance mode or not type:
vimsh -n e "hostsvc/hostsummary" | grep inMaintenanceMode
What is RDM
RDM is used when
1. You wish to Cluster VM across boxes or Physical to Virtual,In any MSCS clustering scenario that spans physical hosts
virtual-to-virtual clusters as well as physical-to-virtual clusters. In this case, cluster data and quorum disks should be
configured as RDMs rather than as files on a shared VMFS.
2. To enable use of SAN Management software inside VMs
Q.Fault Tolerance
Q.VC Heartbeat
Q.vmx is corrupted,vmdk is corrupted

Q. Compare Thick and Thin Disk provisioning
Versions of ESX prior to 4.0 were only capable of creating thick-provisioned disks. Disks in this format are created with the entire size of the disk
pre-allocated on physical storage at the time the disk is created. This pre-allocation means that creating a 100GB virtual disk actually consumes
100GB of physical disk space on your drives.
Allocating physical space to virtual disks can be a resource intensive operation. The internal process that carves out disk space on your physical
disk drives could have an impact on the performance of other virtual machines (VMs). Thus, pre-allocation provided a way to ensure that this
resource-intensive operation occurred all at once, only when new disks were provisioned.
Compare this behavior to thin-provisioned disks. With a thin-provisioned disk, the amount of physical disk storage used by a virtual disk is equal
to the amount of actual data on that disk. If you create a 100GB disk but only use 20GB of that disk, the actual disk consumption on your
physical drives will be 20GB.
There are two downsides to thin provisioning. First, each expansion of the requires a small amount of extra resources to accomplish. This
activity can have a slight impact on disk performance, particularly when many VMs share the same Datastore. Second, administrators must pay
careful attention to disk consumption. Because every disk "believes" that it has more space available than it actually has, the situation becomes
possible where a well-meaning VM consumes all your physical storage. The result of filling up your disks in this manner can be painful at best.
Todays improvements to disks, SANs, and disk provisioning have reduced the performance impact of thin provisioning. Thus, using thin-
provisioned disks can dramatically reduce your wasted disk space. However, you must be exceptionally careful to never fill that disk space to
capacity. Monitoring disk space usage and having extra disks on hand in an emergency are vitally important.

You might also like