Adding Physical Disks to a Virtual Machine
Use the virtual machine settings editor (VM > Settings) to add a new raw disk to your virtual machine. The virtual machine should be powered off before you begin. If it is not, shut down the guest operating system normally, then click Power Off on the VMware Workstation toolbar.
Caution: Physical disks are an advanced feature and should be configured only by expert users.
1. Open the virtual machine settings editor (VM > Settings) and click Add. The Add Hardware Wizard guides you through the steps to create your virtual disk.
2. Click Hard Disk, then click Next.
3. Select Use a physical disk, then click Next.
A warning appears. Click OK.
4. Select the physical disk characteristics and click Next.
5. If you selected Use entire disk in step 4, this step does not appear.
If you selected Use individual partitions in step 4, now select which partitions you want to use in the virtual machine.
Only the partitions you select in this step are visible to the virtual machine. All other partitions are hidden from it.
Click Next.
6. Accept the default filename and location for the file that stores access information for this raw disk — or change it, if you want to use a different name or location. To find a different directory, click Browse.
Click Advanced if you want to specify the virtual machine SCSI or IDE device node to which this disk is connected.
On the advanced settings screen, you can also specify a disk mode. This is useful in certain special-purpose configurations in which you want to exclude disks from a snapshot. For more information on the snapshot feature, see Using Snapshots.
Normal disks are included in snapshots. In most cases, this is the setting you want — withIndependent deselected.
Independent disks are not included in snapshots. If you select Independent, you have the following options:
When you have set the filename and location you want to use and have made any selections you want to make on the advanced settings screen, click Finish.
7. The wizard configures the new physical disk. If the partitions used on the physical disk are not formatted for your guest operating system, use the guest operating system's tools to format them.
Caution: After you create a physical disk using one or more partitions on a physical disk, you should never modify the partition tables by running fdisk or a similar utility in the guest operating system.
Note: If you use fdisk or a similar utility on the host operating system to modify the partition table of the physical disk, you must recreate the virtual machine's physical disk.
http://www.cyberciti.biz/tips/vmware-add-a-new-hard-disk-without-rebooting-guest.html
Rescan the SCSI Bus to Add a SCSI Device Without rebooting the VM
A rescan can be issued by typing the following command:
echo "- - -" > /sys/class/scsi_host/host#/scan
fdisk -l
tail -f /var/log/message
How Do I Delete a Single Device Called /dev/sdc?
In addition to re-scanning the entire bus, a specific device can be added or existing device deleted using the following command:
# echo 1 > /sys/block/devName/device/delete
# echo 1 > /sys/block/sdc/device/delete
How Do I Add a Single Device Called /dev/sdc?
To add a single device explicitly, use the following syntax:
# echo "scsi add-single-device <H> <B> <T> <L>" > /proc/scsi/scsi
Where,
<H> : Host
<B> : Bus (Channel)
<T> : Target (Id)
<L> : LUN numbers
For e.g. add /dev/sdc with host # 0, bus # 0, target # 2, and LUN # 0, enter:
# echo "scsi add-single-device 0 0 2 0">/proc/scsi/scsi
# fdisk -l
# cat /proc/scsi/scsi
Format a New Disk
Now, you can create partition using fdisk and format it using mkfs.ext3 command:
# fdisk /dev/sdc
# mkfs.ext3 /dev/sdc3
Step #4: Create a Mount Point And Update /etc/fstab
# mkdir /disk3
Open /etc/fstab file, enter:
# vi /etc/fstab
Label the partition
You can label the partition using e2label. For example, if you want to label the new partition /backupDisk, enter
# e2label /dev/sdc1 /backupDisk
http://www.cyberciti.biz/tips/vmware-add-a-new-hard-disk-without-rebooting-guest.html
Rescan the SCSI Bus to Add a SCSI Device Without rebooting the VM
A rescan can be issued by typing the following command:
echo "- - -" > /sys/class/scsi_host/host#/scan
fdisk -l
tail -f /var/log/message
How Do I Delete a Single Device Called /dev/sdc?
In addition to re-scanning the entire bus, a specific device can be added or existing device deleted using the following command:
# echo 1 > /sys/block/devName/device/delete
# echo 1 > /sys/block/sdc/device/delete
How Do I Add a Single Device Called /dev/sdc?
To add a single device explicitly, use the following syntax:
# echo "scsi add-single-device <H> <B> <T> <L>" > /proc/scsi/scsi
Where,
<H> : Host
<B> : Bus (Channel)
<T> : Target (Id)
<L> : LUN numbers
For e.g. add /dev/sdc with host # 0, bus # 0, target # 2, and LUN # 0, enter:
# echo "scsi add-single-device 0 0 2 0">/proc/scsi/scsi
# fdisk -l
# cat /proc/scsi/scsi
Format a New Disk
Now, you can create partition using fdisk and format it using mkfs.ext3 command:
# fdisk /dev/sdc
# mkfs.ext3 /dev/sdc3
Step #4: Create a Mount Point And Update /etc/fstab
# mkdir /disk3
Open /etc/fstab file, enter:
# vi /etc/fstab
Label the partition
You can label the partition using e2label. For example, if you want to label the new partition /backupDisk, enter
# e2label /dev/sdc1 /backupDisk
http://www.cyberciti.biz/tips/vmware-add-a-new-hard-disk-without-rebooting-guest.html





