Category Archives: VMWare

how to set Static MAC address in VMware – ESX Virtualization

How to maintain a the same MAC address all the time within your vSphere 4 installation. In VMware vSphere 4 environement, when you move your VM to another

Source: Static MAC address set in VMware – ESX Virtualization

How to maintain a the same MAC address all the time within your vSphere 4 installation.

In VMware vSphere 4 environement, when you move your VM to another host or the VM has different path on the same host, the MAC adress of the VM is changed.

If you want to guarantee that the same MAC address is assigned to a given virtual machine every time, even if the virtual machine is moved, or if you want to guarantee a unique MAC address for each virtual machine within a networked environment you have 2 choices. You can do it on the VM configuration level or you can do it on the guest level.

On the VM level you can do it via GUI or by editing your VMX file (just make sure that you unregister the VM from vCenter first, otherwise vCenter will overwrite the value) you go to Menu VM > Edit Settings > Network Adapter and you set the radio button on Manual. Then you can assign a static MAC address there between the authorised range by VMware. The MAC address range is:

00:50:56:00:00:00-00:50:56:3F:FF:FF

1

If in some rare cases you need to keep the same MAC as for exaple on your Physical server (for some software license files tightened to a MAC address for exemple), and the MAC adress is outside of the range, you have the possibility to do it inside of your Windows (linux) VM.

On the Windows VM you do it in the properties of your NIC:

Start the VM and in the Windows system go to Control panel > network connections > Properties

1

Click the Configure button and go to Advanced Tab where on selecting Locally administered value you are able to enter your own value.

3

And for linux VM you can try this:

ifconfig eth0 down
ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
ifconfig eth0 up

How to Synchronize ESXi/ESX time with a Microsoft Domain Controller

Symptoms

An ESXi/ESX host configured to use a Microsoft Windows 2003 or newer Domain Controller as a time source never synchronizes its clock with a default configuration.

Resolution

Workaround

If you are using ESXi/ESX 4.1 Update 1 or later, you can use this workaround:

When using Active Directory integration in ESXi/ESX 4.1 and newer, it is important to synchronize time between ESXi/ESX and the directory service to facilitate the Kerberos security protocol.

ESXi/ESX support synchronization of time with an external NTPv3 or NTPv4 server compliant with RFC 5905 and RFC 1305. Microsoft Windows 2003 and newer use the W32Time service to synchronize time for windows clients and facilitate the Kerberos v5 protocol. For more information, see the Microsoft Knowledge Base article 939322 and How the Windows Time Service Works.

By default, an unsynced Windows server chooses a 10-second dispersion and adds to the dispersion on each poll interval that it remains in sync. An ESXi/ESX host, by default, does not accept any NTP reply with a root dispersion greater than 1.5 seconds.

The preceding links were correct as of April 16, 2013. If you find a link is broken, provide feedback and a VMware employee will update the link.

Configure Windows NTP Client

ESXi/ESX requires an accurate time source to synchronize with. To use a Windows 2003 or newer server, it should be configured to get its time from an accurate upstream NTP server. For more information, see the Microsoft Knowledge Base article 816042.

The preceding link was correct as of April 16, 2013. If you find a link is broken, provide feedback and a VMware employee will update the link.

Use the registry editor on the Windows server to make the configuration changes:

Note: This procedure modifies the Windows registry. Before making any registry modifications, ensure that you have a current and valid backup of the registry and the virtual machine. For more information on backing up and restoring the registry, see the Microsoft Knowledge Base article 136393.

  1. Enable NTP mode:
    1. Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
    2. Set the Type value to NTP.
  1. Enable the NTP Client:
    1. Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config
    2. Set the AnnounceFlags value to 5.
  1. Specify the upstream NTP servers to sync from:
    1. Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders
    2. Set the NtpServer value to a list of at least 3 NTP servers.

      Example: You might set the value to:

      1.pool.ntp.org,0x1 2.pool.ntp.org,0x1 3.pool.ntp.org,0x1

      Note: On a Windows 2008 Domain Controller, NtpServer is located inHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters.

  1. Specify a 15-minute update interval:
    1. LocateHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient
    2. Set the SpecialPollInterval value to 900.
  1. Restart the W32time service for the changes to take effect.

Configure ESXi/ESX NTP and Likewise Clients

vSphere Client

Configure ESXi/ESX to synchronize time with the Windows server Active Directory Domain Controller:

  1. Connect to the ESXi/ESX host or vCenter Server using the vSphere Client.
  2. Click the ESXi/ESX host in the inventory.
  3. Click the Configuration tab.
  4. Under the Software heading, click Time Configuration.
  5. Click Properties.
  6. Ensure that the NTP Client Enabled option is selected.
  7. Click Options.
  8. Click NTP Settings.
  9. Click Add and specify the fully qualified domain name or IP address of the Windows server Domain Controller(s).
  10. Click OK.
  11. Click OK to save the changes.

