Tuesday, November 20, 2012

Hot Remove a VMDK from LIVE LINUX Virtual Machine


If you want to remove an extra VMDK from a Linux VM,you need to follow these steps.

First you need to unmount the /dev/sdb1:

umount /dev/sdb1

Remove the /disk2 folder:

rmdir /disk2/

Remove the entry from the /etc/fstab:

nano or vi /etc/fstab

remove the following line:
/dev/sdb1               /disk2                  ext2    defaults        1 2

Delete the device:

echo 1 > /sys/block/sdb1/device/delete

Remove the VMDK:

ATTACHING new SCSI HDD (VMDK) to a running Virtual Machine (VM) - Live VM

THIS WILL LIST THE NAME OF THE SCSI HOST PRESENT ON THE SYSTEM, BASED ON WHICH HOST YOU ASSIGNED THE NEW DISK DRIVE TO RUN THE FOLLOWING COMMAND
  983  ls /sys/class/scsi_host

INITIALIZE SCSI
 980  echo "- - -" > /sys/class/scsi_host/host0/scan

RUN FDISK TO VERIFY IN LINUX
  981  fdisk -l

CHECK VAR LOG MESSAGES TO VERIFY THE SCSI DEVICE WAS ATTACHED SUCCESSFULLY
  982  tail -f /var/log/messages

CREATE A NEW VOLUME
  984  fdisk /dev/sde

FORMAT THE NEW VOLUME
  985  mkfs.ext3 /dev/sde1

CREATE A MOUNT POINT
  986  vi /etc/fstab

MOUNT IT
  987  mount /tmp

Monday, November 19, 2012

Thursday, November 15, 2012

A guide to figuring out the voltage range supported by any electronic equipment -by looking at the power cable

UN65ES6550F Can I Run The TVs Power Cable Through The Wall

Samsungs TV's power cables are UL (Underwriters Labs) certified but are not CL (In-wall) rated. A CL rating on a cable (CL2 up to 150 volts, CL3 up to 300 volts) means these cables have a slow burning outer jacket that should meet the fire codes and are safe for in wall installations. Since the power cord for the TV is not CL rated it should never be installed inside a wall.


Wednesday, November 14, 2012

Rescan the SCSI Bus to Add a SCSI Device Without rebooting the VM


Rescan the SCSI Bus to Add a SCSI Device
A rescan can be issued by typing the following command:
echo "- - -" > /sys/class/scsi_host/host#/scan
fdisk -l
tail -f /var/log/message


Format a New Disk

Create partition using fdisk and format it using mkfs.ext3 command:
# fdisk /dev/sdc
# mkfs.ext3 /dev/sdc3

Create a Mount Point And Update /etc/fstab

# mkdir /disk3
Open /etc/fstab file, enter:
# vi /etc/fstab
Append as follows:

/dev/sdc3               /disk3           ext3    defaults        1 2

Save and close the file.


Thursday, November 1, 2012

PowerCLI powershell VMWare Datastore autoload ps1 files profile powershell

Schedule a PowerCLI script as a cronjob or a scheduled task
http://www.virtu-al.net/2009/07/10/running-a-powercli-scheduled-task/


PS1 for Datastore management
  1. http://blogs.vmware.com/vsphere/2012/01/automating-datastore-storage-device-detachment-in-vsphere-5.html
  2. http://vmwaregirl.blogspot.com/2012/03/powercli-get-datastoremountinfo.html
    • List all the SCSI LUN's by the LUNID
    • get-vmhost -state connected | Get-ScsiLun | select-object CapacityMB,RuntimeName,CanonicalName|ft -autosize|findstr "L123

  3. http://snipplr.com/view/48048
  • Create a new VMFS datastore from LUN number (
     New-DatastoreByLun )

Auto Load Powershell script on run.
  1. http://noahcoad.com/post/66/powershell-startup-auto-load-scripts
             set-executionpolicy bypass
       Profile.ps1 under

%UserProfile%\Documents\WindowsPowerShell       Microsoft.PowerShell_profile.ps1 (for basic shell)            
       Microsoft.PowerShellISE_profile.ps1
(for the GUI) 

RDM REPORT - Datastore, RDM, LUN Visibility on Hosts (Node Visibility) output xls
  1. http://www.lucd.info/2010/04/09/lun-report-datastores-rdms-and-node-visibility/