Showing posts with label VI3. Show all posts
Showing posts with label VI3. Show all posts

Wednesday, January 13, 2010

Creating VMware NFS Datastores on NetApp in 3 Easy Steps

I am often asked by customers how to set up a VMware NFS datastore on NetApp storage.  The first time I received the question, I pointed them to the NetApp vSphere TR.  It turns out the information isn't currently in the document.  I spoke to Vaughn about it and this was an over site that will be corrected.  In the meantime, here is how I create NFS shares in 3 easy steps. I'm also taking screenshots from my lab for the first time, let me know what you think of the screenshot format vs. just a bullet list.

Step One - Create the volume on the NetApp system
  •  Log into FilerView, Open Volumes, Click Add -> Click Next
  • Accept the default value of Flexible Volume and Click Next
  • Create a name for the volume, set the language type, and click Next
  • Choose which aggregate to create the volume in and click Next
  • Set the size of the Volume, please notice the pull down defaults to MB NOT GB!, I typically don't set a Snap Reserve but if you don't understand the implications of this, just use the default of 20%. Click Next

  • Click Commit
  • Click Volumes -> Manage to and you will see the newly created volume


  • If your NetApp system has been configured for CIFs, you will need to make a slight change to the Q-Tree type of the volume.  Click Volumes -> QTrees -> Manage.  If the QTree type is UNIX, skip to Step Two.  If the QTree type is NTFS, proceed.

  • Click on the volume link (sim3_vmware_01 in this example) to get the following screen
  • Change the QTree type to UNIX and click Apply

Step Two - Create the NFS Export (Share the Volume)
  •  Click NFS -> Manage Exports -> Click on the Permissions for the newly created volume


  •  Make sure Read-Write Access, Root Access, and Security are all checked. Click Next

  • Click Next at the Export Path Screen but write down this path, you will need it later!
  • At the Read-Write Access Screen, uncheck the All Hosts box and enter the ip addresses of all the VMkernel ports for the vSphere server(s).  NOTE: This is not the Service Console IP address, it is the VMkernel ip address that vSphere will use to "talk" NFS to the storage
  • Repeat this process for the Root Access Screen and click Next
  • Click Next at the Security Menu accepting the defaults
  •  Click Commit. You are now finished configuring the NetApp System!
Step Three - Create the share in vCenter

  • From the vCenter Client, Click on a vSphere server and click the configuration tab. Click Storage, Click Add Storage

  • Choose Network File System and Click Next
  • Enter the IP address of the NetApp Storage, the path to the export that you wrote down from step 2, and give your datastore a name as it will appear in vCenter

  • You should now see your storage


UPDATE: I was hoping to stay away from the command line for this article.  This was really designed for users that are just beginning to get their feet wet with NFS.  But, as Mike pointed out, there is one command that should be run on each volume and this can only be achieved from the command line.  It is outlined on page 37 of the 1.0 version of the TR.  The command is: vol options (volume-name) no_atime_update on where volume name is the name of the volume (sim3_vmware_01 in my example).  Thank you for pointing that out Mike!


A few final notes.  Once all of this is complete I usually test read/write access by pulling up the datastore browser and creating a folder in the datastore and then deleting it.  Also, if the datastore will be protected by NetApp's Snap Manager for Virtual Infrastructure then I will disable snapshots.  This is all detailed in Vaughn's vSphere TR.

Monday, January 5, 2009

How to Configure VMWare Update Manager to Only Download ESX Updates

By default, VMWare Update Manager is configured to download updates for Windows, Linux, and ESX. If you only plan to update ESX servers with Update Manager, this can waste a lot of disk space. To configure Update Manager to only download ESX updates, do the following:
  1. From the VI Client, Click the Scheduled Tasks Button at the top
  2. Right click the Update Manager Update Download task
  3. Click Properties
  4. Under Select Update Types, uncheck Windows and Linux. Click Next
  5. Optionally you can modify the additional task parameters as needed (time to download, e-mail notification, etc)
  6. Click Finish

