VMware

Backing Up vCenter SQL 2005 Express Database

Download SQLScheduler from here or here

 

Follow the instructions from ntpro.nl to configure the backup process or the steps below.

 

Extract the zip file to a folder SQLMaintenance – SQLScheduler_LatestVersion – Service.

Run – InstallService.bat to install the Windows Service.

Create a shortcut from SQLMaintenance – SQLScheduler_LatestVersion – SQLScheduler – SQLScheduler.exe to the desktop.

Run SQLScheduler.exe

Right click Servers – Select New Server…

(continue reading…)


How to Power off an unresponsive virtual machine

SSH or PowerCLI to the ESX host with the unresponsive VM

 

vmware-cmd -l (List current VMs)

Copy the path for the VM that will not power off

 

vmware-cmd "(VM path)" getstate

Example:
vmware-cmd "/vmfs/volumes/…../Windows 2003/Windows 2003.vmx" getstate
Output will be: getstate – on

 

Power off the VM
vmware-cmd "(VM path)" stop

Example:
vmware-cmd "/vmfs/volumes/…../Windows 2003/Windows 2003.vmx" stop

 

Verify if the VM powered off

vmware-cmd "(VM path)" getstate

 

If the VM is still on it will need to be hard stopped.

vmware-cmd "(VM path)" stop hard


Build a 2003 Template

1) Download the latest version of sysprep for Windows 2003 from Microsoft or from Deploy.cab on the Windows 2003 CD under the Support folder.

2) Copy the extracted sysprep files to the Virtual Center server.

Place the files in this location:

For 2003 – C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\svr2003 or For 2008 – C:\ProgramData\VMware\VMware VirtualCenter\sysprep

This location is specific to the 2003 version of Windows.

3) Install Windows 2003 as a guest OS in VMware

Apply latest Service Pack

Install latest updates from Microsoft

Install VMWare Tools

Custom install

Install all VMware Device Drivers

Do not install Share Folders

Do no install Wyse Multimedia Support

Use DHCP to obtain IP Address

Delete all ServicePack and Hotfix uninstall directories from %systemroot%.

They are usually $NTUnistallxxxxxx$ and $NTServicePackUninstall$

Disable Windows Screensaver

Enable Remote Desktop for administration

Remove IE Security Enhancements

 

Tasks that cannot be done because of Sysprep

The follow items have been found to be undone by sysprep

Changing drive letters for CDRom, secondary HD, etc

Renaming or customizing Network Connections

 

Notes:

Windows 2003 R2: Use the same customization specification for this OS as your regular Windows 2003.  Do not use the Windows 2003 R2 license key in the customization specification.

 

Align Windows Disks:

(Use this on additional disk drives added to VMs. Does not apply to 2008 or above)

