vmware

ESX 4 – Windows 7 VM cannot connect via RDP

Posted on Updated on

Today I noticed when rebooting my Windows 7 VM under ESX 4 remote desktop would not allow connections until I logged on locally.

I also noticed vCenter Server reported VMTools wasn’t running.

 

I did a bit of research and found that Remote Desktop Services was in manual mode.
By changing the startup type to Automatic it not only fixed the Remote Desktop issue but vCenter Server reported in properly as well.

ESX 3.5 – Network DNS Settings

Posted on Updated on

Here’s the quick way to see your DNS settings from command line..

cat /etc/resolv.conf

ESX 3.5 – Keyboard Issues displaying wrong characters

Posted on Updated on

I ran into an issue getting an ESX 3.5 server to join a Virtual Center 2.5 server today..

For some reason I couldn’t get it to join my VC server and when I tried to I would get the error bad password or user name. Connecting the VI client straight to the server failed, trying to use the web interface failed, but I could remote into the server via an IP KVM and log on without issue.

What I found was my keyboard map on this individual server was set to UK and not US.

Here is how I resolved this issue.

Logged in to the host as root

cd /etc/sysconfig
vi keyboard
Press esc twice
Press insert to edit
Changed KEYTABLE=”uk″ to KEYTABLE=”us″
Press esc twice
Enter :qw > to save the file and exit
Reboot the ESX server
And now it works like a champ..

Book – VMware vSphere 4.0 Quickstart Guide

Posted on Updated on

I bought this book today… based on some blog posts I found (see below).
I must say it is one of the best.. It is a pocket reference so be aware the print is a bit small…

Download the Power-CLI Scripts from the book here…
http://www.yellow-bricks.com/wp-content/uploads/quickstartguide.zip

Here are some notes about the book.. From this URL…
http://www.boche.net/blog/index.php/2009/11/23/vsphere-4-0-quick-start-guide-released-on-amazon/

What a great way to kick off the new week – The highly anticipated book, vSphere 4.0 Quick Start Guide: Shortcuts down the path of Virtualization, has arrived at Amazon.com! I look at this new release as the 2nd edition or vSphere edition of RapidApp’s Quick Start Guide to ESX 3.0 which is still available and was a huge success.

The vSphere 4.0 Quick Start Guide was written by a lineup of new authors who are well known rock stars in the virtualization community: Bernie Baker, Thomas Bryant, Duncan Epping, Dave Mischenko, Stewart Radnidge, and Alan Renouf. I obtained a preview copy of this book at VMworld 2009 in San Francisco and I can tell you that this it is absolutely amazing. Nowhere else will you find as much information in such a small and convenient footprint. Its small size allows you to put it in your pocket and take it virtually anywhere: On the plane, on the bus, into a meeting, or into the datacenter. As with the first edition, there are several blank pages in this book which allow you space to write down notes, command line information, configuration maximum changes, information about your environment, helpful URLs, etc. The authors did a great job on this book and considering the cumulative years of experience and combined expertise packed into this book, you can’t beat the price. I don’t think a better value exists. My copy has been traveling with me daily in my laptop bag. I give it two thumbs up.

ESX 3.5 – 5 critical vmware esx cli network commands

Posted on Updated on

I found this really cool article today… It’s not my work, but it is a great reference…

http://www.petri.co.il/5-critical-vmware-esx-cli-network-commands.htm

5 Critical VMware ESX CLI Network Troubleshooting Commands
by David Davis, vExpert, VCP, CCIE 9369 – December 23, 2008

Have you ever made a change to your VMware ESX Server Network configuration using the Virtual Infrastructure (VI) Client and then lost communications with the server? If you had to go to the ESX Service console to troubleshoot the virtual network configuration, would you know the commands to do it? In this article, you will learn the 5 most critical ESX CLI commands you need to know to troubleshoot networking issues.
#1) service network restart
The service X restart command is an excellent command that allows you to restart any service running on your ESX Server. In our case, we are using the network keyword to restart network services. This is the command you should run after making changes to your ESX networking configuration. You can also do network start or network stop. This brings down all network interfaces, then brings up the interfaces configured to start at boot.

#2) ifconfig
The second command is ifconfig. Similar to the Windows command, ipconfig, this command is used to view the status of all network interfaces on the system. However, it can do a lot more than just view an interface, it can reconfigure interfaces, bring them down, or back up. You can change the IP address of your interfaces with ifconfig.

#3) esxcfg-vswif
Next, we have the ESX command that allows you to view the status of or reconfigure the VMware Service console network interface. That SC network interface is called “vswif” and the first interface is always “vwsif0”. To view the status of it, you can use the -l (L for list)
#4) esxcfg-vswitch
The fourth command on the list is the esxcfg-vswitch command. This command is used to view the status of or reconfigure the VMware virtual switches (called vswitch). These vswitches are used to connect the physical NIC in the server (called vmnic) to the ESX port groups (such as the “Service Console” and the “VM Network” port groups). To view the status of your vswitches, you can use the -l (L for list) command, like this:

