SlideShare a Scribd company logo
ESX Server from the Command Line The command-line environment Working with disks Working with virtual machines
Tips for command-line use Install an ssh (Secure Shell) client on your desktop Windows: PuTTY (freeware), SecureCRT (commercial) Know the features of the  bash  shell Use arrow keys to navigate command history Use  TAB  to complete file names and commands Useful keystrokes: ctrl- A : beginning of line ctrl- E : end of line ctrl- W : erase previous word ctrl- U : blank this line ctrl- Z : suspend this job bg  command puts suspended job in background Caution! ctrl- S  freezes the screen; use ctrl- Q  to unfreeze
Useful Service Console add-on packages nano : a simple text editor An alternative to  vi Always invoke as  nano –w   filename  to turn off word-wrap lynx : a text-only Web browser Especially useful for downloading files from Web sites to Service Console ncftp : an enhanced text-only FTP client Contains  ncftpget , useful for unattended FTP downloads lsof : list open files Shows what processes are using what files and ports
Working with Service Console packages rpm –qa : list installed packages rpm –qi   packagename  : get more information about a package rpm –ql  packagename  : list files composing a package rpm –Uvh   filename(s)  : install a package You may need to satisfy a package’s dependencies; list multiple package filenames on command line rpm –e   packagename  : uninstalls a package Warning: do not uninstall VMware packages! Or use  –p  packagefilename  in place of  packagename
Partitioning disks with fdisk fdisk requires a device file pointing at desired disk fdisk /dev/sdb Enter  p  to print the present partition table Enter  n  to create a new partition  Specify partition number if primary Specify starting cylinder Specify size:  +1024M  gives a 1 GB partition Enter  t  to change the partition type:  FB  for VMFS Enter  w  to save partition table to disk Warning: Changing partition table of a disk with mounted Linux file systems may require reboot
vmkfstools  Syntax The option flag governs the action of the command Either a single letter with one hyphen or a word with two The last argument is always a path using the VMkernel’s device space Either a VMFS name (physical or friendly) vmhba0:1:0:5  /vmfs/vmhba0:1:0:5 myvmfs  /vmfs/myvmfs Or a VMFS name followed by a virtual disk file name vmhba0:1:0:5:a.dsk  /vmfs/vmhba0:1:0:5/a.dsk myvmfs:a.dsk  /vmfs/myvmfs/a.dsk vmkfstools -? [  otherarg   otherarg  … ]  VMkernel-path
Creating a new VMFS volume Use  vmkfstools –N  to map from VMkernel disk to a Linux device file  /dev/vsd n #   vmkfstools –N vmhba0:8:0:0 /dev/vsd0 fdisk   /dev/vsd0 Make a partition number 1 with type  FB Make new VMFS volumes using MUI or command line Whole disk
Creating a new VMFS volume (cont’d) Use  vmkfstools –C  to build a new VMFS vmkfstools –C vmfs2 vmhba0:8:0:1 Use  vmkfstools –S  to set the volume label vmkfstools –S VOL3 vmhba0:8:0:1 Use  vmkfstools –l  to list contents vmkfstools –l VOL3 or ls –l /vmfs/VOL3
Basic VMFS virtual-disk operations To create a new virtual disk: vmkfstools –c 4096m VOL3:webserver.dsk To set access rights: chown ted:finance /vmfs/VOL3/webserver.dsk chmod u=rw,go= /vmfs/VOL3/webserver.dsk To rename a virtual disk mv /vmfs/VOL3/ws.dsk /vmfs/VOL3/webserver.dsk To remove a virtual disk rm /vmfs/VOL3/ws.dsk
Copying a virtual disk It’s safe to use the Service Console’s  cp  command on > 2 GB virtual disks Not all Service Console utilities have been customized Other environments may contain unsafe tools too Safest to handle virtual disks in their exported (“COW”) format To export: vmkfstools –e /vmimages/ws.vmdk vmfs3:ws.dsk
Copying a virtual disk from one ESX Server to another Use scp to copy securely scp /vmfs/VOL3/ws.dsk     user @esx2:/vmfs/myvmfs/ws.dsk Always check for integrity #  sum /vmfs/myvmfs/ws.dsk 39678 489473 /vmfs/myvmfs/ws.dsk #  md5sum /vmfs/myvmfs/router-2.1.dsk 77dfc2ba10c75b6ad0a1812805887e28  router-2.1.dsk 16-bit  checksum size in  1 KB blocks
Extending a virtual disk Make a backup first! Extend the virtual disk vmkfstools –X 4096M VOL3:windata.dsk Now the file system inside the virtual disk does not fill the medium Use Partition Magic or the equivalent inside the VM to extend the file system
Inspecting virtual disks from Service Console To identify a virtual disk: #  head mydisk.dsk | file – To import: vmkfstools –i /vmimages/otherdisk.dsk VOL3:other.dsk GSX Server 2.x virtual disks can also be imported {nothing} Workstation 3.x GSX Server 2.x ASCII English text Workstation 4 x86 boot sector ESX Server
Opening virtual disks from Service Console To display the partition table inside a virtual disk: #  vmware-mount.pl –p /vmfs/VOL3/w2k.dsk   Nr Start  Size  Type Id  System -- -----  ------- ---- --- --------------- 1  63  4176837 BIOS  7  HPFS/NTFS #  vmware-mount.pl –p /vmfs/VOL3/linux.dsk   Nr Start  Size  Type Id  System -- -----  ------- ---- --- --------------- 1  32  81888 BIOS 83 Linux 2  81920  262144 BIOS 82 Linux swap 3 344064  972800 BIOS 83 Linux Virtual disk must be in ESX format, reside in a VMFS, not powered on
Opening virtual disks from Service Console (cont’d) You may mount file systems from within a virtual disk onto the Service Console Virtual disk must not be powered on NTFS file systems are read-only! vfat and ext3 file systems may be mounted read-write Press ctrl- C  to kill  vmware-mount.pl  when done #  mkdir /myntfs #  vmware-mount.pl /vmfs/ted/w2k.dsk 1     -t ntfs -o ro /myntfs In another window: #  ls /myntfs AUTOEXEC.BAT  CONFIG.SYS  IO.SYS boot.ini  Documents and Settings MSDOS.SYS
VM Configuration File Syntax Comments begin with a  #  character Blank lines are allowed Each other line is of the form attribute  =  value   or class.attribute  =  value Class  can be: A family of related items A device controller A device on a device controller
A sample configuration file config.version = "6" virtualHW.version = "3" memSize = "192" numvcpus = "2" displayName = "Controller for domain TEXAS.ORG" guestOS = "win2000Serv" ide1:0.present = "TRUE" ide1:0.startConnected = "TRUE" ide1:0.deviceType = "atapi-cdrom" ide1:0.fileName = "/dev/cdrom" floppy0.present = "TRUE" floppy0.startConnected = "FALSE" floppy0.fileName = "/dev/fd0" scsi0.present = "TRUE" scsi0.virtualDev = "vmxbuslogic" scsi0.sharedBus = "none" scsi0:0.present = "TRUE" scsi0:0.fileName = “VOL3:winnt.dsk" scsi0:0.mode = "persistent"
A sample configuration file (cont’d) ethernet0.present = "TRUE" ethernet0.virtualDev = "vlance" ethernet0.connectionType = "monitor_dev" ethernet0.devName = "vmnic0" suspend.directory = "/vmfs/VOL3" remotedisplay.depth = "8" checkpoint.cptconfigname = "rn2-52ff1bdc" uuid.location =       "56 4d 7c 66 1f 23 b5 c3-2f 50 a9 29 7f 53 72 b5"
Configuring for Terminal Services Windows Terminal Services and Citrix Metaframe systems run with many processes Windows 2000 systems benefit from a performance tweak Add to configuration file workload = "TerminalServices" If Citrix Metaframe XP, install Citrix hotfix XE102W014 in guest OS
Time sync for graphicsless VMs Normally need GUI VMware Tools agent to enable time synchronization between guest OS and Service Console But Linux servers often run without graphics To enable time sync without GUI: tools.syncTime = "TRUE"
Adjusting Remote Console keyboard repeat By default, virtual keyboard device in VM starts autorepeat if a physical key is not released within less than a second Network latency or congestion may trigger autorepeat Add to config file: keyboard.typematicMinDelay = 2000000 Value in microseconds (2 million   sec = 2 sec) Choose a value that results in satisfactory performance
Specifying autostart and autostop behavior Config files may contain  autostart = "poweron" autostart.delay = "2" Seconds to pause autostop = "poweroff"  or… autostop = "suspend" autostop.delay = "2" Seconds to pause Caution!  Memory page sharing is not active when suspended VMs are resumed
Starting and stopping VMs from the command line To stop a VM: vmware-cmd /home/ted/vmware/a/a.vmx stop  mode To start a VM: vmware-cmd /home/ted/vmware/a/a.vmx start  mode Abrupt power-off; resume without running normal scripts hard Try to run scripts in guest OS; use  hard  mechanism if VMware Tools is not accessible trysoft Run normal scripts in guest OS before shutdown or after resume; soft
Questions?
Ad

