Joel Spolsky’s talk
January 21, 2010 | Leave a Comment
Joel Spolsky (author of Joel on Software) gave a talk at the Department of Computer Science at Yale.
The script is an interesting read: Part 1, Part 2, Part 3.
Convert .avi to iPod video
September 4, 2007 | Leave a Comment
This guide will show how you can easily convert .avi files to iPoD video files. First start up 3gp Converter (if this is your first time using it, you will need to select “English” for the language). (Screen Shot Below)

After selecting “English”, then select “Model: MP4, for iPod” in the upper section of the 3gp Converter window. After that click the “Apply” button. (Screen Shot Below)

From here just select the “Output Directory” and drag and drop the .avi file that you wish to convert to the top section of the 3gp Converter window. (Screen Shot Below)

After dragging and dropping the .avi file in to the 3gp Converter window, it will now start to convert the file for you. (Screen Shot Below)

After converting, 3gp Converter will automatically start up iTunes and place the newly converted file you just made in the play list window. (Screen Shot Below)

In the iTunes window, right click the file you just made and click “Get Info”. (Screen Shot Below)

On the screen that pops up, click the “Info” tab at the top, and then begin to fill out the details (Name, Artist, Album, etc.). The file name can be up to 255 characters in length if you wish to change it. You also have to re-add it to the play list if you decided to re-name it. (Screen Shot Below)