VMWare Update Manager Configuration Best Practices?

Judging by the number of posts recently, it is no surprise that I haven’t seen a lot of good documentation surrounding VMWare Update Manager. One thing I haven’t seen is a best practices on how to configure Update Manager. Here is a list of the options and some thoughts on setting for each one.
  1. To access the configuration settings, Click the Update Manager Button
  2. Click the Configuration Tab in Update Manager
  3. Guest Settings -> By default this will take a snapshot of guests but not delete them. This can degrade performance. Consider not taking snapshots or have them autodelete after a certain number of hours (Max appears to be 100 hours)
  4. ESX Host Settings -> By default the response of ESX hosts that can not enter maintenance mode is to retry every 30 minutes but the number of times is set for zero. That doesn’t make sense to me. Consider setting the value to 1 or 2 and setting the time as appropriate for your environment. In addition to retry as an action, you can also Fail Task, Power Off and Retry, or Suspend and Retry
  5. Update Downloads -> Click Update Downloads in the upper right corner

    • Under Select Update Types, check the boxes for the OS’s you will update. By default, Windows, Linux and ESX are all checked. If you are only going to update ESX servers, uncheck Windows and Linux. Click Next.
    • Under Schedule Task, enter the parameters for the scheduled download task and click Next
    • Under E-mail Notification, optionally enter the e-mail addresses to be notified when new updates are downloaded and click Next
    • Click Finish

You can also modify the Internet Settings if you have a proxy server and/or modify the ports Update Manager uses. I will assume this is self explanatory.

How to Start a VMWare Update Manager Download Immediately

By default, VMWare Update Manager only checks for updates once a week. To initiate a download immediately, perform the following:
  1. From the VI Client, Click the Scheduled Tasks Button at the top
  2. Right click the Update Manager Update Download task
  3. Click Run

VMWare Update Manager Set Up - Cheat Sheet

In my humble opinion, the VMWare Update Manager Documentation isn’t the greatest. So, I have developed this cheat sheet to help me set it up. I will also be posting more information on configuration of Update Manager shortly.
  1. From the Virtual Center Client, click the Update Manager Button
  2. From the Getting Started Tab, click Create A New Baseline
  3. Enter a name and description for the baseline (i.e ESX Hosts)
  4. Click ESX Server Updates for the Baseline Target and click Next
  5. Click Next to leave the Baseline Type to Dynamic
  6. Click Next to leave the Criteria at the defaults
  7. Click Finish
  8. From the Virtual Center Client, click the Inventory Button
  9. Select a host to configure in the left hand pane
  10. Once a host has been selected, click the Update Manager tab all the way on the right in the right hand window (next to maps)
  11. Click Attach Baseline
  12. Select the Baseline created above and click Ok
  13. Right Click the host in the left hand pane and select Scan for Updates
  14. Click Yes to confirm the scan
  15. After the scan is complete, click the Update Manager tab for the host (not the button at the top!) to determine if the server is compliant
  16. If the server is not compliant, right click the host in the left hand pane and select Remediate
  17. From the Baselines page, check the baseline you would like to apply and click Next
  18. Check all patches you would like to apply and click Next
  19. Choose the Remediation Time and the Failure Options and click Next
  20. Click Finish

Convert Evaluation Virtual Center to a Full License

I have performed the process to license Virtual Center numerous times for customers but sometimes I forget the order. Here ya go…
  1. Copy the license key files into c:\program files\vmware\vmware license server\licenses
  2. Restart the VMWare License Server service
  3. From the Virtual Center Client, Administration Menu -> VirtualCenter Management Server Configuration
  4. From the License Server entry, choose the appropriate license server destination (this server by default)
  5. From the License Server entry, choose the appropriate type of VC Server (VC Server or VC Foundation Server)
  6. Click OK

ESX Engineer Configuration Commands Cheat Sheet