More Related Content

What's hot (13)

2345014 unix-linux-bsd-cheat-sheets-i
2345014 unix-linux-bsd-cheat-sheets-i2345014 unix-linux-bsd-cheat-sheets-i
2345014 unix-linux-bsd-cheat-sheets-i
Logesh Kumar Anandhan
 
Linux Commands - 3
Linux Commands - 3Linux Commands - 3
Linux Commands - 3
Kanchilug
 
Fedora Atomic Workshop handout for Fudcon Pune 2015
Fedora Atomic Workshop handout for Fudcon Pune  2015Fedora Atomic Workshop handout for Fudcon Pune  2015
Fedora Atomic Workshop handout for Fudcon Pune 2015
rranjithrajaram
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administration
Mohammed Farrag
 
Log
LogLog
Log
Eki Kinda
 
FreeBSD Jail Complete Example
FreeBSD Jail Complete ExampleFreeBSD Jail Complete Example
FreeBSD Jail Complete Example
Mohammed Farrag
 
Vi Editor
Vi EditorVi Editor
Vi Editor
Shiwang Kalkhanda
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
banubabitha
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
banubabitha
 
Building a network emulator with Docker and Open vSwitch
Building a network emulator with Docker and Open vSwitchBuilding a network emulator with Docker and Open vSwitch
Building a network emulator with Docker and Open vSwitch
Goran Cetusic
 
