Friday, September 5, 2014

OMG best list of free vmware tools I have found to date

follow the links

kendrickcoleman.com
101-free-tools-for-vmware-administrators
free-tools

these guys did their research and spent hours compiling these lists.
You will note: I have already blogged about several of them
WinSCP
Putty
RVtools
Vmware Scanner
PowerCLI
VmwareConverter
Vsphere client

Thursday, September 4, 2014

Downgrade a VMware VM from version 10 to 9 the easy way,

Using the vsphere client power off the VM.
The in the summary tab, right-click on the Storage icon and choose Browse Datastore.
Browse to the folder that contains the VM name you wish to down grade: in this case TEST-VM
Now copy the TEST-VM.vmx to another location as a backup. Right-click the file and choose copy.
In another folder or the root paste the file, in case you need to revert back to the original.
Now put the mouse over the platter disk icons in the Datastore Browser. It will pop up what each one does.
We want to use the one that allows you to download from the datastore to the local PC and download the TEST-VM.vmx file to the local PC.
Edit the file with notepad, you will need to right-click and choose Open with and choose notepad.
In the first line you will see:
virtualHW.version = "10" Change that to be virtualHW.version = "9" now save the file.
Back to the Datastore Browser and now we need to delete the file TEST-VM.wmx from the folder.
Now put the mouse over the platter disk icons in the Datastore Browser. It will pop up what each one does.
We want to use the one that allows you to upload files to the datastore. Now upload the file to the folder you just deleted it from on the datastore
Power on the VM and it will now be version 9 and you can now edit it with the vsphere client.

Or you can enable SSH on the Vhost
Use WinSCP.exe and do this all via a GUI interface.

All you need to know is were the VM is stored (aka which datastore) the userid and pwd into the vhost.
Login with WinSCP browse to VMFS/Volumes/VMName
Find the VMName.vmx file, right-click it and choose edit and then
In the first line you will see:
virtualHW.version = "10" Change that to be virtualHW.version = "9" now save the file.
It will now be version 9 and you can now edit it with the vsphere client.
the Power on the VM.

How to convert a Vmware VM disk from IDE to SCSI

from the vmware KB library

kb.vmware.com will get you there but I will put them here as well but in more precise terms..

  1. Enable SSH on the vhost that the VM resides on.
  2. Install the Vmware tools if not already installed and power OFF the virtual machine.
  3. From the Edit Settings menu for this virtual machine:
    • Click Add > Hard Disk > Create New Virtual Disk.
    • Change the Capacity to 1GB and click Next.
    • Make sure the Virtual Device Node is checked and set to SCSI.(0:0)
    • Complete the wizard
    • Select the New SCSI Controller. If the current type is not LSI Logic Parallel Select Change Type, change the type to LSI Logic Parallel.
    •  Click OK.
  4. Power on the virtual machine and log on.
  5. Power off the virtual machine.
  6. Locate the datastore path where the virtual machine resides by editing the VM and looking at the path to the Disk you are wanting to change from IDE to SCSI,/vmfs/volumes/<datastore_name>/<vm_name>/
  7. Using WinSCP put in the IP address of the vhost, UserID and PWD and choose SFTP and login
  8. Browse to vmfs/voulumes/VMname/VMname.vmdk
  9. Right click the VMname.vmdk file and choose edit
  10. Look for the line:ddb.adapterType = "ide"
  11. To change the adapter type to LSI Logic change the line to:
    ddb.adapterType = "lsilogic"

    In some rare instances the entry will appear as ddb.adapterType = "legacyESX". In this case change the line to:

    ddb.adapterType = "lsilogic"
  12. Save the file. 
  13. From VMware Infrastructure/vSphere Client:
    1. Click Edit Settings for the virtual machine.
    2. Select the IDE virtual disk.
    3. Choose to Remove the Disk from the virtual machine.
    4. Click OK.

      CautionDo not choose delete from disk.
  14. From the Edit Settings menu for this virtual machine:
    1. Click Add > Hard Disk > Use Existing Virtual Disk.
    2. Navigate to the location of the disk and select to add it into the virtual machine.
    3. Choose the same controller as in Step 9 as the adapter type. The SCSI ID should read SCSI 0:0.
  15. If a CDROM device exists in the virtual machine it may need to have the IDE channel adjusted from IDE 0:1 to IDE 0:0. If this option is greyed out, remove the CD-ROM from the virtual machine and add it back. This sets it to IDE 0:0 or SCSI (0:1)
  16. Start the VM and you should now have a SCSI disk.

Be sure to always install the VMware tools onto a VM. It is a really big help with the video and mouse but you get a faster better NIC.

Once you have created a VM or converted a physical machine to a VM.  (Note: if it was a physical machine you need to uninstall all the drivers and software that were specific to the physical machines hardware as it will just be wasted resources ad they no longer exist.)