I periodically set up ESX servers for customers. Over time I have developed a document that helps me when I am performing configurations on-site. This is by no means an inclusive list of commands, this is more a brain dump for me so I have access to this in case my laptop isn’t handy. If anybody has any additions, I would love to hear them!!

  • Edit an ESX server to allow root SSH and SFTP access


    • vi /etc/ssh/sshd_config
    • Change PermitRootLogin no to yes
    • Restart ssh service using the command: service sshd restart

  • Edit an ESX Server for NTP access (Internet in this case, could be a customer NTP server)


    • vi /etc/ntp.conf
    • Change OUR TIMESERVERS section, enter the server names – For the Internet use the following:


      • server 0.us.pool.ntp.org
      • server 1.us.pool.ntp.org
      • server 2.us.pool.ntp.org

    • Pipe the NTP Servers into step-tickers so NTP will update at NTP start using the following the commands:


      • Echo 0.us.pool.ntp.org >> /etc/ntp/step-tickers
      • Echo 1.us.pool.ntp.org >> /etc/ntp/step-tickers
      • Echo 2.us.pool.ntp.org >> /etc/ntp/step-tickers

    • Set NTP to start: chkconfig ntpd on
    • Set ESX Firewall to allow NTP Traffic: esxcfg-firewall –e ntpClient
    • Run an manual update: ntpdate 0.us.pool.ntp.org

  • Patch the ESX Server with the latest patches (Update Manager is MUCH easier!)
  • NOTE: The patches must be installed in “groups” based on their date starting with the oldest to the newest (i.e. apply the Septmber 9th patches, then the September 21st patches, etc)



    • SFTP the Patches into a directory on the server
    • Change into the folder and run the following as root
    • For ESX 3.0.X: tar –xvzf (name of patch).tgz
    • For ESX 3.5.X: unzip *.zip
    • change into the directory it creates
    • esxupdate –(2 dashes)noreboot update
    • change back to the root patch folder, rinse, repeat
    • When complete enter the following command to check the patch status: esxupdate query

  • Commands to change the server ip, name, dns, gatewat, etc.


    • To check the config of the server from the command line: esxcfg-info
    • To check the vSwitch settings from the command line: esxcfg-nics -l
    • To change the hostname of the server or the default gateway


      • vi /etc/sysconfig/network
      • vi /etc/hosts with the new name

    • To change the DNS entries of the ESX server: vi /etc/resolv.conf
    • To change the IP Address and the Subnet Mask of the ESX Server:


      • esxcfg-vswif –i (IP Address) –n (Subnet Mask) (vswitch-name -> vswif0 for the Service Console by default)

    • To change the VLAN tag of the service console port:


      • esxcfg-vswitch vSwitch0 –p “Service Console” –v (VLAN NUMBER)

    • NOTE: If you modify the above settings, make sure you also modify the network section of the /root/anaconda-ks.cfg file as well (ESX 3.5 only)
    • To see what services the ESX firewall will allow: esxcfg-firewall –s
    • To change the root password from the command line: passwd
    • If you have changed the ip address or name and HA is acting up:


      • /opt/vmware/aam/bin/ft_gethostbyname
      • rename and/or delete FT_HOSTS file under /etc/opt/vmware/aam/




      Scott has more information at this link for network configuration.

Getting ESX Remote SSH Access without Root enabled



This is obvious to the experienced Linux admins out there but I wanted to pass this along. Let’s say you have a remote ESX server with SSH access to root disabled (the default). You now realize you need access and you have no other way to get into the box (no remote KVM, warm body on-site, etc.). You can connect to the box and gain root access in the following way:
  1. Connect to the web interface of the ESX server using the VI Client with root credentials.
  2. Create a user level account on the machine.
  3. SSH into the box using the newly created user account.
  4. At the SSH prompt, type su and press enter.
  5. You will be prompted for the root password.
After this, you will have remote access at root level to the box. For Linux challenged out there, su stands for Super User and grants you access at the root level to the box.