Ass OS
Ass OSAss OS
Ass OS
Matalus Master
 
Linux commands
Linux commandsLinux commands
Linux commands
Balakumaran Arunachalam
 
Dns configuration on rhel 5
Dns configuration on rhel 5Dns configuration on rhel 5
Dns configuration on rhel 5
Subin Selvaraj
 
2345014 unix-linux-bsd-cheat-sheets-i
2345014 unix-linux-bsd-cheat-sheets-i2345014 unix-linux-bsd-cheat-sheets-i
2345014 unix-linux-bsd-cheat-sheets-i
Logesh Kumar Anandhan
 
Linux Commands - 3
Linux Commands - 3Linux Commands - 3
Linux Commands - 3
Kanchilug
 
Fedora Atomic Workshop handout for Fudcon Pune 2015
Fedora Atomic Workshop handout for Fudcon Pune  2015Fedora Atomic Workshop handout for Fudcon Pune  2015
Fedora Atomic Workshop handout for Fudcon Pune 2015
rranjithrajaram
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administration
Mohammed Farrag
 
FreeBSD Jail Complete Example
FreeBSD Jail Complete ExampleFreeBSD Jail Complete Example
FreeBSD Jail Complete Example
Mohammed Farrag
 
Building a network emulator with Docker and Open vSwitch
Building a network emulator with Docker and Open vSwitchBuilding a network emulator with Docker and Open vSwitch
Building a network emulator with Docker and Open vSwitch
Goran Cetusic
 