Your done, just transfer it to your iPod and enjoy the video anywhere!
Clustering Virtual Machines
September 3, 2007 | Leave a Comment
Reference : You can find this full article at the vmware support site : http://www.vmware.com/support/esx25/doc/admin/esx25admin_cluster_loadbal_esx.htm. I’m backing it up in my blog, because I found it very useful, and wouldn’t want to lose it if they bring it down for some reason.
Clustering Software in Virtual Machines Network Load Balancing, Microsoft Clustering Service and Veritas Clustering Service run without modification in virtual machines on ESX Server 2.5.Use of clustering services in virtual machines provides high availability with less hardware (such as machines and network adapters).
Clustering Scenarios Several scenarios are possible for clustering in virtual machines.Cluster in a Box —
This provides simple clustering to deal with software crashes or administrative errors. The cluster consists of multiple virtual machines on a single physical machine. It supports shared disks without any shared SCSI hardware. It supports heartbeat network without any extra network adapters.
A two-node cluster on a single physical machine; each node is running clustering software
Cluster across Boxes —
This type of cluster consists of virtual machines on multiple physical machines. The virtual disks are stored on shared, physical disks, so all virtual machines can access them. Using this type of cluster, you can deal with the crash of a physical machine.
A two-node cluster using two physical machines; each node is running clustering software.
Consolidating Clusters —
This type of cluster combines features of the previous two types. For example, you can consolidate four clusters of two machines each to two physical machines with four virtual machines each. This provides protection from both hardware and software failures.
Four two-node clusters moved from eight physical machines to two.
Cost-effective Standby Host —
Provide a standby host for multiple physical machines on one standby box with multiple virtual machines.
A standby host using three virtual machines on a single physical machine; all are running clustering software.
Configuring Virtual Machine Clusters with Shared Disks
To create a set of clustered virtual machines, you need to configure each of them with the following:
- A primary virtual SCSI host adapter with one SCSI virtual disk
- At least two virtual network adapters
- A public network adapter connected to vmnicx (that is, to vmnic0 or higher). A vmnic is a virtual machine device that uses a network adapter dedicated to the virtual machines.
- A private network adapter connected to vmnicx (that is, to vmnic0 or higher) or to vmnet_x (that is, to vmnet_0 or higher). This device selection must match in all virtual machines in a cluster set. This is the network adapter that the clustering service will use to monitor the heartbeat between nodes.
- The remaining default virtual machine devices (such as the CD-ROM drive and the floppy disk drive).
In addition to the above devices, the following is required for shared storage:
- A secondary virtual SCSI host adapter
- One or more virtual disks that will be shared attached to the secondary SCSI host adapter
- Each virtual machine by default has five PCI slots available. In this configuration (two network adapters and two SCSI host bus adapters), four of these slots are used. This leaves one more PCI slot for a third network adapter if needed.
- VMware virtual machines currently emulate only the SCSI-2 disk reservation protocol and do not support applications using SCSI-3 disk reservations. However, all popular clustering software (including MSCS and VCS) currently uses SCSI-2 reservations.
- You may cluster only two nodes.
- You cannot use VMotion with clustered virtual machines.
Two Node Cluster with Microsoft Cluster Service on a Single ESX Server Machine This procedure creates a two-node cluster using Microsoft Cluster Service on a single ESX Server machine and uses the following:
- Portsaid = host name of node 1 of the cluster
- Kena = host name of node 2 of the cluster
- Arish = public host name of the cluster
- sharedfs = VMFS volume label of the shared storage
- vms = VMFS volume label of the local storage
Note: Virtual disks stored on vms and sharedfs can also be stored on the same partition. In this case, use the partition label on which these virtual disks reside.
Creating the First Node’s Base Virtual Machine
- Access the VMware Management Interface at
https://<hostname>/ and log on as the user who will own the virtual machine. - Click Add Virtual Machine.
- Keep the default Guest Operating System selection of Microsoft Windows 2000 Server.Note: This example uses Microsoft Windows 2000 Server as the guest operating system. You may substitute another Windows operating system that supports Microsoft Cluster Service.
- Change the Display Name field to describe the virtual machine — for example, MSCS Node 1 (Portsaid).
- Change the Location of the virtual machine configuration file to
/home/<user>/vmware/cluster1/cluster1.vmx. - Click Next.
- Select the number of processors you want the guest operating system to use, up to 2.
- Change Memory to show the amount of RAM you want to allocate to this virtual machine.
- Click Next.
- Click Blank to create a new virtual disk.
- Choose the VMFS volume on which you want to store the virtual disk.
- Give the virtual disk image a unique name — for example, cluster1.vmdk.
- If you need a primary SCSI disk larger than 4GB, enter the appropriate value in the Capacity field.
- Choose the virtual SCSI node to which you want to attach the virtual disk.
- By default, the disk mode is set to persistent. Click Persistent to verify the disk mode.
- Click Next.
You have successfully created the virtual machine.
The hardware tab for this virtual machine appears. From that tab, you now need to add additional hardware devices.
Virtual Disk Configuration —
You need a shared SCSI controller and shared SCSI disks for shared access to clustered services and data.
To add a shared SCSI controller and shared SCSI disks, click the Hardware tab, then take the following steps:
- Click Add Device.
- Click Hard disk.
- Click Blank to create a new virtual disk.
- Choose the VMFS volume on which you want to store the virtual disk.
- Give the virtual disk image a unique name — for example, quorum.vmdk.
- Enter the appropriate value in the Capacity field.
- Choose the virtual SCSI node to which you want to attach the virtual disk.Note: Shared disks must be attached to a separate virtual SCSI controller. Select SCSI 1:1
- By default, the disk mode is set to persistent. Click Persistent to verify the disk mode.
- Click OK.Note: A new virtual disk and SCSI Controller 1 are now visible on the hardware tab.
- Click Edit next to SCSI Controller 1 and change the bus sharing from none to virtual.From the Bus Sharing drop-down list, select virtual, then Click OK.
Repeat step 1-step 9 to create an additional shared virtual disk using SCSI 1:2 with the filename shared2.vmdk.
Network Device Configuration —
You need an additional virtual network adapter to be used by Microsoft Cluster Service to maintain the cluster heartbeat. To add this adapter, click the Hardware tab for this virtual machine, then take the following steps:
- Click Add Device.
- Click Network Adapter.
- From the Device Binding drop-down list choose vmnet_0. This attaches the second Ethernet adapter to a private network between the cluster nodes.
- Click OK.
You have created the first cluster node virtual machine.
Installing the Guest Operating System Now you need to install Windows 2000 Advanced Server in the virtual machine you just created
- Insert the Windows 2000 Advanced Server CD in the ESX Server machine’s CD-ROM drive.
- In the management interface, click the blue terminal icon next to the virtual machine’s name to launch the remote console.
- Log on as the user who created the virtual machine or as root.
- Click Power On.
- Install Windows 2000 Advanced Server on the disk connected to scsi0.
- Accept all the default options during the installation. Do not install the clustering service at this time.
- When the installation is completed, install VMware Tools in the guest operating system.
Cloning the Virtual Machine Now that you have a virtual machine with Windows 2000 Advanced Server installed, you can save time by cloning this virtual machine as follows:
- Run sysprep.exe, which is available on the Windows 2000 CD in the \support\tools\deploy.cab file. This strips the security ID assigned to the guest operating system and resets the machine information as well as the TCP/IP network configuration.
- Shut down the guest operating system and power off the virtual machine.
- Remove the Windows 2000 Advanced Server CD from the server’s CD-ROM drive.
- On the management interface’s Overview page, click Manage Files.
- Drill down to the vmfs folder, then the vms folder. This may take some time to refresh.
- Select the check box next to the cluster1.vmdk file.
- Click Copy.
- Click Paste.
- When the copy process is complete, select the check box next to the file copy of cluster1.vmdk.
- Click the Edit Properties button.
- Change the filename to cluster2.vmdk.
- Click OK.
- Close the Manage Files window.
This concludes the cloning process. Now continue with creating the second node virtual machine
Creating the Second Node Virtual Machine Create a new virtual machine as follows:
- On the management interface’s Overview page, click Add Virtual Machine.
- Keep the default Guest Operating System selection of Microsoft Windows 2000 Server.
- Change the Display Name field to describe the virtual machine — for example, MSCS Node 2 (Kena).
- Change the Location to
home/<user>/vmware/cluster2/cluster2.vmx - Click Next.
- Select the number of processors you want the guest operating system to use, up to 2.
- Change Memory to show the amount of RAM you want to allocate to this virtual machine.
- Click Next.
- Click Existing to attach an existing virtual disk to this virtual machine.
- From the Virtual Disk Image drop-down list, choose cluster2.vmdk.
- Choose the virtual SCSI node to which you want to attach the virtual disk.
- Click Next.
Virtual Disk Configuration —
You need a shared SCSI controller and shared SCSI disks for shared access to clustered services and data.
To add a shared SCSI controller and shared SCSI disks, click the Hardware tab for this virtual machine, then take the following steps:
- Click Add Device.
- Click Hard Disk.
- Add the pre-exiting quorum disk (quorum.vmdk) that you created in the section Virtual Disk Configuration —.
- Choose the virtual SCSI node to which you want to attach the virtual disk.Note: Shared disks must be attached to a separate SCSI controller. Select SCSI 1:1.
- By default the disk mode is set to persistent. Click Persistent to verify the disk mode.
- Click OK.Note: A new virtual disk and SCSI Controller 1 are now visible on the hardware tab.
- Click Edit next to SCSI Controller 1 to change the bus sharing from none to virtual.
- From the Bus Sharing drop-down list select virtual, then click OK.
Repeat step 1-step 6 to add an additional shared virtual disk using SCSI 1:2 with the filename shared2.vmdk.
Network Device Configuration —
You need an additional virtual network adapter to be used by Microsoft Cluster Service to maintain the cluster heartbeat. To add this adapter, click the Hardware tab for this virtual machine, then take the following steps:
- Click Add Device.
- Click Network Adapter.
- From the Device Binding drop-down list choose vmnet_0. This attaches the second Ethernet adapter to a private network between the cluster nodes.
- Click OK.
You have created the second cluster node virtual machine.
Go to the management interface’s Overview page. The management interface should list both virtual machines and show them powered off.
Installing Microsoft Cluster Service
- Start the node 1 virtual machine.
- Follow the Windows 2000 Advanced Server mini-setup prompts to enter Advanced Server’s serial number, the host name (Portsaid) and the IP addresses. Note that you need to enter the addresses for both public and private network adapters.For the public network adapter, enter an IP address that belongs to the physical network.For the private IP address, you may use an address like 192.168.x.x with a class C subnet mask (255.255.255.0).
- At the end of the process, Windows automatically reboots.
- Start the Disk Administrator and change both shared disks to basic disks.
- Format both shared virtual disks with NTFS if they are not already formatted.
- Assign the first shared disk to Q: (quorum) and the second disk to R:.If you have joined this virtual machine to an existing Active Directory domain, skip to step 11.
- Run dcpromo.exe from the command prompt. This starts the Active Directory Wizard.
- Set up the current machine as a domain controller. For the domain name, use something like vmcluster.domain.com where domain.com is your DNS domain and vmcluster is your Active Directory domain. This node may be setup as a new domain tree and also a new domain forest, or it may join existing ones.
- Make sure the DNS server is installed.
- Set the domain permissions as mixed mode unless you plan otherwise.
- To add a cluster services account in the domain, go to Programs > Administrative Tools > Active Directory Users and Computers.
- Add an account named cluster, check User cannot change password and Password never expires.
- Insert the Windows 2000 Advanced Server CD in the server’s CD-ROM drive.
- Go to Control Panel > Add/Remove Programs.
- Select Add/Remove Windows Components.
- Check the Cluster Service component.
- Click Next. Follow the prompts to install the service.
- As you configure Cluster Service, choose Form a New Cluster.
- Specify the cluster name (Arish)
- Specify the cluster IP address. This is the address that will represent the cluster. It must be on the same network as that of the vmnic0.
- Specify the cluster service account created above.
- Specify that both shared disks should be managed by the cluster service.
- Indicate the shared disk (Q:) to be the quorum disk.
- Specify which network adapter is public and which is private.
- Stop the cluster service on the local node (from Cluster Manager, right-click the node name), so the second virtual machine can access the shared disks.
- Start the node 2 virtual machine.
- Repeat step 2 and step 3 above.
- Start the Disk Administrator and assign the first shared disk to Q: (quorum) and the second disk to R:.
- Start dcpromo.exe and add this virtual machine as a domain controller in the same domain created in step 8 above or add it to an existing domain. You must match the setup done in step 8.
- In the node 1 virtual machine, start the cluster service by reversing step 25 above.
- In the node 2 virtual machine, repeat step 14-step 24 above with one exception: In step 18, select Join a Cluster.
This concludes the Microsoft Cluster Service installation and configuration.
Running Microsoft Cluster Service Microsoft Cluster Service should operate normally in the virtual machine once it is installed.Note: Some disk errors are recorded in the Windows event log in normal operation. These error messages have a format similar to
The driver detected a controller error on
\Device\Scsi\BusLogic3
They should be reported periodically only on the passive node of the cluster and should also be reported when the passive node is taking over during a failover. The errors are reported because the active node of the cluster has reserved the shared virtual disk(s). The passive node periodically probes the shared disk and receives a SCSI reservation conflict error. This is normal operation.
Two Nodes with Microsoft Cluster Service on Separate ESX Server Machines This procedure creates a two node cluster in virtual machines that will run on two separate ESX Server machines. It uses the same naming conventions as in the previous procedure.In addition, the physical shared storage is either:
For this exercise the VMFS partition for the internal storage on each ESX Server computer is labeled vms. The VMFS partition for the shared storage is labeled sharedfs.
- The VMFS partition for the internal storage on each ESX Server machine is labeled vms.
- The VMFS partition for the shared storage is labeled sharedfs.
Each ESX Server machine must have an additional physical network adapter assigned to the virtual machines to use for the private network that monitors the heartbeat. The procedure assumes this network adapter uses the device named vmnic1. You should connect the private network adapter to a separate network from that used by the public network adapter.
Creating the First Node’s Base Virtual Machine
Follow the procedure in Creating the First Node’s Base Virtual Machine, with the following changes:
- In the Virtual Disk Configuration section, in step 10 click Edit next to SCSI Controller 1 to change the bus sharing from none to physical instead of virtual. From the Bus Sharing drop-down list select physical, then click OK.
- In the Network Device Configuration section, in step 3 use vmnic1 instead of vmnet_0 as the device used by Ethernet Adapter 1.
- Access the virtual machine menu by clicking the arrow to the right of the virtual machine icon. Choose Configure Options. Under Verbose Options, click the click here link.Change the specifications of scsi1:1.name and scsi1:2.name to use the strict vmhba name (for example, vmhba0:1:0:1:shared1.vmdk) for the VMFS partition, rather than the VMFS name (for example, sharedfs:shared1.vmdk). The reason for this change is that if one ESX Server machine reboots while a virtual machine on the other physical machine is reserving the shared SCSI disk, ESX Server cannot read the VMFS name on the shared disk when it is loaded and initialized. If the shared virtual disk is not specified using the full vmhba name, ESX Server cannot determine the disk specified by the VMFS name and gives an error when restarting the virtual machine.When you have made these changes, click OK.
In addition to these minor changes, you need to change the access rights of the VMFS partition where you store the shared virtual disks. By default VMFS partitions are configured for public access. In order to support clustering, the VMFS partition needs to be configured for shared access.
Take the following steps to change the access settings for the VMFS partition:
- From the management interface click the Options tab
- Click Storage Configuration.
- Identify the disk volume that contains the VMFS partition where the shared virtual disks are stored. Click Edit for the disk volume.
- From the VMFS Access drop-down list, choose Shared.
- Click OK.
You have created the first cluster node virtual machine.
Installing the Guest Operating System
Follow the procedure in Installing the Guest Operating System.
Now that you have a virtual machine with Windows 2000 Advanced Server installed, you can save time by cloning this virtual machine as follows:
- Run sysprep.exe, which is available on the Windows 2000 CD in the \support\tools\deploy.cab file. This strips the Security ID assigned to the guest operating system and resets the machine information as well as the TCP/IP network configuration.
- Shut down the guest operating system and power off the virtual machine.
- Go to the console of the second ESX Server machine. This is where you will copy the virtual disk that resulted from creating the first node.
- Log on as root.
- Change directories: cd /vmfs/vmsThis assumes that the internal storage for the second server is in a VMFS partition labeled vms.
- Use the ftp command: ftp <server1-hostname>
- Change directories: cd /vmfs/vmsThis changes the current directory to the VMFS partition on the first server where you created the first node’s virtual disk.
- Set the type to binary: binThis sets the transfer mode to binary. If you use text transfer mode, the virtual disk may not be usable on the target server.
- Type: hash onThis turns on the display of a series of hash signs as a transfer progress indicator.
- Retrieve the virtual disk file: get cluster1.vmdkThis initiates the transfer of the virtual disk file to the current directory on the second ESX Server machine.
- Quit the ftp session: byeAfter the file transfer is completed, type the bye command to end the FTP session.
- Rename the file: mv cluster1.vmdk cluster2.vmdkThis renames the virtual disk to cluster2.vmdk.
This concludes the cloning process. Continue with creating the second node virtual machine.
Creating the Second Node Virtual Machine Follow the procedure in Creating the First Node’s Base Virtual Machine, noting the following differences:
- In the Virtual Disk Configuration section, step 10, click Edit next to SCSI Controller 1 to change the bus sharing from none to physical instead of virtual. From the Bus Sharing drop-down list, choose physical, then click OK.
- In the Network Device Configuration section, step 3, from the Device Binding drop-down list, choose vmnic1 instead of vmnet_0. This attaches the second Ethernet adapter to the second physical adapter designated for virtual machine use. This is used to create a private network between the cluster nodes.
- Change the specifications of scsi1:1.name and scsi1:2.name as you did when creating the first node’s base virtual machine.
Clustering Using a Raw SCSI Disk The shared disk used for clustering can also be a complete shared SCSI disk, rather than a VMFS file on a shared disk. Using a raw SCSI disk as a shared disk may simplify initial setup. It may be especially useful for importing an existing physical cluster that already has cluster data on a SCSI disk. In addition, using a raw SCSI disk as a shared disk allows a virtual machine to participate in a cluster with a physical machine. For example, the virtual machine can be used as the passive node for a physical machine that is the active node.In order for the virtual machine to access a physical disk, the instructions in Virtual Disk Configuration — should be replaced with the following steps.
To add a physical SCSI controller and shared raw SCSI disks, go to the Hardware tab and take the following steps:
- Click Add Device.
- Click Hard disk.
- Click System LUN/Disk to give your virtual machine direct access to a SAN or shared storage volume.
- Choose the LUN/Partition you want to attach to this VM as a raw disk.Note: In ESX Server, physical disks are identified by a vmhba number. For example, vmhba0:1:2:1 means physical adapter vmhba0, target 1, LUN 2, partition 1. When the final number is :0, that indicates you are specifying the entire disk, rather than a particular partition.
- Choose the virtual SCSI node to which you want to attach the raw disk.Note: Shared disks must be attached to a separate SCSI controller from the system disk. Select, SCSI 1:1
- Click OK.A new virtual disk and SCSI Controller 1 appear on the Hardware tab.
- Click Edit next to SCSI Controller 1 to change the bus sharing from none to physical.
- From the Bus Sharing drop-down list choose physical, then click OK.Setting the bus sharing to physical makes sure that all the SCSI reserve and reset commands go through to the physical disk.
Repeat step 1-step 8 to create an additional shared raw disk using SCSI 1:2.
You have completed the virtual machine configuration.
For more information adding a raw SCSI device, see the VMware technical note Using Raw Device Mappings with ESX Server, available at http://www.vmware.com/support/resources/esx_resources.html</a>.
Installing Microsoft Cluster Service Follow the procedure in Installing Microsoft Cluster Service.Additional Notes for Clustering Across Physical Machines
- Supply an extra parameter to the Emulex driver when it is loaded. You do this by editing the file /etc/vmware/hwconfig. First, identify the bus, slot and function holding the first (or only) Emulex card. You can find this information by looking at the Startup Profile page. Then add a line with the formatdevice.vmnix.6.14.0.options = “lpfc_delay_rsp_err=0″ to the end of /etc/vmware/hwconfig. Here, the numbers 6.14.0 specify the bus, slot and function where the Emulex card is located. If you have more than one Emulex card, you should have only a line referencing the first card.
The following table summarizes additional, important points for using Microsoft Clustering Software with ESX Server.
|
Area |
Component |
Single-host Clustering |
Multi-host Clustering |
|---|---|---|---|
|
Non-clustered disks |
Virtual machine and swap (paging) file |
Must be on local storage, not on a SAN Must be a non-clustered disk. |
|
|
Non-clustered virtual disks (.vmdk) |
Must reside on a public VMFS volume Must use VMFS label notation Virtual adapter must be set to shared mode = none |
||
|
Non-clustered raw device (disk) mapping |
Revision must be ESX 2.5 or higher Must reside on a public VMFS volume Must use VMFS label notation Disk must be in persistent mode DeviceType must be scsi-nonpassthru-rdm or |
||
|
Non-clustered raw device (disk) |
Use raw device mapping instead, if ESX Server 2.5 and higher |
||
|
Clustered |
Clustered virtual disks (.vmdk) |
Must use VMFS label notation Virtual adapter must be in shared mode = virtual The LUN must host only one VMFS file system The VMFS volume must be dedicated to the cluster Must reside on public VMFS volume |
Must have been created with vmkfstools -z Must use the vmhba<H>:<T><L>:<P> notation, not the VMFS label notation. Virtual adapter must be set to shared mode = physical Must reside on its own physical LUN The LUN must host only one VMFS file system The LUN must have a single path The shared virtual disk must be the only file on this VMFS volume The VMFS volume must be in shared mode The VMFS volume must have only one physical extent |
|
Clustered non-pass-through raw device mapping |
Revision must be ESX 2.5 or higher Must reside on a public VMFS volume Must use VMFS label notation Disk must be in persistent mode DeviceType must be Virtual adapter must be set to shared mode = virtual |
Revision must be ESX 2.5 or higher Must reside on a shared VMFS volume Must use VMFS label notation Disk must be in persistent mode DeviceType must be Virtual adapter must be set to shared mode = physical |
|
|
Area |
Component |
Single-host Clustering |
Multi-host Clustering |
|---|---|---|---|
|
Clustered |
Clustered pass-through raw device mapping |
Not supported |
Revision must be ESX 2.5 or higher Must reside on a shared VMFS volume Must use VMFS label notation Disk must be in persistent mode DeviceType must be Virtual adapter must be set to shared mode = physical |
|
Clustered raw disk |
Not supported |
Use raw device mapping instead, if ESX Server 2.5 or higher Virtual adapter must be used only for clustered disks (raw or .vmdk) |
|
|
ESX Server Configuration |
/proc/vmware/config/Disk/UseLunReset must be set to 1 /proc/vmware/config/Disk/UseDeviceReset must be set to 0 Swap partitions must be local, not on a SAN |
||
|
Qlogic |
Driver revision should be 6.07 on ESX Server and 6.04 on earlier revisions BIOS settings: Enable Target Reset = Yes Full LIP Login = Yes Full LIP Reset = No |
||
|
Emulex |
Driver revision is 2.01g on ESX Server and 4.20q on earlier revisions |
||
|
Microsoft Windows |
Operating system must be Windows 2000 or Windows 2003 Each cluster is limited to two nodes Use the VMware Buslogic driver rather than the native Windows driver if you are using Buslogic virtual adapters Make sure the I/O timeout is 60 seconds or more Cluster Service must restart automatically on failure (for first, second, and subsequent times) |
||
Running Microsoft Cluster Service Microsoft Cluster Service should operate normally in the virtual machines once it is installed.Note: Some disk errors are recorded in the Windows event log in normal operation. These error messages have a format similar to
The driver detected a controller error on
\Device\Scsi\BusLogic3
They should be reported periodically only on the passive node of the cluster and should also be reported when the passive node is taking over during a failover. The errors are reported because the active node of the cluster has reserved the shared virtual disk. The passive node periodically probes the shared disk and receives a SCSI reservation conflict error.
VMFS Locking and SCSI Reservation For a shared SCSI disk that can be accessed by multiple ESX Server machines, two kinds of locking may be in use. These two kinds of locking are somewhat independent and can cause confusion. The shared SCSI disk may be on shared SCSI bus or, more likely, on a storage area network (SAN).VMFS File System Locking The first kind of locking is VMFS file system locking. ESX Server locks VMFS file systems on a server level when a VMFS file system is configured as a public or shared file system. This locking is done in order to ensure that there is no corruption caused by multiple accesses to the file system by different hosts.If a VMFS-1 volume is configured in public mode, only one server can ever access that VMFS at a time. If one server is accessing the VMFS-1 volume, through a virtual machine or a file system command, then a file system operation by another host fails. For example, a vmkfstools command fails with a message that says:
vmkfstools: file system is locked by another server. Use ‘vmkfstools –recover’ to unlock file system if no other server is accessing
Typically, you should not run vmkfstools –recover at this point, since another host is actually using the file system. The error message simply indicates that this server cannot access the VMFS until the other server has finished accessing it. However, if a server fails while accessing the file system, the file system may stay in the locked state and you may need to run vmkfstools –recover.
In a public VMFS-2 volume, locking is at a per-file level, resulting in fewer locking issues. However, you may still encounter the preceding message and may need to use vmkfstools –recover, if a server fails.
If a VMFS is used to store a virtual disk that is accessed by multiple virtual machines on multiple physical servers for the purposes of failover clustering, the VMFS should be configured as a shared file system. Then, the locking protocol is slightly relaxed to allow multiple virtual machines on different servers to access the same VMFS file at the same time. However, file system commands do the same locking as with public file systems (that is, per-VMFS in VMFS-1 volumes and per-file in VMFS-2 volumes).
Additionally, when multiple virtual machines access the VMFS, the VMFS file system enters a read-only mode in which it is impossible to create, delete or change the size of files. However, the contents of the individual files can still be modified. If you later want to create or remove VMFS files, you must stop all virtual machines using the VMFS and re-enter writable mode by using this command:
vmkfstools –config writable vmhba0:1:0:0
Substitute the name of the appropriate disk or VMFS in place of vmhba0:1:0:0.
Locking at SCSI Disk Level The second kind of locking is locking at the SCSI disk level, which is called SCSI disk reservation.Any server connected to a SCSI disk can issue a SCSI command to reserve the disk. If no other server is already reserving the disk, the current server obtains a reservation on the disk. As long as that reservation exists, no other server can access the disk. All SCSI commands to that disk by other servers fail with an appropriate error code.
If a vmkfstools command is attempted on a VMFS on a disk that is reserved by another server, the vmkfstools command fails with a message that says:
vmkfstools: shared SCSI disk is reserved by another server. Use ‘vmkfstools -L release/reset’ to end reservation if no other server is using the SCSI reservation
Similarly, a virtual machine fails to start if its virtual boot disk is stored on a physical disk that is reserved by another host.
Most applications do not ever reserve a SCSI disk. However, failover clustering software reserves SCSI disks in order to ensure that only the active node is able to access the shared SCSI disk. Therefore, you should expect that the shared disk in a physical clustering setup is reserved when the cluster is active. Similarly, for a virtual machine cluster that is running across physical machines, reservations by the clustering software are transmitted through to the physical shared disk.
If you encounter a disk that is reserved unexpectedly, you should try to determine if some clustering software has explicitly reserved the disk. If not, you can release the reservation on the server that has the reservation by running a command in this format:
vmkfstools -L release vmhba0:1:0:0
Substitute the name of the appropriate disk or VMFS in place of vmhba0:1:0:0.
If you cannot determine which server holds the reservation, you may be able to eliminate the reservation by issuing a SCSI bus reset on any server machine using a command in this format:
vmkfstools -L lunreset vmhba0:1:0:0
If this fails, you try the following command:
vmkfstools -L reset vmhba0:1:0:0
Using LUN Masking to Avoid Locking Issues Locking issues are especially likely to happen on a SAN, where multiple users may be accessing some of the same disks or may mistakenly access a disk assigned to another user.It is often helpful to use LUN masking or zoning to limit what disks are visible to each server in the system, and therefore reduce the ways in which one user can affect another user. In particular, the use of LUN masking or zoning can help prevent problems such as those described above in which one server unexpectedly locks or reserves the wrong SCSI disk.
How to enable Windows Installer logging
August 30, 2007 | Leave a Comment





