Monday, September 26, 2011

How to resize an LVM volume in CentOS 5

Volume group name is VolGroup00
- create new partition /dev/sda3 with fdisk /dev/sda
- reboot with parted cd in text mode
- create pvolume
lvm pvcreate /dev/sda3
- display pvolumes
lvm pvdisplay
- extend volume group by adding new pvolume
lvm vgextend VolGroup00 /dev/sda3
- resize volume group by 32 GB
lvm lvextend -L+32G /dev/VolGroup00/LogVol00
- check filesystem for errors before resizing
e2fsck -f /dev/VolGroup00/LogVol00
- resize filesystem
resize2fs /dev/VolGroup00/LogVol00

Sunday, September 18, 2011

Saturday, September 17, 2011

How to autostart a virtual machine in VMware Workstation

Create a batch file with this line:
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" -T ws start E:\VMs\wxp-a\wxp-a.vmx nogui
Replace wxp-a with the name of your virtual machine.
Call this batch from your windows startup menu.

Wednesday, September 14, 2011

How to reset Windows Update components

Please read the following article from Microsoft.

VBscript code behind custom form in Exchange public folder is not running in Outlook 2010

In Outlook 2010, the default behavior was changed to prevent scripts from running in public folders. To re-enable this behavior in Outlook, follow these steps:
  • Click File, and then click Options.
  • In the list of categories, click Trust Center, and then click Trust Center Settings.
  • In the Trust Center, click the E-mail Security category.
  • Click to enable Allow script in Public Folders.
For more information read the following article from Microsoft

Tuesday, September 6, 2011

NIC teaming using EtherChannel leads to intermittent network connectivity in ESXi

When trying to team NICs using EtherChannel, the network connectivity is disrupted on an ESXi host. This issue occurs because NIC teaming properties do not propagate to the Management Network portgroup in ESXi.
When you configure the ESXi host for NIC teaming by setting the Load Balancing to Route based on ip hash, this configuration is not propagated to Management Network portgroup.
After setting the load balancing property to Route based on ip hash for vSwitch0, set the same for Management Network portgroup.
To configure the NIC teaming properties:

    Select the ESX Server host.
    Click the Configuration tab.
    Click the Networking link.
    Click Properties link for the management network portgroup.
    Highlight the virtual switch in the Ports tab and click Edit.
    Click the NIC Teaming tab.
    Choose Route based on ip hash from the Load Balancing dropdown menu.
    Verify that there are two or more network adapters listed under Active Adapters.

Use these commands if the host does not stay connected to vCenter Server after the vSwitch load balancing policy change:
# vim-cmd hostsvc/net/vswitch_setpolicy --nicteaming-policy=loadbalance_ip vSwitch0
# vim-cmd hostsvc/net/portgroup_set --nicteaming-policy=loadbalance_ip vSwitch0 "Management Network" 

For more information read the following articles from VMware KB:

Saturday, September 3, 2011

How to register a vCenter in vSphere 5 Web Client from command line

If you don't want to install Adobe Flash player in your server running vSphere 5 Web Client, then you can do that from a command line:
  • cd \Program Files\VMware\Infrastructure\vSphere Web Client\scripts
  • admin-cmd register https://vsclient.mydomain.local:9443/vsphere-client vcenter.mydomain.local <username> <password>
where vcenter.mydomain.local is the vCenter address, vsclient.mydomain.local is the vSphere Web Client address (it may be the same server where vCenter is installed), <username> is an Administrator account in vCenter and <password> is his password.
Open this link from a browser to check the web client: https://vsclient.mydomain.local:9443/vsphere-client/