Dns configuration on rhel 5
Dns configuration on rhel 5Dns configuration on rhel 5
Dns configuration on rhel 5
Subin Selvaraj
 

Viewers also liked (6)

Ecsell
EcsellEcsell
Ecsell
Bret Simmons
 
Curs deDisseny Centrat en l'Usuari (2)
Curs deDisseny Centrat en l'Usuari (2)Curs deDisseny Centrat en l'Usuari (2)
Curs deDisseny Centrat en l'Usuari (2)
Digital Granollers
 
LinkedIn NV State SHRM Conference
LinkedIn NV State SHRM ConferenceLinkedIn NV State SHRM Conference
LinkedIn NV State SHRM Conference
Bret Simmons
 
Píndola Facebook per a l'empresa - CTUG
Píndola Facebook per a l'empresa - CTUGPíndola Facebook per a l'empresa - CTUG
Píndola Facebook per a l'empresa - CTUG
Digital Granollers
 
Informatics technologies in an evolving r & d landscape
Informatics technologies in an evolving r & d landscapeInformatics technologies in an evolving r & d landscape
Informatics technologies in an evolving r & d landscape
National Institute of Biologics
 
The Next Generation of Talent Management Strategy: Pay for Talent
The Next Generation of Talent Management Strategy: Pay for TalentThe Next Generation of Talent Management Strategy: Pay for Talent
The Next Generation of Talent Management Strategy: Pay for Talent
Human Capital Media
 
Curs deDisseny Centrat en l'Usuari (2)
Curs deDisseny Centrat en l'Usuari (2)Curs deDisseny Centrat en l'Usuari (2)
Curs deDisseny Centrat en l'Usuari (2)
Digital Granollers
 
LinkedIn NV State SHRM Conference
LinkedIn NV State SHRM ConferenceLinkedIn NV State SHRM Conference
LinkedIn NV State SHRM Conference
Bret Simmons
 
Píndola Facebook per a l'empresa - CTUG
Píndola Facebook per a l'empresa - CTUGPíndola Facebook per a l'empresa - CTUG
Píndola Facebook per a l'empresa - CTUG
Digital Granollers
 
The Next Generation of Talent Management Strategy: Pay for Talent
The Next Generation of Talent Management Strategy: Pay for TalentThe Next Generation of Talent Management Strategy: Pay for Talent
The Next Generation of Talent Management Strategy: Pay for Talent
Human Capital Media
 
Ad

Similar to Vmware Command Line (20)

Top ESXi command line v2.0
Top ESXi command line v2.0Top ESXi command line v2.0
Top ESXi command line v2.0
Concentrated Technology
 
Esx.sc.quickref
Esx.sc.quickrefEsx.sc.quickref
Esx.sc.quickref
hellocn
 
Linux
LinuxLinux
Linux
Kavi Bharathi R
 
Tech X Virtualization Tips
Tech X Virtualization TipsTech X Virtualization Tips
Tech X Virtualization Tips
Youssef EL HADJ
 
Alterar memória kvm virtual machine
Alterar memória kvm virtual machineAlterar memória kvm virtual machine
Alterar memória kvm virtual machine
Carlos Eduardo
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
badamisri
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
badamisri
 
Linux Conf Admin
Linux Conf AdminLinux Conf Admin
Linux Conf Admin
Srinivas Badami
 
Install websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsInstall websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bits
Manuel Vega
 
Command line for the beginner - Using the command line in developing for the...
Command line for the beginner -  Using the command line in developing for the...Command line for the beginner -  Using the command line in developing for the...
Command line for the beginner - Using the command line in developing for the...
Jim Birch
 
RHCSA EX200 - Summary
RHCSA EX200 - SummaryRHCSA EX200 - Summary
RHCSA EX200 - Summary
Nugroho Gito
 
