|
vmkeventd
|
A utility for capturing VMkernel
events
|
|
|
vmklogger
|
A utility for logging VMkernel
events
|
|
|
vpxa
|
Thsi rpocess is responsible for
vCenter Server communications, commands received are passed to the hostd process for processing.
|
|
|
sfcbd
|
The Common Information Model (CIM)
system monitors hardware and helalth status. The CIM is a standard set of
API's that remote applications can use to query the health and status of the
ESXi host.
sfcb-vmware_int
sfcb-vmware_aux sfcb-vmware_raw sfcb-vmware_bas sfcb-qlgc sfcb-HTTP-Daemon sfcb-ProviderManager |
|
|
vmware-usbarbitrator
|
VMware USB Arbitration Service,
Allows USB devices plugged into the HOST to be usable by the guest.
|
|
|
vobd
|
|
|
|
vprobed
|
a utility for running the vProbe
daemon. VProbes is a facility for transparently instrumenting a powered-on
guest operating system, its currently running processes, and VMware's
virtualization software. VProbes provides, both dynamically and statically.
|
|
|
openwsmand
|
Openwsman is a system management
platform that implements the Web Services Management protocol
(WS-Management). It is installed and running by default.
|
|
|
hostd
|
The ESXi server host agent, this
allows the vSphere client or vCenter access to the host. It consists of two
processes
hostd-poll
hostd-worker |
|
|
vix-high-p
|
The VIX API (Virtual
Infrastructure eXtension) is an API that provides guest management operations
inside of a virtual machine that maybe running on VMware vSphere, Fusion,
Workstation or Player. These operations are executed on behalf of the
vmware-tools service that must be running within the virtual machine and
guest credentials are required prior to execution.
|
|
|
vix-poll
|
|
|
|
dropbearmulti
|
Dropbear includes a client,
server, key generator, and scp in a single compilation called dropbearmulti, this is basically the ssh stuff
|
|
|
net-cdp
|
CDP is used to share information
about other directly-connected Cisco networking equipment, such as upstream
physical switches. CDP allows ESX and ESXi administrators to determine which
Cisco switch port is connected to a given vSwitch. When CDP is enabled for a
particular vSwitch, properties of the Cisco switch, such as device ID,
software version, and timeout, may be viewed from the vSphere Client. This
information is useful when troubleshooting network connectivity issues
related to VLAN tagging methods on virtual and physical port settings.
|
|
|
net-lbt
|
A debugging utility for the new
Load-Based Teaming feature
|
|
|
net-dvs
|
A debugging utility for
Distributed vSwitch
|
|
|
busybox
(ash)
|
BusyBox is a software application
that provides many standard Unix tools, much like the larger (but more
capable) GNU Core Utilities. BusyBox is designed to be a small executable for
use with the Linux kernel, which makes it ideal for use with embedded
devices. It has been self-dubbed "The Swiss Army Knife of Embedded Linux
Busybox utilities:
ash - The Almquist shell (also known as A Shell, ash and sh) |
|
|
helper??-?
|
|
|
|
dcui
|
Direct Console User Interface
(DCUI) process provides a local management console for the ESXi host.
|
|
|
VMware iSCSI proccess
|
||
|
vmkiscsid
|
Vmware Open-iSCSI initiator
daemon, see below for the files that are used
/etc/vmware/vmkiscsid/iscsid.conf
/etc/vmware/vmkiscsid/initiatorname.iscsi |
|
|
iscsi_trans_vmklink
|
|
|
|
iscsivmk-log
|
|
|
|
VMware vMotion
|
||
|
vmotionServer
|
|
|
|
VMware High Availability
|
||
|
agent
|
this agent is installed and
started when a ESXi server is joined to a HA cluster.
|
|
Ports
|
22
|
allows access to ssh
|
|
53
|
used for DNS
|
|
80
|
This provides access
to a static welcome page, all other traffic is redirected to port 443
|
|
443
|
This port acts as a
reverse proxy to a number of services to allow for Secure Sockets Layer
(SSL). The vSphere API uses this port for communications.
|
|
902
|
Remote console
communication between vSphere client and ESXi host for authentication,
migrate and provision
|
|
903
|
The VM console uses
this port
|
|
5989
|
Allows communication
with the CIM broker to obtain hardware health data for the ESXi host.
|
|
8000
|
vMotion requests
|
Commands
|
test default gateway
|
vmkping -D
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Performance
|
esxtop
|
|
|
|
|
|
|
Multipathing
|
Detailed information
|
esxcfg-mpath -l
|
|
List all Paths with
abbreviated information
|
esxcfg-mpath -L
|
|
List all Paths with
adapter and device mappings
|
esxcfg-mpath -m
|
|
List all devices with
their corresponding paths
|
esxcfg-mpath -b
|
|
List all Multipathing
Plugins loaded into the system
|
esxcfg-mpath -G
|
|
Set the state for a
specific LUN Path. Requires path UID or path Runtime Name in --path
|
esxcfg-mpath --state
<active|off>
|
|
Used to specify a
specific path for operations
|
esxcfg-mpath -P
|
|
Used to filter the
list commands to display only a specific device
|
esxcfg-mpath -d
|
|
Restore path setting
to configured values on system start
|
esxcfg-mpath -r
|
VMware CheatSheet
This is a quick and dirty cheatsheet for VMware ESXi server
version 4.1, many commands can be used on the older version.
Processes
|
Esxcfg-Commands
|
|||
|
esxcfg-advcfg
|
Set/Get Advance Configuration
Parameters (Stored in /etc/vmware/esx.conf)
|
||
|
esxcfg-auth
|
Configure authentication (ADS,
NIS, Kerberos)
|
||
|
esxcfg-boot
|
Configure Boot-Options
|
||
|
esxcfg-configcheck
|
Checks format of
/etc/vmware/esx.conf (e.g. Used after esx-updates)
|
||
|
esxcfg-dumppart
|
Configure partition for core-dumps
after PSOD
|
||
|
esxcfg-firewall
|
Configure ESX-server firewall
|
||
|
esxcfg-hwiscsi
|
Configure hardware iSCSI
initiators
|
||
|
esxcfg-info
|
Get information about hardware,
resources, storage, … of the ESX-Server
|
||
|
esxcfg-init
|
Used Internally on boot
|
||
|
esxcfg-linuxnet
|
Setup/Remove linux network devices
(ethX)
|
||
|
esxcfg-module
|
Enable/Disable/ Add new/ Query
VMKernal modules and set/ get parameters for them.
|
||
|
esxcfg-mpath
|
Configure multipathing for
Fibre-Channel and iSCSI
|
||
|
esxcfg-nas
|
Configure NFS-datastores
(“NFS-client”)
|
||
|
esxcfg-nics
|
Configure physical nics (VmnicX).
|
||
|
esxcfg-pciid
|
Recreate PCI-device list
/etc/vmware/{pci.ids, pcitable, pcitable.linux, vmware-device.map } from the
configuration files /etc/vmware/pciid/*.xml
|
||
|
esxcfg-rescan
|
Rescan a SCSI/FC/iSCSI adapter.
|
||
|
esxcfg-resgrp
|
Configure resource groups
|
||
|
esxcfg-route
|
Configure the VMKernel default
route
|
||
|
esxcfg-swiscsi
|
Configure /Rescan software iSCSI
initiator
|
||
|
esxcfg-upgrade
|
Used for upgrades from ESX2.x to
ESX3
|
||
|
esxcfg-vmhbadevs
|
Get information about attached
LUNs with /dev/sdX/mappings
|
||
|
esxcfg-vmknic
|
Add /Remove /Configure VMKernel
NICs.
|
||
|
esxcfg-vswif
|
Add/Remove/Configure
ServiceConsole NICs
|
||
|
esxcfg-vswitch
|
Add/Remove/Configure Virtual
Switches
|
||
|
|
|||
|
esx-Commands
|
|||
|
esxnet-support
|
Diagnostic information about
Console NICs (Gives Errors in ESX-3.5.0)
|
||
|
esxtop
|
Live Statistics of Virtual
Machines (with VM-Names)
|
||
|
esxupdate
|
Tool for updating ESX-3.x
|
||
|
|
|||
|
Vmware-Commands
|
|||
|
Vmware-authd
|
For internal use only
(authentication)
|
||
|
Vmware-cmd
|
See vmware-cmd section
|
||
|
vmware-configcheck
|
Check Virtual Machine configuration
files (*.vmx)
|
||
|
vmware-config.pl
|
Configure ESX-hostd port,
recompile/install VMware VmPerl Scripting API
|
||
|
vmware-hostd
|
Demon for VI Client connections
(should only be started by mgmt-vmware start-script)
|
||
|
vmware-hostd-support
|
Creates /var/log/vmware/hostd-support.tgz
|
||
|
vmware-mkinitrd
|
Creates initrd (initial ramdisk)
|
||
|
vmware-vim-cmd
|
Please see vmware-vim-cmd section
|
||
|
vmware-vimdump
|
Get information about ESX-Server
configuration and Virtual Machines.
|
||
|
vmware-vimsh
|
Interactive shell – comparable to
vmware-vim-cmd with additional commands
|
||
|
vmware-watchdog
|
Watchdog-Demon to keep
vmware-hostd running (should only be started by mgmt-vmware start-script)
|
||
|
vmware-webAccess
|
WebAccess-Demon for browser based
management (should only be started by vmware-webAccess start-script)
|
||
|
|
|||
|
Vm-Commands
|
|||
|
vmfsqhtool
|
Prints UUID of a device header
|
||
|
vmfsqueuetool
|
Formats all partitions in vmfs
queue
|
||
|
vmkchdev
|
Manage PCI devices (give control
over the device to VMKernel or Service Console)
|
||
|
vmkdump
|
Manage VMKernel dump partition
|
||
|
vmkerrcode
|
Give description of VMKernel error
codes base on decimal or hex value
|
||
|
vmkfstools
|
Create/Remove/Configure
VMFS-Filesystems and Virtual Machine .vdsk files (Virtual Disk File)
|
||
|
vmkiscsid
|
iSCSI demon
|
||
|
vmkiscsi-device
|
iSCSI device information
|
||
|
vmkiscsi-ls
|
List iSCSI devices
|
||
|
vmkiscsi-tool
|
Configure software iSCSI initiator
|
||
|
vmkiscsi-util
|
Get information about iSCSI
devices
|
||
|
vmkloader
|
Load and unloads the VMKernel
|
||
|
vmkload mod
|
Load/Unload VMKernel modules (e.g.
device drivers)
|
||
|
vmklogger
|
Create logmessages (like logger
for VMKernel messages)
|
||
|
vmkpcidivy
|
deprecated
|
||
|
vmkping
|
Ping on VMKernel network
|
||
|
vmkuptime.pl
|
Creates HTML output with
Uptime/Downtime/Availability
|
||
|
vmres.pl
|
deprecated
|
||
|
vmsnap all
|
Snapshot all Virtual Machines on a
ESX-Server
|
||
|
vmsnap.pl
|
deprecated
|
||
|
vmstat
|
(this is a standard linux command
– lists memory/disk access statistics)
|
||
|
vm-support
|
Creates
/etc/init.d/esx-<date>.tgz
|
||
|
vmware
|
internal use – can not be started
manually
|
||
|
|
|||
|
Other Commands
|
|||
|
vdf
|
Show free disk space of mounted partitions
(like df with vmfs-support)
|
||
|
|
|||
|
Start-Scripts
|
|||
|
Scripts inside /etc/init.d/
|
|||
|
mgmt-vmware
|
Start/Stop/Restart the demon for
the VI-Client connections
|
||
|
vmkhalt
|
internal use – can not be started
manually
|
||
|
vmware
|
internal use – can not be started
manually
|
||
|
vmware-functions
|
internal use – can not be started
manually
|
||
|
vmware-late
|
internal use – can not be started
manually
|
||
|
vmware-vmkauthd
|
internal use – can not be started
manually
|
||
|
vmware-vpxa
|
Start/Stop/Restart the demon for
the Virtual Center connections
|
||
|
vmware-webAccess
|
Start/Stop/Restart the demon for
the Web-Interface connections
|
||
|
|
|||
|
Running Processes
|
|||
|
crond
|
Schedule jobs at specific
intervals
|
||
|
gpm
|
Mouse support in the text console
|
||
|
init
|
First process which runs every
other process
|
||
|
klogd
|
Kernel log demon
|
||
|
logger
|
Logs messages to /var/log
|
||
|
sshd
|
Provides secure shell access
|
||
|
syslogd
|
Log/Filter demon with a remote
logging ability
|
||
|
vmware-hostd
|
Demon for VI Client connections
|
||
|
vmkload app
|
Loads vmware applications
(internal use only)
|
||
|
vmklogger
|
Logs VMKernel messages to
/var/log/vmware
|
||
|
wsmand
|
Web Services Management
|
||
|
vmware-vmkauthd
|
Demon for user authentication
|
||
|
vmware-vmx
|
Provides context for a Virtual
Machine (internal use only)
|
||
|
vmware-watchdog
|
Checks if vmware processes are
running (no connection test à does not restart hung processes)
|
||
|
vpxa
|
Virtual Center agent
|
||
|
webAccess
|
Web-Interface (TomCat-Server)
|
||
|
xinetd
|
Listen on network ports for other
demons and start them on-demand
|
||
|
|
|||
|
vmware-cmd Commands
|
|||
|
Commands for a Virtual Machines
(vmware-cmd -h).
|
|||
|
getconnectedusers
|
List name and IP of connected
users (non-working with esx3.5.0?)
|
||
|
getstate
|
Show current state of VM
(Ofi/On/…)
|
||
|
start
|
Start a VM
|
||
|
stop
|
Stop a VM
|
||
|
reset
|
Reset a VM
|
||
|
suspend
|
Suspend a VM
|
||
|
setconfig
|
Set a variable in the
vmx-configuration-file
|
||
|
getconfig
|
Get a variable from the vmx-file
|
||
|
setguestinfo
|
Set guest info variable
|
||
|
getguestinfo
|
Get guest info variable
|
||
|
getproductinfo
|
Get various product info
|
||
|
connectdevice
|
Connect a device
|
||
|
disconnectdevice
|
Disconnect a device
|
||
|
getconfigfile
|
Get path/filename of config file
|
||
|
getheartbeat
|
Get current heartbeat
|
||
|
gettoolslastactive
|
Time since last notification from
vmware-tools (in seconds)
|
||
|
getresource
|
Get a VM resource
|
||
|
setresource
|
Set a VM resource
|
||
|
hassnapshot
|
Determine if VM has a snap-shot
|
||
|
createsnapshot
|
Create a snapshot
|
||
|
revertsnapshot
|
Revert to last snapshot
|
||
|
removesnapshots
|
Remove all snapshots
|
||
|
answer
|
Answer a question (if VM requires
input)
|
||
|
|
|||
|
vmware-vim-cmd Commands
|
|||
|
hostsvc/
|
ESX-Server commands
|
||
|
internalsvc/
|
ESX-Server internal com- mands
|
||
|
proxysvc/
|
Web-SDK proxy commands
|
||
|
vimsvc/
|
VirtualCenter commands
|
||
|
vmsvc/
|
VM commands
|
||
|
|
|||
|
Log Files
|
|||
|
Logs are in /var/log/vmware/ if no
other path is specified)
|
|||
|
/etc/syslog.conf
|
Configure logging behaviour
|
||
|
esxcfg-boot.log
|
Boot messages
|
||
|
esxcfg-firewall.log
|
List of executed firewall commands
and log messages
|
||
|
esxcfg-linuxnet.log
|
LinuxNet messages
|
||
|
esxupdate.log
|
Debug messages for updates
|
||
|
hostd.log
|
hostd messages
|
||
|
vpx-iupgrade.log
|
Logs for package
installations/removals by Virtual Center (e.g. output of rpm –hiv
VMware-vpxa-2.5.0-64192.i386.rpm)
|
||
|
vpx/vpxa.log
|
Virtual Center Agent messages
|
||
|
vmfsqueuetool.log
|
VMFSQueueTool messages
|
||
|
webAccess
|
Web-Access messages
|
||
|
/proc/vmware/log
|
VMKernel messages
|
||
|
/var/log/ storage-Monitor
|
VMKernel storage monitor messages
|
||
|
/var/log/ vmkernel
|
VMKernel messages (info messages
only)
|
||
|
/var/log/ vmkproxy
|
VMKernel userworld proxy messages
|
||
|
/var/log/ vmk-summary
|
VMKernel messages (notice and
higher)
|
||
|
/var/log/ vmk-warning
|
VMKernel warning messages
|
||
- esxcli software vid list: This command will show a listing of all patches & updates installed on the EtSX/ESXi host.
- esxcli software vid install -d: This command will install a specified file as long as you specify the location of the local file. Example of this would be ” esxcli software vid install -d /vmfs/volumes/datastore/patches/file.zip.
- esxcli software vid install -v: This command is similar to “esxcli software vid install -d” however this will allow you to specify a file and install it via http as long as you the URL. Example of this would be “esxcli software install -v https://vmwarefiles.com/software/patches/myfile.vid.
- reboot: This command is pretty clear. This will reboot the ESX/ESXi host. Typically when you install a file the installation will tell you if a reboot is required or not and since it will not reboot during the installation you must reboot if it tells so. Failure to do so will simply be that your ESX/ESXi instance will not see the installed update.
- vim-cmd svc/maintenance_mode_enter: This command will force your ESX/ESXi instance to enter maintenance mode. Maintenance mode is required to for installs or updates on the ESX/ESXi host. Keep mind that if you have VM’s running prior to running this command then it will not go into maintenance mode. All VM’s must be powered off or moved off the host to enter maintenance mode.
- vim-cmd svc/maintenance_mode_exit: This command takes you out of maintenance mode. It does not power up your VM’s, so don’t expect it to do so.
vmware-cmd VM Management in the
console
|
vmware-cmd -l
Sample:
[root@esxhost root]#
vmware-cmd -l
/vmfs/volumes/44ee9812-da790870-b7f7-00145e1b5242/cumuli/cumuli.vmx
/vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx
List path and names of .registered VM vmx files on the present
host
Very important! Use the path with the UUID (vmfslabel) where requested in vmware-cmd
use vmware-cmd -l
command to retrieve the UUID
|
list
|
|
vmware-cmd
/vmfs/volume/vmfslabel/VMName/VMName.vmx getstate
Sample:
[root@esxhost root]#
vmware-cmd /vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx
getstate
getstate() = on
Retrieve power state of the VM: off, on, suspended, stuck
|
getstat
|
|
vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx reset trysoft
Sample:
[root@esxhost root]#
vmware-cmd /vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx
reset trysoft
reset(trysoft) =
1
Reboot the VM. First try a nice shutdown, then if necessary
force a shutdown before reboot
|
reboot
|
|
vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx start
Sample:
[root@esxhost root]#
vmware-cmd
/vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx start
start() = 1
Power on the VM
|
start
|
|
vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx stop trysoft
vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx stop hard
Sample:
[root@esxhost root]#
vmware-cmd
/vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx stop
trysoft
stop(trysoft) =
1
Shutdown/halt the VM. First try a nice shutdown, then if
necessary force a shutdown. Finally power off.
|
shutdown
|
|
vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx suspend
Sample:
[root@esxhost root]#
vmware-cmd
/vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx suspend
suspend() = 1
Suspend the VM
|
suspend
|
|
vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx hassnapshot
Sample:
[root@esxhost root]#
vmware-cmd
/vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx
hassnapshot
hassnapshot() =
Query if VM has a snapshot
|
snapshot
|
|
vmware-cmd createsnapshot name description quiesce memory
Sample:
[root@esxhost root]#
vmware-cmd
/vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx
createsnapshot "snap1" "before patching" quiesce memory
createsnapshot(snap1 before patching quiesce memory) = 1 [root@esxhost root]# vmware-cmd /vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx hassnapshot hassnapshot() = 1
Quiesce will quiesce file system writes
Memory will grab the memory state (will lose pings during this) |
createsnapshot
|
|
vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx revertsnapshot
Sample:
[root@vs03 root]#
vmware-cmd
/vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx
revertsnapshot
revertsnapshot() = 1
Revert to previous created snapshot (you loose the current VM
state!)
|
revertsnapshot
|
|
vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx removesnapshots
Sample:
[root@esxhost root]#
vmware-cmd
/vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx
removesnapshots
removesnapshots() = 1
Remove previous created snapshots (you keep the current VM
state!)
|
removesnapshots
|
|
vmware-cmd -s register vmfs/volume/vmfslabel/VMName/VMName.vmx
Sample:
[root@esxhost root]#
vmware-cmd -s register /vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx
register(/vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx) = 1
Register VM (add to
inventory)
|
register
|
|
vmware-cmd -s unregister vmfs/volume/vmfslabel/VMName/VMName.vmx
Sample:
[root@esxhost root]#
vmware-cmd -s unregister
/vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx
unregister(/vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx) = 1
Unregister VM (add
to inventory)
|
unregister
|
|
vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx answer
Sample:
[root@esxhost root]#
vmware-cmd
/vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a/printer/printer.vmx answer
No questions pending. In this case there is no pending input request. If there is any pending input request you will be promptet for the answser.
answer pending request for userinput
|
answer
|
|
HA Problems
|
|
DNS .. DNS and again
DNS Check your configuration!
List of hosts in the
cluster (local host is not listed)
/opt/LGTOaam512/config/vmware-sites
A cached copy of the
etc/hosts file is created and it might be necessary to delete this file:
/etc/FT_HOSTS
|
|
Unaligned VMFS partitions
on the SAN decreases performance
|
|
Unaligned
VMFS partitions on the SAN decreases performance. Creating VMFS partitions with Virtual Center 2.0 will align partition tables on the 64KB boundery and are not affected. The expected throughput in a aligned partition increases by 2% to 62% and the latency decreases from 79% to 33%. Partitions created with vmkfstools, created during the installation or migrated might be unaligned! For more information Read the VMware Performance Study |
|
VMotion CPU Compatibility
Requirements
|
|
Be
aware not all CPU's are compatible for VMotion. If you have hosts
on different hardware make sure they are compatible to use the Vmotoin
and saveyourslf a lot of problems!! See the document at VMare what Processors are compatible: read more The presentation from VMworld 2006 VMotion between apple and Oranges CPU masking doesn't happen when you cold migrate - CPU masks only take effVmotion ect when the machine is powered on and when you do a VMotion. Cold migrate is a general work around when CPU incompatiabilites occour... There is a legend in the VI Client for the CPU Identification Mask Legend VM -> Edit Settings -> Options -> Advanced -> Advanced -> Legend Download an application to gather all Information of the installed CPU's from Run-Virtual
|
|
Move Virtual Center to
another Server
|
|
I
tried to move the Virtual Center 2.01 to a new server with SQL Server 2005 After I detached and copied the Database to the new SQL2005 Server I installed the Virtual Center. the setup did not prompt me if I would like to overwritte any existing data. Instead it deleted the existing data and left me with an empty database. So my next step was to remove the empty DB and attache my old DB with all data again. I wasn't able to start the Virtual Center service anymore. Conclusion: Install the SQL Server 2000 with SP4 or the MSDE Pre-configure the system and instal all updates SQL Server 2000 SP4 or the MSDE on new hardware. Shutdown VirtualCenter server service in the current machine it is running on. Backup the current SQL Server database and restore onto the new SQL Server 2000 SP4 install or Detach and copy the DB files to the new Server. Transfer the existing Virtual Center user to the new SQL Server: see how to If the SQL Useraccount is not mapped to the Account in the Database you need to run: EXEC sp_change_users_login 'Update_One', 'VC_User', 'VC_User' Setup the ODBC connection, use the same settings as in the old installation Install the License Server and then Virtual Center Server in the new physical machine and point it to the database install on the same machine housing the restored or attqached database (ODBC). You should get prompted to overwrite or keep the existing data (if this dialog doesn't show there is somthing wrong). Once the install completes reboot the machine. Configure the License Server and add your active licenses Start the Virtual Center client. Configure to use the new License Server: Menue Administration-Virtual Management Server Configuration-License Server Your host might all be unavailable. Right click on them, disconnect and connact again. You are propted for the usernam, password and there is a dialog that this host is managed by another Server. Just continue with ok and the host should be available again. You should now be able to see the same settings and configuration details. Requirements for Running VirtualCenter with MS SQL 2005 KB6565318 |
|
Logical Volume Manager
(LVM)
|
|
We
tested our SAN Faileover (IBM FAST T DS4800 with remote mirror) . After a rescan of a newly added LUN with an existing VMFS partition, it is usually not recognized without a reboot of the host. Somtimes it is presented to the console and is also writable there. But to the rest of the Infrastructure, it doesn't exist or is readonly. To resolve this issue you have to follow the following steps: -Stop all VMs that are running on the test/mirror LUN -Stop all I/O to this LUN, including any management agents that may be running in the Service Console -Remove the mapping of the LUN as before -changed to role secondary role -log into VI client -select Datastores view in inventory view -select the datastore, right click, select remove to remove the old label as this is associated with the source volume -added the LUN mapping (with the same LUN ID) to the mirrored (now primary) LUN -changed lvm.disallowSnapshotvolumes to 0 -do a rescan esxcfg-rescan vmhba1 -do a rescan esxcfg-rescan vmhba2 -restart the mgmt-vmware service -log into VI client -select Hosts & Clusters view -in the summary tab, you should see the LUN in the list of datastores Conclusion: It is in the current ESX 3.01 release not possible to do an automatic faileover. Even having all the faileover scripts the problem is on the ESX side which still tries to reach the original LUN which will be removed when it fails. also the datastore needs to be removed before adding the secondary LUN. Special attention needs to by payed to the settings: lvm.disallowSnapshotvolumes Be aware if this is set to 0 all snaphot volumes are presented to the host. Even a secondary LUN will be recognized as snapshotvolume. somtimes you might even use such a snapshotvolule without knowing it. The best solution to make shure which volumes are recogniced as snaphots is to set the value to 1 and do a rescan. Additional information: VMFS Volume Can Be Erroneously Recognized as a Snapshot VMware KB article I found this on the forum: ESX3 ships with a Logical Volume Manager (LVM) that supports automatic volume resignaturing. If you snapshot or replicate a VMFS volume, the LVM can tell the difference between the primary and its copy, hence allowing you to access the snapshot/replica from the same physical host(s) that has access to the primary. We will change the identity of the copy, so that there are no namespace clashes. This is different from ESX2, where all you could do was mount the snapshot on a different ESX server. If you mounted it to the same server as the primary, ESX2 would get confused because there would be 2 volumes with the same identity. We call this process automatic re-signaturing, because it doesn't require user intervention. Your diskarray should abide by a checklist though, and we will publish all this in detail later. For now, you can see your replica on the second ESX server. See session material from VMworld: ESX Server 3.0 Tips and Tricks by Mostafa Khalil VMware Support Engineering. |
|||||||||||
|
|||||||||||
|
Settings for a
Domaincontroller
|
|
Caching could be a
problem when a Server craches. Some data might be lost and not weritten
down to the disk.
The virtual machine uses disk cache by default, However, you can disable this by using an option in the .vmx file.
I would recommend
that you follow the below steps during your VM configuration:
Power off the domain
controller virtual machine.
Open the virtual
machine configuration file of the VM and add the below parameter
disklib.dataCacheMaxSize=0
This would disable
the write caching on the virtual disk.
|
Extend or shrink the boot volume of Windows Server 2003 Virtual Machine
Extend the boot volume of Windows Server 2003 Virtual Machine
|
|
Power off the virtual machine that holds the boot
volume that you want to extend.
|
|
|
From the service console, increase the size of the .dsk
or .vmdk virtual disk file.
|
|
|
Extend the virtual disk with vmkfstools. The input to
the -X switch is the size that you want the disk file to be not the size
you want to extend the disk file by
#vmkfstools -X 12G testing.vmdk |
|
|
For this step you will need an additional Virtual
Machine running Windows Server 2003. Power off the second Virtual Machine,
and add the disk from the first Virtual Machine to it through the mui. Power
up the second Virtual Machine and verify that the imported disk has
unallocated space on it.
|
|
|
For the following diskpart operation it might be
necessary to boot in "save mode" (Press F8 when you start). I
experienced problems running diskpart.exe when I didn't run it in safe mode.
Don't open the Disk-Management GUI prior running the diskpart, it might lock
some operations.
|
|
|
From the run menu type "diskpart.exe" to
enter the command line utility to resize disk partitions in Windows Server
2003.
The command list volume will show you all the available volumes. Select your volume. select volume X corresponds to the volume that you want to extend. Finally extend the volume with the extend command. |
|
|
Shut down the second Virtual Machine and remove the
disk from the second Virtual Machine. Power on the first Virtual Machine and
check out your new space.
|
See how you can extend a systemdisk with GParted (Gnom Partition Editor for free) instructions
Shrink Virtual Disk
|
|
Resize first the Partition in the guest system (you can use Partition Magic or a similar
product). If the boot volume needs to be resized, attach the Virtual Disk to
another Virtual Machine to resize the guest partition.
|
|
|
The guest partition must be smaller as the planed size
of the Virtual Disk or the data will be corrupted.
|
|
|
|
|
|
The shrink in the vmware tools doesn't work on ESX
server. It is only usefull if you plan to export a disk to GSX server, if you
use shrink before the export, only the used portion will be exportet.
|
|
|
Another option is ghosting to a new smaller disk
|
|
Disks and Partitions on
Virtual Machines
|
|
Disks and Partitions on Virtual Machines
DriversLSI Logic Disc (your best choice and default)
BuslogicIf you use the Buslogic driver or like to upgrade an IDE based Virtual disk, download the driver floppyimage from the VMware download site to achieve enhanced SCSI device performance.Don't use Buslogic on Windows 2003 Server or you will loose significant performance! Buslogic Driver download SCSI Disk Drivers (for Windows XP, Windows 2000 and Windows Server 2003 Guest Operating Systems). Follow the instructions on the Web site. RAW DiskWith RAW Disks you have direct access to an local or the SAN SCSI Disk. With ESX 2.5 VMware introduced the new future of disk mapping files. You use an .vmdk file on a VMFS volume which points to the raw entire LUN. The mapping file stores the metadata for the LUN. This mapping files enables VMotion also for RAW Disks because the Disk information is available on the mapping file on VMFS.Use of mapping file:
Requierments |
|
Virtual Machine
files
|
|
What Files Make Up a Virtual Machine?
|
|||||||||||||||||||||||||||||||||||||||||||
ESX Engineer Configuration Commands Cheat Sheet
I periodically set up ESX servers for customers. Over time I
have developed a document that helps me when I am performing configurations
on-site. This is by no means an inclusive list of commands, this is more a
brain dump for me so I have access to this in case my laptop isn’t handy. If
anybody has any additions, I would love to hear them!!
- Edit
an ESX server to allow root SSH and SFTP access
- vi /etc/ssh/sshd_config
- Change PermitRootLogin no to yes
- Restart ssh service using the command: service sshd restart
- Edit
an ESX Server for NTP access (Internet in this case, could be a customer
NTP server)
- vi /etc/ntp.conf
- Change
OUR TIMESERVERS section, enter the server names – For the Internet use
the following:
- server 0.us.pool.ntp.org
- server 1.us.pool.ntp.org
- server 2.us.pool.ntp.org
- Pipe
the NTP Servers into step-tickers so NTP will update at NTP start using
the following the commands:
- Echo 0.us.pool.ntp.org >> /etc/ntp/step-tickers
- Echo 1.us.pool.ntp.org >> /etc/ntp/step-tickers
- Echo 2.us.pool.ntp.org >> /etc/ntp/step-tickers
- Set NTP to start: chkconfig ntpd on
- Set ESX Firewall to allow NTP Traffic: esxcfg-firewall –e ntpClient
- Run an manual update: ntpdate 0.us.pool.ntp.org
- Patch the ESX Server with the latest patches (Update Manager is MUCH easier!)
- NOTE: The patches must be installed in “groups” based on their date starting with the oldest to the newest (i.e. apply the Septmber 9th patches, then the September 21st patches, etc)
- SFTP the Patches into a directory on the server
- Change into the folder and run the following as root
- For ESX 3.0.X: tar –xvzf (name of patch).tgz
- For ESX 3.5.X: unzip *.zip
- change into the directory it creates
- esxupdate –(2 dashes)noreboot update
- change back to the root patch folder, rinse, repeat
- When complete enter the following command to check the patch status: esxupdate query
- Commands
to change the server ip, name, dns, gatewat, etc.
- To check the config of the server from the command line: esxcfg-info
- To check the vSwitch settings from the command line: esxcfg-nics -l
- To
change the hostname of the server or the default gateway
- vi /etc/sysconfig/network
- vi /etc/hosts with the new name
- To change the DNS entries of the ESX server: vi /etc/resolv.conf
- To
change the IP Address and the Subnet Mask of the ESX Server:
- esxcfg-vswif –i (IP Address) –n (Subnet Mask) (vswitch-name -> vswif0 for the Service Console by default)
- To
change the VLAN tag of the service console port:
- esxcfg-vswitch vSwitch0 –p “Service Console” –v (VLAN NUMBER)
- NOTE: If you modify the above settings, make sure you also modify the network section of the /root/anaconda-ks.cfg file as well (ESX 3.5 only)
- To see what services the ESX firewall will allow: esxcfg-firewall –s
- To change the root password from the command line: passwd
- If
you have changed the ip address or name and HA is acting up:
- /opt/vmware/aam/bin/ft_gethostbyname
- rename and/or delete FT_HOSTS file under /etc/opt/vmware/aam/
New User’s Guide to Configuring VMware ESX Networking via CLI
A lot of the content on this
site is oriented toward VMware ESX/ESXi users who have a pretty fair amount of
experience. As I was working with some customers today, though, I realized that
there really isn’t much content on this site for new users. That’s about to
change. As the first in a series of posts, here’s some new user information on
creating vSwitches and port groups in VMware ESX using the command-line
interface (CLI).
For new users who are seeking
a thorough explanation of how VMware ESX networking functions, I’ll recommend a
series of articles by Ken Cline titled The
Great vSwitch Debate. Ken goes into a great level of detail. Go read that,
then you can come back here.
Before I get started it’s
important to understand that, for the most part, the information in this
article applies only
to VMware ESX. VMware ESXi doesn’t have a Linux-based Service Console like
VMware ESX, and therefore doesn’t have a readily-accessible CLI from which to
run these sorts of commands. There is a remote CLI available, which I’ll
discuss in a future post, but for now I’ll focus only on VMware ESX.
The majority of all the
networking configuration you will need to perform on VMware ESX boils down to
just a couple commands:
·
esxcfg-vswitch: You will use this command to manipulate virtual switches
(vSwitches) and port groups.
·
esxcfg-nics: You will use this command to view (and potentially manipulate)
the physical network interface cards (NICs) in the VMware ESX host.
Configuring VMware ESX
networking boils down to a couple basic tasks:
1. Creating, configuring, and deleting vSwitches
2. Creating, configuring, and deleting port groups
I’ll start with creating,
configuring, and deleting vSwitches.
Creating, Configuring, and Deleting vSwitches
You’ll primarily use the
esxcfg-vswitch command for the majority of these tasks. Unless I specifically
indicate otherwise, all the commands, parameters, and arguments are
case-sensitive.
To create a vSwitch, use this
command:
esxcfg-vswitch -a <vSwitch Name>
To link a physical NIC to a
vSwitch—which is necessary in order for the vSwitch to pass traffic onto the
physical network or to receive traffic from the physical network—use this
command:
esxcfg-vswitch -L <Physical NIC> <vSwitch Name>
In the event you don’t have
information on the physical NICs, you can use this command to list the physical
NICs:
esxcfg-nics -l (lowercase L)
Conversely, if you need to
unlink (remove) a physical NIC from a vSwitch, use this command:
esxcfg-vswitch -U <Physical NIC> <vSwitch Name>
To change the Maximum
Transmission Unit (MTU) size on a vSwitch, use this command:
esxcfg-vswitch -m <MTU size> <vSwitch Name>
To delete a vSwitch, use this
command:
esxcfg-vswitch -d <vSwitch Name>Creating, Configuring, and Deleting Port Groups
As with virtual switches, the
esxcfg-vswitch is the command you will use to work with port groups. Once
again, unless I specifically indicate otherwise, all the commands, parameters,
and arguments are case-sensitive.
To create a port group, use
this command:
esxcfg-vswitch -A <Port Group Name> <vSwitch Name>
To set the VLAN ID for a port
group, use this command:
esxcfg-vswitch -v <VLAN ID> -p <Port Group Name> <vSwitch
Name>
To delete a port group, use
this command:
esxcfg-vswitch -D <Port Group Name> <vSwitch Name>
To view the current list of
vSwitches, port groups, and uplinks, use this command:
esxcfg-vswitch -l (lowercase L)
There are more
networking-related tasks that you can perform from the CLI, but for a new user
these commands should handle the lion’s share of all the networking
configuration. Good luck!
1.
Note 1: This configuration example only applies to standard ESX
v4 vSwitches. Distributed vSwitch MTUs are directly configurable via the
vCenter GUI.
Note 2: In order for
Jumbo Frames to function, MTU size (9000 bytes) must be enabled on all related
hardware ie. iSCSI SAN, Network Switches & ESX server.
Note 3: In this
example, two physical NICs are connected to each vSwitch for
failover/redundancy.
The following assumes
the iSCSI switch is vSwitch1 (192.168.200.0/24) and vMotion switch is vSwitch2
(192.168.201.0/24). Names & IP addresses will need to be changed to suit
your deployments.
This needs to be done
through the root login at the ESX console.
iSCSI vSwitch:
esxcfg-vswitch -a
vSwitch1
esxcfg-vswitch -L vmnic4 vSwitch1
esxcfg-vswitch -L vmnic5 vSwitch1
esxcfg-vswitch –add-pg=”iSCSI Service Console” vSwitch1
esxcfg-vswif -a -i 192.168.200.153 -n 255.255.255.0 -p “iSCSI Service Console” vswif1
esxcfg-vswitch -m 9000 vSwitch1
esxcfg-vswitch -A “iSCSI Network” vSwitch1
esxcfg-vmknic -a -i 192.168.200.53 -n 255.255.255.0 -m 9000 “iSCSI Network”
esxcfg-vswitch -L vmnic4 vSwitch1
esxcfg-vswitch -L vmnic5 vSwitch1
esxcfg-vswitch –add-pg=”iSCSI Service Console” vSwitch1
esxcfg-vswif -a -i 192.168.200.153 -n 255.255.255.0 -p “iSCSI Service Console” vswif1
esxcfg-vswitch -m 9000 vSwitch1
esxcfg-vswitch -A “iSCSI Network” vSwitch1
esxcfg-vmknic -a -i 192.168.200.53 -n 255.255.255.0 -m 9000 “iSCSI Network”
vMotion vSwitch:
esxcfg-vswitch -a vSwitch2
esxcfg-vswitch -L vmnic2 vSwitch2
esxcfg-vswitch -L vmnic3 vSwitch2
esxcfg-vswitch -m 9000 vSwitch2
esxcfg-vswitch -A “vMotion Network” vSwitch2
esxcfg-vmknic -a -i 192.168.201.53 -n 255.255.255.0 -m 9000 “vMotion Network”
Tick vMotion tickbox in vCenter GUI (there’s no simple way to achieve this through the CLI, so just do it in the GUI).
esxcfg-vswitch -L vmnic2 vSwitch2
esxcfg-vswitch -L vmnic3 vSwitch2
esxcfg-vswitch -m 9000 vSwitch2
esxcfg-vswitch -A “vMotion Network” vSwitch2
esxcfg-vmknic -a -i 192.168.201.53 -n 255.255.255.0 -m 9000 “vMotion Network”
Tick vMotion tickbox in vCenter GUI (there’s no simple way to achieve this through the CLI, so just do it in the GUI).
vmware-vim-cmd
hostsvc/vmotion/vnic_set vmkX
Where X is the number
of the VMkernel NIC to be enabled for VMotion. The esxcfg-vmknic command can be
used to enumerate the VMkernel NICs so that you know which one to use.
Usefull
commands for ESX4.1 server (VMware cheatsheet)
December 17, 2011
In
this post I will put some interesting commands that I was using in VMware ESX
host command prompt along with another useful information. Sometimes it is
easier to connect to ESX host directly and run these commands to put things
messed up earlier in order.
Update ESX server
1)
allow root ssh access
vi /etc/ssh/sshd_config
PermitRootLogin yes
service sshd restart
2)
scp update files from Windows machine
install
pscp (putty package)
pscp C:\update-from-esxi4.1-4.1_update01.zip
root@192.168.0.55
3)
put ESXi host into the maintenance mode (VI client)
3)
run update from ESXi console
esxupdate –bundle
./update-from-esxi4.1-4.1_update01.zip update
4)
check installed bulletins
esxupdate query
Maximum VMDK file size
1
MB block size –> 256 GB
2
MB block size –> 512 GB
4
MB block size–> 1024 GB
8
MB–> 2048 GB.
You
can’t change the block size once the data store is created.
Rename or clone VMDK
to
clone:
vmkfstools -i
/vmfs/volumes/datastore1/WIN2003R264_VM/WIN2003R264_VM_1.vmdk
/vmfs/volumes/datastore1/Vcenter/Vcenter.vmdk
to
rename:
vmkfstools -E ….
then
edit vmx to change the reference to correct VMDK
vi
/vmfs/volumes/datastore1/Vcenter/Vcenter.vmx
Recreate VMDK from the flat file
1.
Identify the exact size of the flat file:
ls -l vm-vCenter-flat.vmdk
2.
Run the vmkfstools and create new virtual disk with the same size (let’s say
the size was 85921274880 )
vmkfstools -c 85921274880 -d thin -a lsilogic
new.vmdk
3.
Remove newly created flat file
rm new-flat.vmdk
4.
Rename newly created vmdk to the name that is needed to match the orphaned flat
file
mv new.vmdk vm-vCenter.vmdk
5.
Edit the descriptor file
RW NNNNNNNN VNFS ” vm-vCenter.vmdk
where
NNNNNNNN are some digits
Convert thick VMDK to thin VMDK
1.
Clone original thick disk to thin (CMOS.vmdk—->nCMOS.vmdk)
vmkfstools -i /vmfs/volumes/datastore1/CMOS/CMOS.vmdk
-d thin /vmfs/volumes/datastore1/CMOS/nCMOS.vmdk
2.
Rename original flat file to something (CMOS-flat.vmdk—>origCMOS-flat.vmdk)
mv
/vmfs/volumes/datastore1/CMOS/CMOS-flat.vmdk
/vmfs/volumes/datastore1/CMOS/origCMOS-flat.vmdk
3.
Rename new flat file to original (nCMOS-flat.vmdk—–>CMOS-flat.vmdk)
mv
/vmfs/volumes/datastore1/CMOS/nCMOS-flat.vmdk
/vmfs/volumes/datastore1/CMOS/CMOS-flat.vmdk
4.
Delete new vmdk (nCMOS.vmdk)
rm
/vmfs/volumes/datastore1/CMOS/nCMOS.vmdk
5.
Delete renamed original flat file (origCMOS-flat.vmdk)
rm
/vmfs/volumes/datastore1/CMOS/origCMOS-flat.vmdk
6.
Remove VM from inventory and add it again. Virtual hard drive is thin
now.
Comments
Post a Comment