Vous êtes sur la page 1sur 11

25/4/2015

listedescommandesutilesenESXiVMnerdsblog

Accueil
FreeTools
Performance
About
vHistory

Accueil>ESXi>listedescommandesutilesenESXi
jan/1213
2
Saisirletextearechercherici...

listedescommandesutilesenESXi
ParJBrisonCommenterCommandLineDansESXi
PourfairesuitelarticlesurESXCLI,voiciunarticleregroupantunensembledecommandes(pas
seulementesxcli)quipeuventtregrandementutilesencasdurgence(typiquementquandonaplus
laccsparlinterfacegraphique)oualorspourscripteruneconfiguration(exemple:kickstart).
Note:LensembledecescommandessontpourESXi5.0,ellesvarientpourdautresversions.
Oprationssurlesmachinesvirtuelles
AvoirlalistedesVMsenregistrersurlhte(onobtientainsileVMid):
vimcmdvmsvc/getallvms
AvoirlalistedesVMsallumessurlhte(onobtientainsileWorldID):
esxclivmprocesslist
ForcerlarrtpropreduneVM:
esxclivmprocesskilltsoftw<WorldID>
ForcerlarrtbrutalduneVM(endernierrecours):
esxclivmprocesskilltforcew<WorldID>
AvoirltatduneVM:
vimcmdvmsvc/power.getstate<VMid>
EteindreuneVM:
http://www.vmnerds.fr/2012/01/13/listedescommandesutilesenesxi/

1/11

25/4/2015

listedescommandesutilesenESXiVMnerdsblog

vimcmdvmsvc/power.off<VMid>
AllumeruneVM:
vimcmdvmsvc/power.on<VMid>
RedmarreruneVM:
vimcmdvmsvc/power.reboot<VMid>
RechargerlaconfigurationduneVM(aprsmodificationdufichier.vmx):
vimcmdvmsvc/reload<VMid>
SupprimertouslesSnapshotsduneVM:
vimcmdvmsvc/snapshot.removeall<VMid>
AvoiruneestimationdelespacencessairepourconsoliderunSnapshotduneVM:
vimcmdvmsvc/get.spaceNeededForConsolidation<VMid>
EnregistreruneVMsurlhte:
vimcmdsolo/registervm/vmfs/volumes/datastore/VM2/VM2.vmx
DsenregistreruneVMdunhte:
vimcmdhostsvc/unregister<VMid>
AvoirlersumduneVM:
vimcmdvmsvc/get.summary<VMid>

Oprationssurlesdisquesvirtuels
Crerundisquevirtuel:
vmkfstoolsc10G/vmfs/volumes/datastore1/VM3/VM3_1.vmdk
AjouterundisquevirtuelexistantuneVM(enSCSI0:1):
vimcmdvmsvc/device.addexisting<VMid>/vmfs/volumes/datastore1/VM3/VM3_1.vmdk0
1
AjouterundisqueuneVM(lquivalentdes2prcdentescommandes):
vimcmdvmsvc/device.diskadd<VMid>10G01datastore1
ConvertirundisquevirtueldeThinenThick:
http://www.vmnerds.fr/2012/01/13/listedescommandesutilesenesxi/

2/11

25/4/2015

listedescommandesutilesenESXiVMnerdsblog

vmkfstoolsj/vmfs/volumes/datastore1/VM1/VM1.vmdk
ConvertirundisquevirtueldeThickenThin:
vmkfstoolsK/vmfs/volumes/datastore1/VM1/VM1.vmdk
Agrandirlatailledundisquevirtuel:
vmkfstoolsX15G/vmfs/volumes/datastore1/VM1/VM1.vmdk