lec4.docx
lec4.docxlec4.docx
lec4.docx
ismailaboshatra
 
Hands_on_multipath_p1.pdf
Hands_on_multipath_p1.pdfHands_on_multipath_p1.pdf
Hands_on_multipath_p1.pdf
Hossein Mehrara
 
Ultimate Unix Meetup Presentation
Ultimate Unix Meetup PresentationUltimate Unix Meetup Presentation
Ultimate Unix Meetup Presentation
JacobMenke1
 
T02___________Basic_Linux_Commands__pptx
T02___________Basic_Linux_Commands__pptxT02___________Basic_Linux_Commands__pptx
T02___________Basic_Linux_Commands__pptx
bestboybulshaawi
 
Linux
Linux Linux
Linux
Mindtree
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training
videos
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02
FNian
 
Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)
Ata Rehman
 
Linuxs1
Linuxs1Linuxs1
Linuxs1
rajikaa
 
Esx.sc.quickref
Esx.sc.quickrefEsx.sc.quickref
Esx.sc.quickref
hellocn
 
Tech X Virtualization Tips
Tech X Virtualization TipsTech X Virtualization Tips
Tech X Virtualization Tips
Youssef EL HADJ
 
Alterar memória kvm virtual machine
Alterar memória kvm virtual machineAlterar memória kvm virtual machine
Alterar memória kvm virtual machine
Carlos Eduardo
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
badamisri
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
badamisri
 
Install websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsInstall websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bits
Manuel Vega
 
Command line for the beginner - Using the command line in developing for the...
Command line for the beginner -  Using the command line in developing for the...Command line for the beginner -  Using the command line in developing for the...
Command line for the beginner - Using the command line in developing for the...
Jim Birch
 
RHCSA EX200 - Summary
RHCSA EX200 - SummaryRHCSA EX200 - Summary
RHCSA EX200 - Summary
Nugroho Gito
 
Hands_on_multipath_p1.pdf
Hands_on_multipath_p1.pdfHands_on_multipath_p1.pdf
Hands_on_multipath_p1.pdf
Hossein Mehrara
 
Ultimate Unix Meetup Presentation
Ultimate Unix Meetup PresentationUltimate Unix Meetup Presentation
Ultimate Unix Meetup Presentation
JacobMenke1
 
T02___________Basic_Linux_Commands__pptx
T02___________Basic_Linux_Commands__pptxT02___________Basic_Linux_Commands__pptx
T02___________Basic_Linux_Commands__pptx
bestboybulshaawi
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training
videos
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02
FNian
 
Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)
Ata Rehman
 
Ad

Recently uploaded (20)

Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 