From a command prompt:

  • CMD>diskpart

  • DISKPART> list disk (disks should be listed)

  • DISKPART> select disk # (This selects the disk drive)

  • DISKPART> list partition (This step should result in a message stating “There are no partitions on this disk to show.” This message confirms the disk is blank)

  • DISKPART> create partition primary align=64

  • Format the disk


  • vCenter on Server 2008 – Sysprep file locations

    On Windows 2008 this location is now in C:\ProgramData\VMware\VMware VirtualCenter\sysprep


    Build a 2008/2008 R2 Template

    http://jeremywaldrop.wordpress.com/2008/10/28/how-to-build-a-windows-2008-vmware-esx-vm-template/

     

    NOTE – VMware Virtual Center 2.5 Update 4 or vCenter 4 is required to use Guest Customizations with Windows 2008.

    1. Use an ISO for faster OS setup.

    2. Build a new VM that has at least 1 GB RAM and a 20 GB drive.

    3. Attach the Windows 2008 ISO to the CD/DVD drive and set it to connect at power on.

    (continue reading…)


    vSphere Jumbo Frames vDS and Multi-Pathing

    Original post on Mike’s SysAdmin Blog

    vSphere: Software iSCSI, Jumbo Frames, Distributed Virtual Switches and Multi-Pathing (MPIO)

      With the release of vSphere Update 1, we can now take advantage of Software iSCSI MPIO using the new DvSwitch functionality in vSphere.  Before now, we were limited to only being able to do MPIO on a standard vSwitch.  Using a DvSwitch is a little more involved, here are the steps to set-up the DvSwitch, MPIO and Jumbo Frames: (Please let me know if anything is unclear or incorrect!).

      1. Create a new DvSwitch.  We called ours “Storage_dvSwitch”.
      2. After creating your new DvSwitch, Edit the settings and change the Max MTU to 9000 to support Jumbo frames.

      3. Now create 2 (or however many you want) new Port Groups.  Nothing special here, we named ours iSCSI1 and iSCSI2.  VLAN configuration may vary depending on network configurations.
      4. This part is important – we need to set-up the pNIC fail-over settings properly.  You should have ONE active dvUplink per iSCSI port-group, NO standby NICs and the remaining NICs should be Unused.  Each port-group should get a different dvUplink. This can be changed in the port-group settings page.
      5. This concludes the vCenter specific configuration.  The following steps will apply to EACH host that you plan to use with Jumbo frames.
      6. If you haven’t already, you will need to add the Host’s physical NIC’s to the new DvSwitch we created. You can do this from the ‘Add Host’ link on the DvSwitch summary page.
      7. Now we need to create 1 VMkernel port for each Port-Group we created. This is done in the HOST configuration tab, in the Networking section. Select the ‘Distributed Virtual Switch’ view and click the ‘Manage Virtual Adapters…’ link.
      8. Click ‘Add’ and add one VMkernel port to each iSCSI port-group you created on the storage DvSwitch.  There may be some benefits to over-subscription here (many VMkernel ports on 1 port-group), but that will vary by environment.  When you are done, your Port-Groups should look something like this:
      9. Now we need to find the Port number assigned to each vmk port.  You can either click the ‘i’ icons next to each vmk port or by running “esxcfg-vswitch -l” from the CLI.  In this example, vmk1 has a port ID of 1, and vmk2 has a port ID of 129.
      10. Now, from the CLI, delete the VMkernel ports you just created in the GUI (Awesome, isn’t it?) by running “esxcfg-vmknic -d -s ‘<your dv switch name>’ -v <dv port number>”.  You will need to run this for each VMkernel port you created.  So in our example, it would be:
        • esxcfg-vmknic -d -s ‘Storage_dvSwitch’ -v 1
        • esxcfg-vmknic -d -s ‘Storage_dvSwitch’ -v 129
      11. Now re-add the VMkernel ports (using the port numbers you just deleted) with jumbo frames enabled by running: “esxcfg-vmknic -a -s ‘<your dv switch name>’ -i <ip addr> -n <subnet> -m 9000 -v <dv port number>”.  So in our example:
        • esxcfg-vmknic -a -s ‘Storage_dvSwitch’ -i 10.255.38.151 -n 255.255.255.0 -m 9000 -v 1
        • esxcfg-vmknic -a -s ‘Storage_dvSwitch’ -i 10.255.38.201 -n 255.255.255.0 -m 9000 -v 129
      12. Enable the software iSCSI initiator if you haven’t already and find the vmhba number assigned to it.  In our example, it is vmhba35:
      13. Now bind the new VMkernel ports to the iSCSI HBA: “esxcli swiscsi nic add -n vmkx -d vmhba35″  Adjust the vmkernel name (vmk0, vmk1, etc) and the iSCSI initiator HBA number (vmhba33, vmhba35, etc) to fit your environment.  Do this for each VMkernel port you will be using for MPIO.  For this example, we run:
        • esxcli swiscsi nic add -n vmk1 -d vmhba35
        • esxcli swiscsi nic add -n vmk2 -d vmhba35
      14. You can verify that your vmk ports were successfully added to the pNIC’s by running “esxcli swiscsi nic list -d vmhbaxx” (in our case, esxcli swiscsi nic list -d vmhba35).  Each vmk port should be listed and should be assigned ONE pNIC.


      New vSphere Project

      The Hardware:

      3 – Dell R710 Servers with 2-Quad Core Xeon CPUs, 32GB RAM, 3-SAS HDs, and 8 NIC ports.

      2 – Cisco 2960G Switches.

      1 – Dell Equallogic PS6000x 7.2TB with 16 SAS Drives and Dual Controllers.

      The Software:

      VMware vSphere vCenter Standard

      VMware vSphere ESX Enterprise Plus

      Initial Server Configuration:

      Enable Intel Virtual Technology in Dell BIOS.

      Configure Power Management for High Performance.

      Configure Dell DRAC username, password, and IP.

      Configure local RAID for RAID 1 + 1 Hot Spare.

      (continue reading…)


      vSphere ‘Health status changed’ alarm activates every few hours and sends an email notification

      This alarm monitors the vCenter Services, but per VMware there is a known issue that will cause the alarm status to go from Green to Yellow. This is caused by vCenter Storage Management syncs. The current fix is to remove the email address from the Actions tab.

      http://communities.vmware.com/message/1385495

      image


      Using The ESX Host Update Utility

      Back Up the ESX Host Configuration

      Back up the files in the /etc/passwd, /etc/groups, /etc/shadow, and /etc/gshadow directories.
      The /etc/shadow and /etc/gshadow files might not be present on all installations.
      Back up .vmx files.

      Back Up the ESXi Host Configuration

      Install the vSphere CLI. 
      In the vSphere CLI, run the vicfg-cfgbackup command with the -s flag to save the host configuration to
      a specified backup filename.

      vicfg-cfgbackup –server <ESXi-host-ip> –portnumber <port_number> –protocol
      <protocol_type> –username username –password <password> -s <backup-filename>

      (continue reading…)


      Reset Password on ESX Server

      Original Post – Here

       

      How To Change Lost Password on Your ESX Server

       

      You will need to have access to the serial console of the server which has your ESX installation, or access to keyboard and display attached directly to the same box.

      To change the password, we’ll follow this procedure:

      1) Reboot ESX server.

      Unfortunately, if you don’t remember your root password, there won’t be a clean way to reboot your server. Try to shutdown all the VMs running on it, and then power-cycle the box running ESX.

      2) Boot ESX server in single user mode

      In this mode, you won’t be asked for a root password. When you see the following screen, press the "a" key:

      … to change ESX kernel boot parameters. Your screen will look like this:

      Now, simply type a space and "single" word, then press Enter:

      Eventually, your ESX server will boot and give you a root command line prompt, which means you can do what you want from this moment on:

      Assuming you want to change your root password, move on to the next step.

      3) Change ESX root password to a new one

      Simply type "passwd" and give your new password twice:

      sh-2.05b# passwd
      Changing password for user root.
      New UNIX password:
      Retype new UNIX password:
      passwd: all authentication tokens updated successfully.

      That’s it! You have changed the ESX password! Now it’s time to reboot the system and allow ESX server to come back up online.

      4) Reboot ESX server once again

      Type "reboot" and wait for the ESX server to come back online in a few minutes:

      sh-2.05# reboot

    1. Archives

    2. Copyright © 1996-2010 My-Technet. All rights reserved.
      iDream theme by Templates Next | Powered by WordPress
      WordPress Appliance - Powered by TurnKey Linux