OprationssurlhteESXi
Rinitialiserlaconfigurationenmodeusine(commelafindelinstallation):
/sbin/firmwareConfig.shreset
Attribuerunelicencelhte:
vimcmdvimsvc/licensesetXXXXXXXXXXXXXXXXXXXXXXXXX
MettrelhteenModeMaintenance:
vimcmdhostsvc/maintenance_mode_enter
SortirlhteduModeMaintenance:
vimcmdhostsvc/maintenance_mode_exit
Synchroniseretsauvegarderlaconfigdelhte(fichiergnrdans/scratch/downloads):
vimcmdhostsvc/firmware/sync_config
vimcmdhostsvc/firmware/backup_config
Restaurerlaconfigdunhte(partirdufichier/tmp/configBundle.tgz):
vimcmdhostsvc/firmware/restore_config/tmp/configBundle.tgz
Avoirlalistedespatchsinstallssurunhte:
esxclisoftwareviblist
Installerunpatchmanuellement(treenmodemaintenance):
esxclisoftwarevibupdatedepot=/vmfs/volumes/datastore1/ESXi500201109001.zip
Autoriserunservicesurlefirewalldelhte:
esxclinetworkfirewallrulesetsetrsnmpetrue
Dsactiverlefirewalldelhte:
http://www.vmnerds.fr/2012/01/13/listedescommandesutilesenesxi/

3/11

25/4/2015

listedescommandesutilesenESXiVMnerdsblog

esxclinetworkfirewallsetefalse
AfficherlalistedescodeserreurVMkernel:
vmkerrcodel
Afficherlaversiondelhte:
esxclisystemversionget
Avoirlaconfigurationdesparamtresavancs:
esxclisystemsettingsadvancedlist
LancerlinterfaceDCUI(peuttreutileenSSH),faireunCtrl+Cpourquitter:
dcui

OprationssurlesServices
Vrifierltatduservicehostd:
/etc/init.d/hostdstatus
Redmarrerleservicehostd:
/etc/init.d/hostdrestart
RedmarrerlagentvCenter(vpxa):
/etc/init.d/vpxarestart
Redmarrertouslesservices:
services.shrestart
ActiverleSSHtemporairement(jusquauprochainredmarrage):
/etc/init.d/SSHstart
ActiveretdmarrerleSSHdefaonpermanente:
vimcmdhostsvc/enable_ssh
vimcmdhostsvc/start_ssh
http://www.vmnerds.fr/2012/01/13/listedescommandesutilesenesxi/

4/11

25/4/2015

listedescommandesutilesenESXiVMnerdsblog

Avoirlaconfigurationdudmarrageautomatiquedetouslesservices
chkconfigl

Oprationssurlaconfigurationrseau
Avoirlalistedesinterfacesrseauphysique:
esxclinetworkniclist
CrerunvSwitch:
esxclinetworkvswitchstandardaddvvSwitch1
AjouteruneinterfacephysiqueunvSwitch:
esxclinetworkvswitchstandarduplinkadduvmnic1vvSwitch1
AjouterunPortGroupunvSwitch:
esxclinetworkvswitchstandardportgroupaddpLANvvSwitch1
AjouteruneinterfacephysiqueunPortGroup(dfinirlesinterfacesactives):
esxclinetworkvswitchstandardportgrouppolicyfailoversetavmnic0,vmnic1pLAN
DfinirleVLANdunPortGroup:
esxclinetworkvswitchstandardportgroupsetv40pLAN
AssocieruneinterfaceVMkernelunPortGroup:
esxclinetworkipinterfaceaddivmk1pNFS
DfinirlIPduneinterfaceVMkernel:
esxclinetworkipinterfaceipv4setivmk1I10.40.1.1N255.255.255.0tstatic
ActiverleCDPsurunvSwitch:
esxclinetworkvswitchstandardsetcdpstatusbothvvSwitch1
ModifierleMTUduneinterfaceVMkernel:
esxclinetworkipinterfacesetm9000ivmk1
ModifierleMTUdunvSwitch:
esxclinetworkvswitchsetm9000vvSwitch1

http://www.vmnerds.fr/2012/01/13/listedescommandesutilesenesxi/

5/11

25/4/2015

listedescommandesutilesenESXiVMnerdsblog

OprationssurleStockage
AfficherlalistedesLUNs:
esxclistoragenmpdevicelist
Afficherlalistedeschemins:
esxclistoragenmppathlist
AfficherlacorrespondanceentrelesLUNsetlesVMFS:
esxclistoragefilesystemlist
FaireunRescanduSANsurtouteslesHBAs:
esxclistoragecoreadapterrescanall
Ouaussi,faireunRescanduSAN:
vimcmdhostsvc/storage/vmfs_rescan
RafraichirlesLUNs:
vimcmdhostsvc/storage/vmfs_refresh
Afficherlalistedesvolumesnonmonts(cardtectscommeSnapshot):
esxclistoragevmfssnapshotlist
ForcerlemontagedunVMFS:
esxclistoragevmfssnapshotmountVMFS1
ResignerunVMFS:
esxclistoragevmfssnapshotresignatureVMFS2
AfficherlacompatibilitVAAIdesvolumes:
esxclistoragecoredevicevaaistatusget
ActiverinitiateuriSCSIsoftware:
esxcliiscsisoftwaresetetrue
FaireuneredcouverteiSCSI
esxcliiscsiadapterdiscoveryrediscoverAvmhba33
AfficherlalistedesvolumesNFSmonts:
esxclistoragenfslist
http://www.vmnerds.fr/2012/01/13/listedescommandesutilesenesxi/

