240 likes | 453 Views
Resources for Learning VMware VI3 And VI3 Tips and Tricks. About Me. Eric Siebert 25 year IT veteran User Moderator on the Vmtn community forums and hold the elite Guru status as a forum member ( esiebert7625 ) Run the website http://vmware-land.com
E N D
Resources for Learning VMware VI3 And VI3 Tips and Tricks
About Me • Eric Siebert • 25 year IT veteran • User Moderator on the Vmtn community forums and hold the elite Guru status as a forum member (esiebert7625) • Run the website http://vmware-land.com • Blogger and feature article author for http://searchservervirtualization.com and http://searchvmware.com • Author of the forthcoming book from Pearson publishing: VI3 Implementation and Administration
Resources for learning VMware VI3 • VMware is certainly not new technology but it is becoming increasing popular and is new to a great many of people that are experiencing it for the first time. Getting started with VMware can be challenging as there are many new technologies and concepts to learn with virtualization. Training classes are always a great option for jump-starting your learning but can be cost prohibitive for some. This presentation will cover some alternative methods for learning VMware in lieu of a class or as a way to complement a class you may have already taken.
Documentation / Hands On • VMware documentation – The best place to start is to read through the excellent documentation that VMware provides on their website. • http://vmware.com/support/pubs/vi_pubs.html • Hands on – There is no better method to learning something then getting hands on with it. Download the ESX and VirtualCenter evaluations if you don’t already have it and install them and play around with it. Even if your server is not on the current HCL there is a good chance it will still install and run on it. • (VMware only allows one evaluation per registered email address. If you have already downloaded an evaluation copy you can register with a new email address to download it again)
Vmtn Forums • Vmtn forums – When starting out you will often come across issues and challenges that are a result of lack of experience. The Vmtn forums are a fantastic resource for asking questions and getting the help you need. You will find a very high level of participation in the forums from users all over the world with many experienced and talented users who generously volunteer their time to help others. Most new forum users are surprised by the speed, quality and number of answers that they receive to their posts. It is not uncommon to get a response (and sometime multiple) within minutes of posting. The forums are also a great way to network with other VMware users and share ideas and experiences with each other. • http://communities.vmware.com/community/vmtn
Vmtn forums • Facts about the forums: • Unofficial extension of VMware support • Currently over 450,000 registered users • Recently hit the 1,000,000 post milestone • Points based Q & A system, thread author can award 6 points for up to 2 helpful answers and 10 points for a correct answer • Participants from all over the world • Administered by Robert D’ellimmagine, John Troyer and Badsah Mukherji from VMware • Moderated by a group of select volunteers from the Vmtn community including: • Dave Mishchenko – (Dave.Mishchenko - Canada) • Edward Haletky – (Texiwill – USA) • Ken Cline – (Ken.Cline – USA) • Oliver Reeh (OReeh – Germany) • Tom Howarth (Tom Howarth – UK) • Steve Beaver ( Sbeaver – USA) • Eric Siebert (Esiebert7625 – USA) • Jason Boche (jasonboche – USA)
Vmtn forums • Vmtn community roundtable podcast • Weekly hour long podcast that is recorded each Wednesday • Hosted by John Troyer from VMware • A group of senior members from the Vmtn community that talk about various issues and topics • Regular participants include Eric Siebert, Edward Haletky, Jason Boche, Steve Beaver, Matthew Johnson and Dave Mishchenko • Special guests each week, past guests include VMware personnel such as Carter Shanklin (Powershell PM), Scott Drummonds (Performance TMM), Charu Chaubal (ESXi TMM) and industry bloggers including Andrew Kutz and Scott Lowe. • Past podcasts available at: http://blogs.vmware.com/vmtn/podcasts/index.html • Rss feed: http://recordings.talkshoe.com/rss19367.xml
White Papers / Websites • White/Technical papers – Vmware provides a very nice library of technical and white papers that is updated monthly. There are also a number of vendors that publish white papers in conjunction with VMware. • http://vmware.com/solutions/whitepapers.html • http://vmware.com/vmtn/resources/ • Websites – There are no shortage of websites and blogs devoted to VMware and virtualization technologies. Check out these links for a list of them. • http://vmware-land.com/vmware_launchpad.html • http://vmware-land.com/Vmware_Links.html#Blogs • http://vmware-land.com/Vmware_Links.html#Websites
VMworld Presentations • VMworld presentations – Even if you can’t attend you can still benefit from the great sessions that are given at VMworld. VMware publishes the audio and slides from the hundreds of presentations given at VMworld each year. This past year (2007) VMware chose to release a certain amount of presentations to non-attendees each month instead of releasing all of them at once. These sessions are full of fantastic information provided by Vmware employees, customers and vendors. Simply register for a free account to view the 2007 and prior years sessions. • http://vmworld.com/vmworld/sessions.jspa • http://servervirtualization.blogs.techtarget.com/2008/04/22/attend-the-best-of-vmworld-virtually/ • If you are attending VMworld this year be sure and check out session: PO1861 – Vmtn Community Experts Panel
Books • Books – There are a number of great books to help you learn VMware and to use as a reference guide. • RapidApp's Quick Start guide to ESX 3.0 by Mitch Northcutt • VMware ESX Server 2.5 Advanced Technical Design Guide (Free download) by Ron Oglesby, Scott Herold, Mitch Northcutt, and Brian Madden • VMware ESX Server in the Enterprise: Planning and Securing Virtualization Servers by Edward L. Haletky • VMware ESX Essentials in the Virtual Data Center by David Marshall, Stephen S. Beaver, Jason W. McCarty (published August 2008) • Mastering VMware Infrastructure 3 (Mastering) by Chris McCain • Look for my book tentatively titled, VMware VI3 Implementation and Administration due out April 2009!
Webcasts / VMUG • Webcasts – View upcoming and archived webinars and webcasts on a wide variety of VMware subjects from both VMware and vendors. • http://www.vmware.com/events/webinars/ • http://searchvmware.bitpipe.com/data/tlist?b=ka_svmw_vmware&dt=Webcast • http://searchservervirtualization.bitpipe.com/webcasts?asrc=SS_NAV_WC • VMware User Groups (VMUG) – Another great way to network and meet other Vmware users in your community. • http://vmware.com/resources/communities/usergroup/events.html
Top 10 Lists • Check out my Top 10 lists for the best information on a variety of subjects at http://vmware-land.com/Top_10_Lists.html also re-published with introductions at http://www.virtual-strategy.com/Features/ • Some list examples: • Top 10 blogs that VMware administrators must read • Top 10 free tools that should be in every VMware administrator's toolkit • Top 10 things you must read when making a business case for implementing VMware • Top 10 things you must read if you are new to VMware • Top 10 things you must read to get more technical with VI3 • Top 10 things you must read about VMware Storage • Top 10 things you must read about VMware Security • Top 10 things you must read about VMware Troubleshooting • Top 10 things you must read about VMware Networking • Top 10 things you must read about VirtualCenter • Top 10 things you must read about VMware Performance
VI3 Tips & Tricks A few handy tips for administering ESX and VirtualCenter
Tip 1: How to clone a VM without VirtualCenter • Method 1 - Use VMware Converter • Download Converter and install it on your workstation • Launch Converter and select “Import Machine” • For the Source Type select “ESX Server or VirtualCenter virtual machine” • Enter your ESX Server name that your source VM is located on and enter in the username/password • Choose your source VM • Choose to import all disks and maintain size or select the disks you wish to include and re-size if necessary • For the Destination Type select “ESX Server or VirtualCenter virtual machine” • Enter your ESX Server name that your destination VM will be located on and enter in the username/password • Enter a new Virtual Machine name • Select a ESX host or resource pool, a Datastore for this new VM and select your NIC’s and Networks • Enter any customization information and select to install VMware Tools or not • Once the conversion process completes and the VM is powered on you can then run a utility such as NewSid to change the SIDs on the new VM: http://www.microsoft.com/technet/sysinternals/Security/NewSid.mspx • You can also run Sysprep on the original VM prior to copying it. http://technet.microsoft.com/en-us/library/bb457067.aspx
Tip 1: How to clone a VM without VirtualCenter • Method 2 - Use the Service Console utility vmkfstools • Using the VI Client create a new VM on the ESX host and specify any size hard drive (It will not let you create a VM without a hard drive) • Edit the new VM’s settings and remove and delete the hard drive • Login to service console • The format for vmkfstools –i (import) is source vmdk filename first followed by the destination vmdk filename (use the path of the new VM you created) • Type “vmkfstools –i /vmfs/volumes/ESX-Local/templates/2003-template.vmdk /vmfs/volumes/ESX-Local/mynewvm/mynewvm.vmdk” • Edit the VM’s settings, add a Hard Disk, select use an existing disk and browse to your VM’s directory and select your new disk file • Once the VM is powered on you can then run a utility such as NewSid to change the SIDs on the new VM. http://www.microsoft.com/technet/sysinternals/Security/NewSid.mspx • You can also run Sysprep on the original VM prior to copying it. http://technet.microsoft.com/en-us/library/bb457067.aspx
Tip 1: How to clone a VM without VirtualCenter • Method 3 - Use a Perl script to create clones • Sample Perl script is located at: http://www.pgregg.com/projects/vmclone/ • Copy Perl script to ESX server and run it using parameters to create a clone • Alternately install the VI Perl Toolkit on any Windows or Linux system which comes with many sample scripts including vmclone.pl http://www.vmware.com/support/developer/viperltoolkit/
Tip 2: Resizing virtual disks • Many methods available for doing this • Use the service console utility, vmkfstools –X to grow the raw disk (vmdk) file • In ESX 3.5 you can also grow the disk by editing the VM’s settings • In ESX 3.5 Update 2 you can also grow the disk by editing the VM’s settings while it is powered on • Once you grow a disk you need to edit the OS partitions if you wish to make existing partitions larger. For boot partitions you can use the Windows diskpart utility or a boot CD with Knoppix or GpartEd to do this. • If you do not wish to grow a partition you can create an additional partition instead • Check out http://vmware-land.com/Resizing_Virtual_Disks.html for more information or my 2-part article on searchvmware.com - http://searchvmware.techtarget.com/tip/0,289483,sid179_gci1322236,00.html
Tip 3: How to kill a stuck VM • If a VM is stuck and will not power on or off using the VI Client there are a few methods available to forcibly to do it. • ESX 3.0 method • Login to the service console • Type “vmware-cmd –l” to get a list of all VM’s and there paths • You can check the VM state by typing “vmware-cmd /<path to VM directory>/server.vmx getstate” • Type “ps -ef | grep <virtualmachinename>” • The second column is your pid of the vmkload_app of the Virtual Machine, you can also type “ps –eaf” to see all running processes • Type “kill -9 <pid>” • Check VM state again, it should now be off • Type “vmware-cmd /<path to VM directory>/server.vmx start” to power on VM
Tip 3: How to kill a stuck VM • ESX 3.0 Alternate method • Login to the service console • Get the vmid of the VM you want to kill by typing “vm-support –x” or “cat /proc/vmware/vm/*/names” • Kill the VM and generate core dumps and logs by typing “vm-support –X <vmid>” • You will be prompted if you want to include a screenshot of the VM, send an NMI to the VM and send a ABORT to the VM, you must answer Yes to the ABORT question to kill the VM. The entire process will take about 5-10 minutes to run. It will create a tar archive in the directory you run it in. • ESX 3.0 Alternate method • Login to the service console • Type “vmware-cmd –l” to get a list of all VM’s and there paths • You can check the VM state by typing “vmware-cmd /<path to VM directory>/server.vmx getstate” • To forcibly stop type vmware-cmd /<path to VM directory>/server.vmx stop hard” • Check VM state again, it should now be off • Type “vmware-cmd /<path to VM directory>/server.vmx start” to power on VM
Tip 3: How to kill a stuck VM • ESX 3.0 Alternate method • Login to the service console • Get the vmid of the VM you want to kill by typing “vm-support –x” or “cat /proc/vmware/vm/*/names” (ie. 2533) • Get the world ID of the VM by typing “less –S /proc/vmware/vm/<vmid>/cpu/status” (substitute <vmid> with the # from the step above) Use the right arrow to scroll to the right and see the Group field value (ie. vm.2532, this is the WID of the VM), press Q to exit. A world is the software entity created in the VMkernel that runs the virtual machine. To put it another way, every Virtual Machine Monitor (VMM) has a unique world ID assigned for the duration it is powered on. It is similar to a process ID in any other operating system. • To kill the VM type “/usr/lib/vmware/bin/vmkload_app –k 9 <wid>” (substitute <wid> with the # from the step above) • You will see a message “Sending signal '9' to world 2532” If the command fails you will see a message “Failed to forward signal 9 to cartel 2532”, otherwise you will see not see a response. • Every virtual machine running has a VMID, also known as a World ID (WID).
Tip 4: Finding Snapshots • Trying to find out which VM’s have snapshots can be challenging as there is no centralized way to do this built into the VI Client or VirtualCenter. You should periodically check your ESX servers to make sure there are no old snapshots still present that need to be deleted. There are a few methods you can use to accomplish this. • Method 1 – use the Find command on the Service Console • Login to service console • Change to your /vmfs/volumes/<volume name> directory • Type find -iname "*-delta.vmdk" -mtime +7 -ls to find snapshot files that have not been modified in 7 days or simply find -iname "*-delta.vmdk" to find all snapshot files
Tip 4: Finding Snapshots • Method 2 – Snapalert Perl Script • A free script created by Dominic Rivera • This script uses the VI Perl toolkit to talk directly to VirtualCenter so there is no component that needs to be installed on each host (also works with ESXi Installable) • Optionally the script can also generate an email report. • Download at http://vmprofessional.com/index.php?content=snapalert • Method 3 – Snaphunter Perl Script • A free script created by Xtravirt • This script can report back on the Snaphot status of VM's from multiple ESX Servers and also send email reports. • Optionally the script can commit (delete) snapshots that are active • Download at http://www.xtravirt.com/index.php?option=com_remository&Itemid=75&func=fileinfo&id=19
Tip 4: Finding Snapshots • Method 4 – query the VirtualCenter SQL database • VirtualCenter keeps track of all the snapshots on every host in it’s VPX_SNAPSHOT table. • I’ve written a vbs script that queries this table to display a list of VM’s with running snapshots. • This method works OK but it relies on database tables which could potentially change in future versions of VirtualCenter. • Download at http://vmware-land.com/Downloads.html
The End • This presentation available at: http://vmware-land.com/downloads.html