Vmware Command Line

  • 1. ESX Server from the Command Line The command-line environment Working with disks Working with virtual machines
  • 2. Tips for command-line use Install an ssh (Secure Shell) client on your desktop Windows: PuTTY (freeware), SecureCRT (commercial) Know the features of the bash shell Use arrow keys to navigate command history Use TAB to complete file names and commands Useful keystrokes: ctrl- A : beginning of line ctrl- E : end of line ctrl- W : erase previous word ctrl- U : blank this line ctrl- Z : suspend this job bg command puts suspended job in background Caution! ctrl- S freezes the screen; use ctrl- Q to unfreeze
  • 3. Useful Service Console add-on packages nano : a simple text editor An alternative to vi Always invoke as nano –w filename to turn off word-wrap lynx : a text-only Web browser Especially useful for downloading files from Web sites to Service Console ncftp : an enhanced text-only FTP client Contains ncftpget , useful for unattended FTP downloads lsof : list open files Shows what processes are using what files and ports
  • 4. Working with Service Console packages rpm –qa : list installed packages rpm –qi packagename : get more information about a package rpm –ql packagename : list files composing a package rpm –Uvh filename(s) : install a package You may need to satisfy a package’s dependencies; list multiple package filenames on command line rpm –e packagename : uninstalls a package Warning: do not uninstall VMware packages! Or use –p packagefilename in place of packagename
  • 5. Partitioning disks with fdisk fdisk requires a device file pointing at desired disk fdisk /dev/sdb Enter p to print the present partition table Enter n to create a new partition Specify partition number if primary Specify starting cylinder Specify size: +1024M gives a 1 GB partition Enter t to change the partition type: FB for VMFS Enter w to save partition table to disk Warning: Changing partition table of a disk with mounted Linux file systems may require reboot
  • 6. vmkfstools Syntax The option flag governs the action of the command Either a single letter with one hyphen or a word with two The last argument is always a path using the VMkernel’s device space Either a VMFS name (physical or friendly) vmhba0:1:0:5 /vmfs/vmhba0:1:0:5 myvmfs /vmfs/myvmfs Or a VMFS name followed by a virtual disk file name vmhba0:1:0:5:a.dsk /vmfs/vmhba0:1:0:5/a.dsk myvmfs:a.dsk /vmfs/myvmfs/a.dsk vmkfstools -? [ otherarg otherarg … ] VMkernel-path
  • 7. Creating a new VMFS volume Use vmkfstools –N to map from VMkernel disk to a Linux device file /dev/vsd n # vmkfstools –N vmhba0:8:0:0 /dev/vsd0 fdisk /dev/vsd0 Make a partition number 1 with type FB Make new VMFS volumes using MUI or command line Whole disk
  • 8. Creating a new VMFS volume (cont’d) Use vmkfstools –C to build a new VMFS vmkfstools –C vmfs2 vmhba0:8:0:1 Use vmkfstools –S to set the volume label vmkfstools –S VOL3 vmhba0:8:0:1 Use vmkfstools –l to list contents vmkfstools –l VOL3 or ls –l /vmfs/VOL3
  • 9. Basic VMFS virtual-disk operations To create a new virtual disk: vmkfstools –c 4096m VOL3:webserver.dsk To set access rights: chown ted:finance /vmfs/VOL3/webserver.dsk chmod u=rw,go= /vmfs/VOL3/webserver.dsk To rename a virtual disk mv /vmfs/VOL3/ws.dsk /vmfs/VOL3/webserver.dsk To remove a virtual disk rm /vmfs/VOL3/ws.dsk
  • 10. Copying a virtual disk It’s safe to use the Service Console’s cp command on > 2 GB virtual disks Not all Service Console utilities have been customized Other environments may contain unsafe tools too Safest to handle virtual disks in their exported (“COW”) format To export: vmkfstools –e /vmimages/ws.vmdk vmfs3:ws.dsk
  • 11. Copying a virtual disk from one ESX Server to another Use scp to copy securely scp /vmfs/VOL3/ws.dsk  user @esx2:/vmfs/myvmfs/ws.dsk Always check for integrity # sum /vmfs/myvmfs/ws.dsk 39678 489473 /vmfs/myvmfs/ws.dsk # md5sum /vmfs/myvmfs/router-2.1.dsk 77dfc2ba10c75b6ad0a1812805887e28 router-2.1.dsk 16-bit checksum size in 1 KB blocks
  • 12. Extending a virtual disk Make a backup first! Extend the virtual disk vmkfstools –X 4096M VOL3:windata.dsk Now the file system inside the virtual disk does not fill the medium Use Partition Magic or the equivalent inside the VM to extend the file system
  • 13. Inspecting virtual disks from Service Console To identify a virtual disk: # head mydisk.dsk | file – To import: vmkfstools –i /vmimages/otherdisk.dsk VOL3:other.dsk GSX Server 2.x virtual disks can also be imported {nothing} Workstation 3.x GSX Server 2.x ASCII English text Workstation 4 x86 boot sector ESX Server
  • 14. Opening virtual disks from Service Console To display the partition table inside a virtual disk: # vmware-mount.pl –p /vmfs/VOL3/w2k.dsk Nr Start Size Type Id System -- ----- ------- ---- --- --------------- 1 63 4176837 BIOS 7 HPFS/NTFS # vmware-mount.pl –p /vmfs/VOL3/linux.dsk Nr Start Size Type Id System -- ----- ------- ---- --- --------------- 1 32 81888 BIOS 83 Linux 2 81920 262144 BIOS 82 Linux swap 3 344064 972800 BIOS 83 Linux Virtual disk must be in ESX format, reside in a VMFS, not powered on
  • 15. Opening virtual disks from Service Console (cont’d) You may mount file systems from within a virtual disk onto the Service Console Virtual disk must not be powered on NTFS file systems are read-only! vfat and ext3 file systems may be mounted read-write Press ctrl- C to kill vmware-mount.pl when done # mkdir /myntfs # vmware-mount.pl /vmfs/ted/w2k.dsk 1  -t ntfs -o ro /myntfs In another window: # ls /myntfs AUTOEXEC.BAT CONFIG.SYS IO.SYS boot.ini Documents and Settings MSDOS.SYS
  • 16. VM Configuration File Syntax Comments begin with a # character Blank lines are allowed Each other line is of the form attribute = value or class.attribute = value Class can be: A family of related items A device controller A device on a device controller
  • 17. A sample configuration file config.version = "6" virtualHW.version = "3" memSize = "192" numvcpus = "2" displayName = "Controller for domain TEXAS.ORG" guestOS = "win2000Serv" ide1:0.present = "TRUE" ide1:0.startConnected = "TRUE" ide1:0.deviceType = "atapi-cdrom" ide1:0.fileName = "/dev/cdrom" floppy0.present = "TRUE" floppy0.startConnected = "FALSE" floppy0.fileName = "/dev/fd0" scsi0.present = "TRUE" scsi0.virtualDev = "vmxbuslogic" scsi0.sharedBus = "none" scsi0:0.present = "TRUE" scsi0:0.fileName = “VOL3:winnt.dsk" scsi0:0.mode = "persistent"
  • 18. A sample configuration file (cont’d) ethernet0.present = "TRUE" ethernet0.virtualDev = "vlance" ethernet0.connectionType = "monitor_dev" ethernet0.devName = "vmnic0" suspend.directory = "/vmfs/VOL3" remotedisplay.depth = "8" checkpoint.cptconfigname = "rn2-52ff1bdc" uuid.location =  "56 4d 7c 66 1f 23 b5 c3-2f 50 a9 29 7f 53 72 b5"
  • 19. Configuring for Terminal Services Windows Terminal Services and Citrix Metaframe systems run with many processes Windows 2000 systems benefit from a performance tweak Add to configuration file workload = "TerminalServices" If Citrix Metaframe XP, install Citrix hotfix XE102W014 in guest OS
  • 20. Time sync for graphicsless VMs Normally need GUI VMware Tools agent to enable time synchronization between guest OS and Service Console But Linux servers often run without graphics To enable time sync without GUI: tools.syncTime = "TRUE"
  • 21. Adjusting Remote Console keyboard repeat By default, virtual keyboard device in VM starts autorepeat if a physical key is not released within less than a second Network latency or congestion may trigger autorepeat Add to config file: keyboard.typematicMinDelay = 2000000 Value in microseconds (2 million  sec = 2 sec) Choose a value that results in satisfactory performance
  • 22. Specifying autostart and autostop behavior Config files may contain autostart = "poweron" autostart.delay = "2" Seconds to pause autostop = "poweroff" or… autostop = "suspend" autostop.delay = "2" Seconds to pause Caution! Memory page sharing is not active when suspended VMs are resumed
  • 23. Starting and stopping VMs from the command line To stop a VM: vmware-cmd /home/ted/vmware/a/a.vmx stop mode To start a VM: vmware-cmd /home/ted/vmware/a/a.vmx start mode Abrupt power-off; resume without running normal scripts hard Try to run scripts in guest OS; use hard mechanism if VMware Tools is not accessible trysoft Run normal scripts in guest OS before shutdown or after resume; soft