6/11

25/4/2015

listedescommandesutilesenESXiVMnerdsblog

AjouterunvolumeNFS:
esxclistoragenfsaddH10.40.1.100s/vol/sharevVol_NFS
AvoirlalistedesVMsallumsavecleurWorldGroupIDetleurdisques:
vscsiStatsl
DmarrerlacollectedesstatspouruneVM(sarrteautomatiquementauboutde30min):
vscsiStatsw<WorldGroupID>s
Afficherunhistogrammedelatencesdesperformancescollectes:
vscsiStatsw<WorldGroupID>platency
ArrterlacollectedesstatsduneVM:
vscsiStatsx<WorldGroupID>s

LesfichiersdelogsenESXi
Ilpeutaussitreutiledeconnatrelemplacementdesdiffrentsfichiersdelogsetleurrle.Voicidoncun
tableau,rcapitulantlesfichiersdelogsenESXi5.0:
Fichierlogs

Contenu
/var/log/auth.log
logslessuccsetleschecsdauthentificationaushellESXi
logsduserviceclientDHCPclientservice,ycomprisladcouverte,les
/var/log/dhclient.log
demandesdebaildadresseetlesrenouvellements
/var/log/esxupdate.log logsdinstallationdespatchsetdesmisejourESXi
logsduserviceHostmanagement,incluantlestachesetlesvnementssur
/var/log/hostd.log
lhteetsesVMs,lescommunicationsavecleclientvSphereendirectetavec
lagentvCenter(vpxa),etlesconnectionsSDK
logsdelutilisationenshellESXi,incluantlesactivations/dsactivationsettoutes
/var/log/shell.log
lescommandesentres
logsdudmarrageVMkerneletduchargementdesmodules
logsdelinitialisationduservicedeManagement,lasurveillanceparles
/var/log/syslog.log
watchdogs,lestachesplanifiesetlutilisationdelaDCUI
lesvnementdarbitragedespriphriquesUSB,commeladcouverteetla
/var/log/usb.log
transmissionverslesVMs
/var/log/vob.log
observateurdvnementsVMkernel,semblablevob.component.event
logsduCoreVMkernel,incluantladcouvertedepriphrique,les
/var/log/vmkernel.log vnementslisauxpriphriquesetauxdriversdestockageetrseaux,etle
dmarragedesVMs
/var/log/vmkwarning.log lersumdesalertesetdesmessagesderreursextraitdeslogsVMkernel
/var/log/sysboot.log

lersumdelasquencedarrt/dmarragedelhte,lheartbeathorraireavec
/var/log/vmksummary.log luptime,lenombreVMsdmarres,etlaconsommationdesressourcesparles 7/11
http://www.vmnerds.fr/2012/01/13/listedescommandesutilesenesxi/

25/4/2015

listedescommandesutilesenESXiVMnerdsblog

/var/log/vmksummary.log luptime,lenombreVMsdmarres,etlaconsommationdesressourcesparles

services
logsdelagentvCenter(vpxa),incluantlescommunicationsentreleserveur
vCenterServeretlagentHostManagement(hostd)
logsdumoduleHighAvailability,produitparleservicefdm

/var/log/vpxa.log
/var/log/fdm.log

SilaScratchPartitionestconfigure,ellecontiendralesfichiersdelog.Ilsseronttoutdemme
disponiblesdans/var/logentantqueliensymbolique.

Quelquesdocumentationssurlutilisationdescommandes:
vSphereCommandLineInterfaceReference
ESXi4.1vimcmdexamples
UsingvscsiStatsforStoragePerformanceAnalysis
KB2004201:LocationofESXi5.0logfiles
Direc
toryofLinuxCommands
S hareit:
Tw eet

