Dec 7 2007 7:53PM GMT
Posted by: Rick Vanover
Linux,
VMware ESX,
Rick Vanover,
VI3
VMware ESX has many commands on the console that you can use to get detailed information on the status or configuration of many elements of your installation. Recently I had an opportunity to run esxcfg-info on the console (or can be run in the same fashion over ssh) and really liked this information. This tool will give you basically everything about the ESX host, including an inventory and details of the virtual machines on the host.
Lots of Data in This File
I ran the following series of commands to make a place for these files on the ESX system:
cd /home
mkdir adminprofiles
esxcfg-info > esxcfg-info.export.12.7.2007.text
Yes, the name of the file is long - but that will come into play later. Don’t run this command interactively on the screen; way too much information is generated. On my single system with only nine virtual machines in the inventory, it was around 900KB. I really like this export as a documentation tool and benchmarking mechanism.
I will find myself running this command as part of my server documentation (kept locally in the \home\adminprofiles path or copied elsewhere), benchmarking, and baseline configuration information. I’ll also find this file beneficial for comparisons among systems within VMI.
Details Galore
Surely this is mainly as support tool for VMware, but there is really good information in here. I’ve taken out lines for simplicity, check out the following snippets of the output:
Network Configuration
\==+NetworkInfoImpl :
|—-Name…………………………………..vswif0
|—-Enabled………………………………..true
|—-Ip Address……………………………..172.16.25.117
|—-Ip Netmask……………………………..255.255.252.0
|—-Ip Broadcast……………………………172.16.26.255
|—-DHCP…………………………………..false
|—-MAC Address…………………………….00:50:56:4e:a3:0b
\==+DnsConfig :
|—-Hostname…………………………………….esxlive03
|—-Domain………………………………………rixco.net
|—-Primary Name Server…………………………..172.16.25.2
|—-Secondary Name Server…………………………172.16.25.3
Virtual Machine Guest Information\==+Virtual Machines:
|—-Config File……………………./vmfs/volumes/4713cb68-adaa0b06-f0fc-0015173ebba9/S-VMAPP001/S-VMAPP001.vmx
|—-UUID…………………………..50 01 42 0b e6 a9 6d fb-37 54 e9 b1 42 c2 3e ce
|—-Num Vcpus………………………2
\==+Memory Client Stats :
|—-Touched……………………..51.20 MB
|—-Current Size…………………512.00 MB
|—-Target Size………………….372.36 MB
\==+Memory Allocation :
|—-Valid……………………….true
|—-Minimum……………………..131072
|—-Min Limit……………………131072
|—-Maximum……………………..393216
|—-Shares………………………384
\==+CPU Allocation :
|—-Valid……………………….true
|—-Minimum……………………..100
|—-Min Limit……………………100
|—-Maximum……………………..1000
|—-Shares………………………875
Check out the tool on your ESX systems. How have you used some of the other esxcfg-… commands?
Nov 17 2007 7:19AM GMT
Posted by: Rick Vanover
Virtualization,
Linux
As you may know, VMWare Server 2.0 Beta has been released for public (and still free!) beta. TechTarget covered the release, and I had a chance this week to install VMWare 2.0 on my CentOS Linux system. I chose to install on Linux without an X window manager not as an exercise in futility, but to really make a purpose built system that I can run the test virtual machines. With the new version of VMWare Server 2.0, I wanted to run my virtual machines there to see how they performed. My previous VMWare Server 1.03 system was running on Windows, and then I posed the question of how to get the virtual machine files there.
Depending on how you access your filesystem in Linux, there are many ways to get the files over. I choose to run Samba (smbd) on this Linux box as my means of getting the files to the system and with my particular version of CentOS, after VMWare installed based on my parameters, I could not access the path via the existing Samba share.
Here is what happened, after the installation I added a datastore in VMWare Server. The datastore, for those like me who are used to the Windows world, is the path in which the virtual machines are kept on the filesystem. For my own ease, I chose the path /home/rick/vms which resembles the \My Documents\My Virtual Machines format that I am used to when using the Windows version of VMWare Server. This path was also my home directory for my username. After the datastore was added, I could not access the path via the samba connection while using correct credentials. After some poking around I determined the following command will allow you to restore the user’s access to the path that contained the VMWare Server datastore as root:
chmod 777 /home/rick/vms
This changed the permissions for the this path for the rick username in the home path, to all users read, write, and execute. In my situation, there is only root and rick users configured on the system - so you may want to run the man chmod command to set a more appropriate set of permissions on the path. Once that was set, I restarted the Samba service and I was able to access the path to populate with my existing virtual machines and upgrade them for the VMWare Server 2.0 Beta.