Wednesday, August 6, 2014

Learning How To Use Esxtop

Esxtop explained in 10 minutes.

What it is:

Esxtop is a command found inside of the esxi hosts that can be used to determine issues regarding cpu, memory, disk and network. By default, esxtop shows cpu related activity but this can be changed to display memory, disk and network related activity by pressing different keys on the keyboard.

 The esxtop defaults to cpu related information. That is the "C" option.

What you see here is one virtual machine using the cpu 100%. Notice how this vm is using logical cpu 0. Notice the fields %USED and %RDY. The first one is about 100% while the other one is close to 0%. This shows that the vm is pretty much never waiting to have access to the logical cpu. Notice the field %MLMTD is equals to 0 since there is no cpu limit implemented.


What follows is an example of two identical vms fighting for the same cpu. They have equal shares. Notice how %USD drops to about 50% while %RDY jumps to about 50%. This shows that one vm is using the cpu, the other one waits and vice-versa.


What follows is an example of having one vm have twice the cpu shares compared to the other one. Notice the relationship of shares with %USD and %RDY. Notice the 66% vs 33% ratio.


After powering off the other vm, a limit was implemented for the remaining vm. The cpu was limited to close to 50%.


 Here is the "M" option for memory. At the top you can see that this esxi host has 4gbs of RAM (PMEM/MB. Notice this shows Transparent Page Sharing activity, Ballooning activity, Compression and Swapping. When looking at the vm line, notice this vm was given 4gb. The hypervisor has granted him 4gbs without a problem (GRANT). Also notice that there is no ballooning, compression or swapping yet.


Similar capture; this time after implementing a memory limit on this vm. This triggers the memory reclamation techniques previously mentioned.


 You can see disk related activity at the hba level by using the "D" option. Notice DAVG (device average latency) and KAVG (kernel average latency). You can also see reads x second, writes x second and so forth.


You can see disk related activity at the individual disk level by using the "U" option. This displays both disks with vmfs file systems and nfs datastores. This shows the internal disk and the cd/dvd. No activity was taking place while the capture was taken. Other fields of importance are ACTV and QUED; nothing active and nothing in the queue.


You can see disk related information by individual vm by using lower case "V". Notice you can see latency related information when it comes to reads and writes.


Here is the "N" option for networking. Notice the fields of dropped outbound and inbound packets.


You can use the "F" option to add or remove columns for any of the views. The ones with the "*" are already showing, the ones without the "*" are not.


You can use the "H" option for help.


You can use the "S" option to change how often esxtop refreshes. The default is 5 seconds. This can be lowered or increased.


The "Q" option quits the utility.





Tuesday, August 5, 2014

Solaris 11 + ZFS as an NFS server for ESXI

How to configure a Solaris 11 NFS Server

1. Start the installation of Solaris 11. In this case, a vm was created with 1 vcpu and 3 gbs of RAM. This vm was created with 2 20gb disks; the second disk to be used for nfs. Take a look at the screens and answers the questions as needed.














Step 2: Reboot the solaris server after the install and log in.



Step 3: Change the ip address of the nfs server with the following commands.

# sudo ipadm create-addr -T static -a local=10.1.1.80/24 net0

# ipadm show-if; ipadm show-addr

Step 4. Create an NFS share using ZFS and the second disk using the commands in the capture.




Step 5: Mount the file system using esxcfg-nas





Saturday, August 2, 2014

Just one more xen-guy??? Checking out Xen Server.

How to install and configure Xen Server and Xen Center

Sometimes it's good to compare different competing solutions. Today I felt like installing Xen Server since it had been a while. Here are the steps.

1. Download the software and burn it into a dvd.

2. Boot your physical server (or virtual machine) from the cd. Answer the typical questions. A virtual machine inside of an esxi host was used in this case. I gave the vm 2 cpus and 2 gbs of ram. Make it a 64-bit linux vm.
















3. Once the installation finishes, reboot the xen server



4. Launch your browser and connect to the xen server to download the xen center.


5. Install the msi.



6. Launch the Xen Center utility.


7. Add your xen server to your inventory.


8. Create a test vm by clicking on the New VM icon.