Email

Partager

Partager

Share

Viado

Imprimer

Articlescomplmentaires:

1.
2.
3.
4.
5.

ProblmeRseauESXi4.1+Intel82571EB
CentraliserlesfichiersdelogssousESXi
ManagementenlignedecommandeavecESXCLI
ModifierleQueueDepthenESXi4
ESX/ESXi3.5patchobligatoireappliqueravantle1erjuin

Commentaires(2)Trackbacks(3)CommenterTrackback
1.
jbrison
25/01/201215:33|#1
Rpondre|Citer
PourmonterlelecteurdeCD(dans/vmfs/volumes/):
vmkload_modiso9660
vsisheset/vmkModules/iso9660/mountmpx.vmhba32:C0:T0:L0
Etpourledmonter:
vsisheset/vmkModules/iso9660/umountmpx.vmhba32:C0:T0:L0
http://www.vmnerds.fr/2012/01/13/listedescommandesutilesenesxi/

8/11

25/4/2015

listedescommandesutilesenESXiVMnerdsblog

vmkload_moduiso9660
2.
jbrison
01/08/201219:14|#2
Rpondre|Citer
AussiunbonarticlepourdevenirunNinjadushellESXi:
http://wahlnetwork.com/2012/08/01/becominganesxishellninja/
1. 16/01/201201:44|#1
VMnerdsblogManagementenlignedecommandeavecESXCLI
2. 06/07/201316:37|#2
Mmovmwarecommandesesxi|Geekstuff
3. 22/05/201415:53|#3
ESX:ESXcommandlineinterface(cli)|HallofTips
Nom(requis)
EMail(neserapaspubli)(requis)
Siteinternet

S'abonnerauxcommentaires
Envoyeruncommentaire
Nepass'abonner

Notifiezmoidescommentairesvenirviamail.Vous

pouvezaussivousabonnersanscommenter.
sortiedevCenterOperationsManagementSuiteManagementenlignedecommandeavecESXCLI
FluxRSSTwitter
TRADUIRE

Articleslesplusconsults:
listedescommandesutilesenESXi
FreeTools
lesmodesdelicencevSphere5
Gestiondesblocsdisques(VMFSetguestFS)
ManagementenlignedecommandeavecESXCLI

Tags:
http://www.vmnerds.fr/2012/01/13/listedescommandesutilesenesxi/

9/11

25/4/2015

listedescommandesutilesenESXiVMnerdsblog

CTX

20082010 AliveVMbackup betaconnection

docESX3 exam exchangefreeHAHyperVKB

DFSdiskpart

licenceLinkedModemigrationmonitoringP CoIP personaPowerCLIpowershellP VSRefCard

releaseSP1

ToolsTroubleshootingtuningtutorielUpgradevCentervdivExpertVirtualFabric
VMworldvReplicatorvSphere4.1vSphere5What'snewwindows2008R2
ThinApp

Catgories:
Choisirunecatgorie

Archives:
2015(3)
2014(10)
2013(27)
2012(39)
2011(122)
2010(117)

ParAuteurs:
JBrison
AEvenot
YLeDreo
JChaussidon
VMnerds

AutresPages:
About
FreeTools
Performance
vHistory

Tweetsrcents:

http://www.vmnerds.fr/2012/01/13/listedescommandesutilesenesxi/

10/11

25/4/2015

listedescommandesutilesenESXiVMnerdsblog

Tweets
Jrmie BRISON
@J_Brison

Follow
21 Apr

Radicati reports AirWatch has largest


market share among EMM vendors in
fourthannual Market Quadrant
airwat.ch/v4cytdpwc7

Joe Baguley
@JoeBaguley

20 Apr

Read all about Photon and Lightwave here


"Making the Developer a FirstClass User of
the Datacenter" vmw.re/1HnEZoO
Retweeted by Jrmie BRISON
Expand
Jrmie BRISON
@J_Brison

17 Apr

MicroSegmentation using VMware NSX

Tweet to @J_Brison

Remonter)WordPress
Copyright20102015VMnerdsblog
ThemeparNeoEase.ValideXHTML1.1etCSS3.HbergchezOVH.

http://www.vmnerds.fr/2012/01/13/listedescommandesutilesenesxi/

11/11