Installing VMware tools requires a reboot so do it early in your process or if you used vmware converter you can choose to automatically install it during the VM cloning process. In this case I am assuming you built the VM from an ISO file. While in vsphere you need to right-click the VM and choose Open Console, then choose VM, Guest, Install/upgrade VMware Tools. Now simply choose VM, Guest, Send Ctrl+Alt+Del and log onto the vm and follow the prompts. If it does not auto-start the VMware Tools CD, then use explorer to go the the D: drive and run the exe from there for the appropriate OS type. If you do not have a CD drive you need to add one to the VM. Once it is installed it will ask you to reboot, say yes and reboot.
Once the VM has rebooted you can power it off and then edit it by right-clicking and choosing Edit Settings.
Remove the E1000 NIC and add a new NIC the VMXNET 3. The e1000 NIC has issues and is slower than the VMXnet 3. Start your VM and add your IP and turn off the firewall and allow RDP and you can now access the VM remotely.

Setting VMware VM to AUTOSTART with the vhost.

Click on the configuration TAB and then choose the Virtual Machine Startup/Shutdown on lower left.

Then choose properties (light blue in upper right )

Click on server name under Manual Startup and then click the Move UP button. Once it is moved you can click OK.


Using the Notes field for a VM to help with reports and knowing what that VM is and or does

Once you have a VM built and you are using vsphere you can add a note to the VM so you know what is is or does.

When you complete the server creation you will click on the Virtual Servers Tab and then click in the Notes space at the end of the server.
It will open a small dialog box, input the required data and then click in the white area out of the dialog box to save the information added.


NOTES: FYI
When you create a server in either Hyper-V or VMware what you name the server in the VM management tool is not the servers real name, so you can call it anything,  or make it as long as the VM manager allows. The Real Server name is the name it is give within the windows OS.


In VMware if you are in the Virtual Machines Tab you can right-click the Column header bar and edit what you see or do not want to see.  This is handy because if you allow the IP Address and one does not show up, you will know that the VMware Tools has not be installed or needs re-installed to repair an issue. Also you can see I want to see how much memory and CPU’s are assigned per server.

how to set the SNMP community for a vhost with WinSCP

Make sure SSH and SNMPd are running on the Vhost.
SNMPd is started by default if it fails to start do this kb.vmware.com it will fix the issue.
SSH is not enable by default so you must enable it, to enable SSH while remoted to the vhost via vsphere client (you can download the vsphere client from the vhost by pointing a web browser at the IP of the vhost), In the configuration tab, choose "Security Profile" click properties (upper right) scroll to SSH and highlight it and then click the Options button, click Start, click OK, click OK. SSH is now running and when you reboot it will not be started. If you want it started and running all the time you need to have changed the option to start and stop with server..

Then you start WwinSCP from a machine that can see the VHost on the network
Input the name or IP of the VHost
Input your Userid = usually root
Input your password
Choose SFTP
Click Login

if it says there is a connection error you either did not enable SSH on the vhost or your not on the same network as the vhost.

If it asks you a really long question answer yes, now you will see a explorer like window and you can now find the Dell Open Manage install file (usually a zip file) and copy to the vhost. I usually put it into /var/log/vmware, once the file is uploaded, you need to install the package. to do this simply click the little dark sqaure with HOM in it on under the texts menu. Click OK and it will open a console window on the vhost. now you just need to copy and paste your SNMP settings one line at a time. 

Example:
esxcli system snmp set --communities "COMMUNITY_NAME_HERE"
esxcli system snmp set --enable true
esxcli system snmp get 

First line is the SNMP Community name
Second line enables and load SNMP services with the name you just set
Third line show you the SNMP community and that SNMP services are running.

How to access the vmware vhost and upload files and or install those files.

Ok so I work Dell servers and as such we install the free product call Dell Open manage.  The best way to get the install package to the server and then install it is by enabling SSH on the vhost and using a product WinSCP. You can get it here http://winscp.net/eng/download.php and also get Putty there is you need an easy product to manage your firewalls etc.

SSH is not enable by default so you must enable it, to enable SSH while remoted to the vhost via vsphere client (you can download the vsphere client from the vhost by pointing a web browser at the IP of the vhost), In the configuration tab, choose "Security Profile" click properties (upper right) scroll to SSH and highlight it and then click the Options button, click Start, click OK, click OK. SSH is now running and when you reboot it will not be started. If you want it started and running all the time you need to have changed the option to start and stop with server..

Then you start WwinSCP from a machine that can see the VHost on the network
Input the name or IP of the VHost
Input your Userid = usually root
Input your password
Choose SFTP
Click Login

if it says there is a connection error you either did not enable SSH on the vhost or your not on the same network as the vhost.