vSphere Web Client

  1. Log in to the vSphere Web Client with administrator credentials.
  2. Click on Hosts and Clusters.
  3. Select the ESXi host from the list
  4. Click Manage > Settings.
  5. Expand System and select Time Configurations.
  6. Click Edit.
  7. Enter the Windows server Domain Controller(s) information.

Additional configuration must be done from the command line.

ESX/ESXi 4.x and 5.x

  1. Open a console to the ESXi/ESX host. For more information, see Connecting to an ESX host using a SSH client (1019852) or Using Tech Support Mode in ESXi 4.1 and ESXi 5.0 (1017910).
  2. Open the /etc/ntp.conf file in a text editor. For more information, see Editing configuration files in VMware ESXi and ESX (1017022).
  3. Add the tos maxdist command on its own line:

    tos maxdist 30

  4. Save and close the configuration file.
  5. Make the /etc/likewise/lsassd.conf file writable by running the command:

    chmod +w /etc/likewise/lsassd.conf

  6. Open the /etc/likewise/lsassd.conf file in a text editor. For more information, see Editing configuration files in VMware ESXi and ESX (1017022).
  7. Locate the sync-system-time option, uncomment it, and set the value to no:

    sync-system-time = no

  8. Save and close the configuration file.
  9. On ESXi, save the configuration changes to the boot bank so they persist across reboots by running the command:

    /sbin/auto-backup.sh

  10. Restart the ntpd and lsassd services for the configuration changes to take effect by running the commands:

    service lsassd restart
    service ntpd restart

    Note: To restart the ntpd and lsassd services on an ESXi host, run these commands:

    /etc/init.d/lsassd restart
    /etc/init.d/ntpd restart

If the ntpd and lsassd services do not restart, consider restarting the management agents first. For more information about restarting the management agents, see Restarting the Management agents on an ESX or ESXi Server (1003490).

ESXi 6.0

  1. Connect to the ESXi host using an SSH session. For more information, see Using ESXi Shell in ESXi 5.x and 6.0 (2004746).
  2. Run this command to access the likewise shell:

    /usr/lib/vmware/likewise/bin/lwregshell

    Note: If the command fails with the error:

    lwregshell (error = 40700 – LWREG_ERROR_NO_SUCH_KEY_OR_VALUE)

    Run this command to start the likewise service:

    /etc/init.d/lwsmd start

  3. Navigate to the HKEY_THIS_MACHINE\Services\lsass\Parameters\Providers\ActiveDirectory directory with this command:

    cd HKEY_THIS_MACHINE\Services\lsass\Parameters\Providers\ActiveDirectory

  4. Run this command to change the synchronization time:

    set_value SyncSystemTime 0

  5. Exit the shell by typing quit and pressing Enter.
  6. Refresh the lsass service with this command:

    /usr/lib/vmware/likewise/bin/lwsm refresh lsass

    For example:

    /usr/lib/vmware/likewise/bin/lwsm refresh lsass

    Refreshing service: lsass

  7. To verify the changes to the registry key, run this command:

    /usr/lib/vmware/likewise/bin/lwregshell list_values “[HKEY_THIS_MACHINE\Services\lsass\Parameters\Providers\ActiveDirectory]”

Once the configuration changes are complete, ensure that the time is synchronized between the ESXi/ESX host and the Windows server

VMware ESX,VMware ESXi

Source: VMware KB: Synchronizing ESXi/ESX time with a Microsoft Domain Controller

How to Convert VirtualBox VM to VMware VM

  1. Make sure you do not have any snapshots on your virtual machine; if you do, delete them.
  2. Open cmd
  3. Cd C:\Program Files\Oracle\VirtualBox
  4. vboxmanage clonehd “C:\Users\guy.naftaly \.VirtualBox\HardDisks\HAProxy2.vdi” VMHAProxy2.vmdk -format VMDK -variant standard -type normal –remember
  5. When the command finishes, you will have your new VMware hard disk on the same location as your original Virtualbox hard disk.

Attaching New VMware Hard Disk to New Virtual Machine

  1. Upload the vmdk file to your destination data store.
  2. Open VMware Vsphare client and connect to your destination ESXI server.
  3. Create new VM and chose existing HD and add the vmdk that you created.

How to Convert a VirtualBox VM into a VMware VM.

How To Upgrade VMWARE ESXI 5.0.0 To 5.1.0

  1. Download the update from https://my.vmware.com/group/vmware/patch#search.
    1. Choose ESXi and Version 5.1.0
    2. On the next site download the file: ESXi510-201210001.zip
  2. Upload the zip file to your esxi datastore
    1. Open your VMware vSphere Client
    2. Click on your host
    3. Click on configuration
    4. Click on storage
    5. Right click on your datastore
    6. Select Browser Datastore…
    7. Select the upload symbol.
    8. Select upload file
    9. Select your update-file
    10. File is uploading…
  3. When it is uploaded activate your SSH Server to trigger the update.
    1. Open your VMware vSphere Client
    2. Click on your host
    3. Click on configuration
    4. Click on security Policy.
    5. Click on properties.
    6. Activate the SSH server service.
  4. Start putty and connect to your server. Login with root.
  5. Depending on where you uploaded your ESXi 5.1.0 update file you need to execute this command to updated your server:
  6. esxcli software vib install -d /vmfs/volumes/datastore1/ESXi510-201210001.zip
  7. After a while the result of the update appears:

Installation Result

   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.

   Reboot Required: true

   VIBs Installed: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.510.0.0.799733, …snip…

 VIBs Removed: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.500.0.0.469512, …snip…

VIBs Skipped:

  1. As you can see the updated completed successfully.
  2. Reboot your server with the command reboot.

 

Sources:

http://www.sysstem.at/2012/11/upgrade-vmware-vsphere-hypervisor-esxi-version-5-0-0-to-5-1-0-with-ghettovcb/

http://www.tinkertry.com/patchesxi50/

http://www.tinkertry.com/windows-8-consumer-preview-on-esxi-5-0-patch-02/

VMware Location of ESXi 5.0 log files

ESXi 5.0 Host Log Files

Logs for an ESXi 5.0 host are grouped according to the source component:

  • /var/log/auth.log: ESXi Shell authentication success and failure.
  • /var/log/dhclient.log: DHCP client service, including discovery, address lease requests and renewals.
  • /var/log/esxupdate.log: ESXi patch and update installation logs.
  • /var/log/hostd.log: Host management service logs, including virtual machine and host Task and Events, communication with the vSphere Client and vCenter Server vpxa agent, and SDK connections.
  • /var/log/shell.log: ESXi Shell usage logs, including enable/disable and every command entered..
  • /var/log/sysboot.log: Early VMkernel startup and module loading.
  • /var/log/boot.gz : A compressed file that contains boot log information and can be read using zcat /var/log/boot.gz|more .
  • /var/log/syslog.log: Management service initialization, watchdogs, scheduled tasks and DCUI use.
  • /var/log/usb.log: USB device arbitration events, such as discovery and pass-through to virtual machines.
  • /var/log/vobd.log: VMkernel Observation events, similar to vob.component.event.

Note: For clarification VOB and the corresponding service VOBD propagates kernel level errors to third-party applications. VOBD is a daemon that VMware and third-party applications use for monitoring and troubleshooting.

 

  • /var/log/vmkernel.log: Core VMkernel logs, including device discovery, storage and networking device and driver events, and virtual machine startup.
  • /var/log/vmkwarning.log: A summary of Warning and Alert log messages excerpted from the VMkernel logs.
  • /var/log/vmksummary.log: A summary of ESXi host startup and shutdown, and an hourly heartbeat with uptime, number of virtual machines running, and service resource consumption.
  • Note: For information on sending logs to another location such as a datastore or remote syslog server, see  http://kb.vmware.com/selfservice/img/btn_show.png Configuring syslog on ESXi 5.0 (2003322).

ESXi 5.1 Host Log Files

Logs for an ESXi 5.1 host are grouped according to the source component:

  • /var/log/auth.log: ESXi Shell authentication success and failure.
  • /var/log/dhclient.log: DHCP client service, including discovery, address lease requests and renewals.
  • /var/log/esxupdate.log: ESXi patch and update installation logs.
  • /var/log/lacp.log: Link Aggregation Control Protocol logs.
  • /var/log/hostd.log: Host management service logs, including virtual machine and host Task and Events, communication with the vSphere Client and vCenter Server vpxa agent, and SDK connections.
  • /var/log/hostd-probe.log: Host management service responsiveness checker.
  • /var/log/rhttpproxy.log: HTTP connections proxied on behalf of other ESXi host webservices.
  • /var/log/shell.log: ESXi Shell usage logs, including enable/disable and every command entered.
  • /var/log/sysboot.log: Early VMkernel startup and module loading.
  • /var/log/boot.gz: A compressed file that contains boot log information and can be read using zcat /var/log/boot.gz|more.
  • /var/log/syslog.log: Management service initialization, watchdogs, scheduled tasks and DCUI use.
  • /var/log/usb.log: USB device arbitration events, such as discovery and pass-through to virtual machines.
  • /var/log/vobd.log: VMkernel Observation events, similar to vob.component.event.
  • /var/log/vmkernel.log: Core VMkernel logs, including device discovery, storage and networking device and driver events, and virtual machine startup.
  • /var/log/vmkwarning.log: A summary of Warning and Alert log messages excerpted from the VMkernel logs.
  • /var/log/vmksummary.log: A summary of ESXi host startup and shutdown, and an hourly heartbeat with uptime, number of virtual machines running, and service resource consumption.
  • /var/log/Xorg.log: Video acceleration.

 

Note: For information on sending logs to another location (such as a datastore or remote syslog server), see Configuring syslog on ESXi 5.0 (2003322).

Via: VMware KB: Location of ESXi 5.0 log files.

Via: VMware KB: Location of ESXi 5.1 and 5.5 log files.