Thursday, September 17, 2015

Configuring iSCSI Storage


 1. Login to VCenter Server. Just open a browser and enter the VCenter server IP address or hostname. You will be navigating to the VSphere Web-client login page.



2.Navigate to the ESXi host where you want to add the ISCSI storage.After selecting the ESXi host, Just click on “Manage” tab and navigate it to “storage” tab.Click on the “+” icon add the ISCSI adapter.

3.After selecting the ISCSI adapter just click on OK to add it. You can see the new ISCSI adapter in the bottom of the adapter list.
 4.Select the ISCSI adapter and you will get the below window on the screen.Just navigate it to the target.Click on “Add” to add new ISCSI target.You need the target iqn number and this you can take it from your ISCSI server.(Ex: Openfiler,Microsoft ISCSI target,Starwind)
 5.Enter the ISCSI server IP address and iqn number and press OK. ISCSI protocol defaults uses port 3260.


 6.Now you need to navigate to networking tab to configure the dedicated ISCSI network adapter to segregate the virtual SAN traffic.Click on the highlighted image to add new VMkernel adapter.(Refer step :2 Image.)
 7.Select the VMkernel adapter for virtual SAN traffic aka ISCSI traffic.
 8.Its up to you which virtual switch you want to use for ISCSI traffic. Let me go with vswitch0.

 9. Enable the virtual SAN traffic for new VMkernel adapter.

 
9.Enter the New IP address for dedicated ISCSI traffic.This IP will be used for ESXi host to ISCSI server traffic.
 11.Click finish to complete the wizard.

 12.You can see the new adapter like the below one.

 13.Again Navigate to the storage tab. Select the “Network Port Binding”  and Click “+” to add new VMkernel adapter
 14.Select the newly configured VMkernel adapter and select OK to add it .
 15.Now you  have successfully configured the ISCSI target in ESXi 5.5 host. To see the provisioned LUN’s ,you need to re-scan the adapters.Click on the below highlighted icon to re-scan it.
 16.You can see ISCSI storage LUNS on the device tab.


(courtesy to unixarena.com)
 

Thursday, September 3, 2015

Vmware Lock file


                 A running virtual machine creates lock files to prevent consistency problems on virtual disks. If the virtual machine did not use locks, multiple virtual machines might read and write to the disk, causing data corruption. 

Lock files are always created in the same directory as the .vmdk files.
 
           When a virtual machine is powered off, it removes the lock files it created. If it cannot remove the lock, a stale lock file is left protecting the .vmdk file. For example, if the host machine crashes before the virtual machine has a chance to remove its lock file, a stale lock remains. 

          If a stale lock file remains when the virtual machine is started again, the virtual machine tries to remove the stale lock. To make sure that no virtual machine could be using the lock file, the virtual machine checks the lock file to see if
1. The lock was created on the same host where the virtual machine is running.
2. The process that created the lock is not running.
          If those two conditions are true, the virtual machine can safely remove the stale lock. If either of those conditions is not true, a dialog box appears, warning you that the virtual machine cannot be powered on. If you are sure it is safe to do so, you may delete the lock files manually. On Windows hosts, the filenames of the lock files end in .lck. On Linux hosts, the filenames of the lock files end in .WRITELOCK.

        If u dialog box appears while booting the VM,you can go to the folder OS.vmdk.lck.and deleted the file ***.vmx.lck.