If it asks you a really long question answer yes, now you will see a explorer like window and you can now find the Dell Open Manage install file (usually a zip file) and copy to the vhost. I usually put it into /var/log/vmware, once the file is uploaded, you need to install the package. to do this simply click the little dark sqaure with HOM in it on under the texts menu. Click OK and it will open a console window on the vhost. now you just need to copy and paste the install command esxcli software vib install -d /var/log/vmware/OM-SrvAdmin-Dell-Web-7.1.0-5304.VIB-ESX50i_A00.zip (note edit the file name to the current version) click Exceute and it will install the Dell Open manage package and you will need to rebot the vhost.

Best free tool from vmware is vmware converter

If you do not know about vmware converter you are either new at vmware or brain dead, however I feel it would be remiss of me to not mention it for any newbies.

So here is the link http://www.vmware.com/products/converter if want to learn more about what vmnware converter is download and read the user guide.

Brief over view:
VMware vCenter Converter Standalone is a scalable solution to convert virtual and physical machines to
VMware virtual machines. You can also configure existing virtual machines in your vCenter Server
environment.

Converter Standalone eases the exchange of virtual machines among the following products.

  • VMware hosted products can be both conversion sources and conversion destinations.
  • VMware Workstation
  • VMware Fusion™
  • VMware Server
  • VMware Player
  • Virtual machines running on an ESX instance that vCenter Server manages can be both conversion sources
  • and conversion destinations.
  • Virtual machines running on unmanaged ESX hosts can be both conversion sources and conversion
  • destinations.
  • You can also use VMware Consolidated Backup (VCB) images to create VMware virtual machines.

I use it to clone VM's and to make Physical Servers into VM's (remember if you make a physical into a virtual you need to uninstall the video and NIC type special driver manager stuff from the VM as it will just be wasting resources on your VM). I also use it to move a VM from one vhost to another if you do not have Vcenter and I have used it to change the drive size of IDE hard drives to large or smaller as needed.

NOTE: unless you have vcenter or vsphere web client  DO NOT MAKE THE VM's VERSION 10 as version 10 can only be edited from the vsphere web client or the powerCLI command line. Make them version 9 or less. However there is a post about how to convert a version 10 to 9 in this blog.

Free tool to find your ESXI hosts.

WMware Scanner is a must have if you need to see who or what Vmware vhosts are out on your network.

http://www.run-virtual.com/?page_id=38 this is the link, there are several other apps you might find useful.

When you run this app, just input the IP range to scan and it will scan and report any vmware vhosts is finds in a file it will write in the directory from which the app was launched called vmw_servers.txt.

SAMPLE OF FILE
100.1.101.13, VMware ESXi 5.5.0 build-1746018
100.1.101.36, VMware ESXi 5.5.0 build-1746018
100.1.101.12, VMware ESXi 5.5.0 build-1746018
100.1.101.156, VMware ESXi 5.0.0 build-469512

It does not return the name but it will give you the LAN IP and version of vmware.

This blog is about the cool apps or work arounds or scripts I find that make my life eaiser. --- Highlighting RVTOOLS

So far I have been involved in Hyper-v and Vmware and I been recently introduced into the VCenter and PowerCLI. So mostly I will be blogging about my discoveries and Powershell and PowerCLI scripts.

First App that is a must for any vmware user is the best free tool I have ever found, well I once found a really nice set of pump pliers on the side of the road that I still use all the time, but the best software tool I have ever found for vmware ESXi and VCenter is RVTools located at http://www.robware.net/. This reporting tool is by far the single greatest find I have ever used.

RVTools is a windows .NET 2.0 application which uses the VI SDK to display information about your virtual machines and ESX hosts. Interacting with VirtualCenter 2.5, ESX Server 3.5, ESX Server 3i, VirtualCenter 4.x, ESX Server 4.x, VirtualCenter 5.0, VirtualCenter Appliance, ESX Server 5.0, VirtualCenter 5.1, ESX Server 5.1, VirtualCenter 5.5, ESX Server 5.5. RVTools is able to list information about VMs, CPU, Memory, Disks, Partitions, Network, Floppy drives, CD drives, Snapshots, VMware tools, Resource pools, Clusters, ESX hosts, HBAs, Nics, Switches, Ports, Distributed Switches, Distributed Ports, Service consoles, VM Kernels, Datastores, Multipath info and health checks. With RVTools you can disconnect the cd-rom or floppy drives from the virtual machines and RVTools is able to update the VMware Tools installed inside each virtual machine to the latest version.

Download it, point it at the IP of your standalone ESXi host or Vcenter server and you will have the most info you can get with little or no effort from vmware about the host and the VM's. Not to mention the cool features listed in the last sentence of the above paragraph.