#5) esxcfg-nics
Lastly, we have the esxcfg-nics command. This command is used to view the status of or reconfigure the VMware Physical Network interface cards that are installed in the physical server. These physical NICs are called “vmnic” and they start with “vmnic0”. The vmnics are connected to vswitches to connect the physical network to the virtual networks.
To view the status of your vmnics, you can use the -l (L for list) command,
Summary
Believe me, there was a time that I was stuck at the ESX service console interface, trying to resolve a networking issues, and struggling to find the right commands to do it. I hope that you will save this URL or print this article to keep it handy the next time you are in a similar situation because that know that these 5 commands can help you get out of any VMware ESX Server networking configuration or troubleshooting issue.

ESX 3.5 – Change the default gateway

Posted on Updated on

From the command prompt enter
Netstat –nr — this Command will help you to id the actual gateway address

You now need to change your default gateway, you can do this by editing the network file located at /etc/sysconfig/network. To do this at the command prompt, follow the steps below.

“cd /etc/sysconfig”
“vi network”

Then while in vi, go to the location of the default gateway using the arrow keys.
Hit “i” which will perform an insert and change the default gateway to your liking.
Hit the escape key twice to exit insert mode.
type “:wq” to write (i.e save) and quit.

ESX 3.5 – Remove a PortGroup

Posted on Updated on

During the graphical installation of ESX 3.5 there is a single checkbox that states “Create Network for Virtual Machines” Usually I uncheck this box and create a new vSwitch for VM’s

However, if you don’t uncheck this box it will create the portgroup “VM Network” on the same vSwitch as the “Service Console” port group. If you run vCenter Server it’s easy enough to repair, however here is how it’s done from the console level…

Here is how you remove it from command line…

Esxcfg-vswtich –l –Show all the vSwitches and associated portgroups
Esxcfg-vswtich vSwitch0 –D “VM Network” – Actually Removes it

Here is the actual output…

ESX 3.5 – Change a VLAN Tag on a PortGroup

Posted on Updated on

I setup 4 ESX servers the other day and the wrong vlan tag was entered. MyLAN admin is out of the office, so I have two choices… One Bug him like crazy (Calls and Emails) or two wait till he returns to change the VLAN tag
I like Option 3 – Change the VLAN tag myself…
I found this here and it work perfectly…
http://www.geekshangout.com/?q=node/17

Check which vSwitch the Service Console is on (and the name of the Service Console) with esxcfg-vswitch -l
To remove the vlan id completely, just set it to 0 (in case you have set it by accident on an access port)
esxcfg-vswitch vSwitch0 -v 0 -p “Service Console”
To set a vlan id on the service console (in case you forgot to define this during the installation)
esxcfg-vswitch vSwitch0 -v X -p “Service Console” (enter the vlan number where X is)

Here is my actual output (VLAN tags have been changed to protect the innocent!)

ESX 3.5 – NTP Time Server Restart

Posted on Updated on

I found the following commands to work really well when you need to restart your NTP sevice on your ESX server.

Logon to the console level..

Commands >> Effect
# service ntpd restart >> Restart the service.
# chkconfig –level 345 ntpd on >> Enable the NTP daemon to autostart when the server is rebooted.
# hwclock –systohc >> Set the local hardware clock to the NTP synchronized local system time.

#hwclock –show {Press Enter} << Shows you the current clock
Fri 23 Apr 2010 08:17:41 AM MST -0.989683 seconds

ESX 3.5 – Partitions

Posted on Updated on

I get asked this question many times… what are the best practices for partitions with ESX 3.5.

Here are the settings that I use…

Setting primary partitions
Best practices state that the following partitions should be made “Primary” partitions:
Table 3 – Primary Partitions
Mount Point Partition Type Size in MB
/boot ext3 100 MB
/ ext3 2048 MB
N/A swap 1600 MB

This can be accomplished by selecting each of the aforementioned partitions (one at a time) and clicking the “Edit” button. The configuration options for that partition/file system will be brought up. Select (turn on) the checkbox option near the bottom of the box labeled “Force to be a primary partition”. Do this for each of 3 file systems listed above, clicking “OK” after fixing each file system.

Configuring partitions
The following table adheres to VMware best practices:

Extended Partitions
Mount Point Partition Type Size in MB
/var ext3 4096 MB
/tmp ext3 1024 MB
/opt ext3 2048 MB
/home ext3 1024 MB
vmkcore 100 MB
N/A vmfs Remaining space