Quantcast
Viewing latest article 7
Browse Latest Browse All 20

Adding a Virtual Disk Device to a VMware virtual machine (Windows 2003 Server host)

I thought it would be possible to add a virtual device file to a running virtual machine and have it show up in the virtual machine without restarting the virtual machine.  I was wrong.  The current VMware Server 1.0.6 is incapable of doing this.  What you can do is to set up the device file so all you have to do is to restart the virtual machine, minimizing downtime to a couple of minutes:

  • Create a new 20GB preallocated disk in the D:\Virtual Devices\DBA Dev 1\Disk4 directory:

D:\Virtual Machines\DBA Dev 1\Disk 4>vmware-vdiskmanager -c -a buslogic -s 20Gb -t 3 Disk4.vmdk
Using log file C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\vmware-DBH1admin\vdiskmanager.log
Creating a split preallocated disk ‘Disk4.vmdk’
Create: 100% done.
Virtual disk creation successful.

  • Associate the new virtual device file using the free scsi4 slot

D:\Virtual Machines\DBA Dev 1>vmware-cmd “D:\Virtual Machines\DBA Dev 1\Ubuntu.vmx” setconfig scsi4:1.fileName “Disk 4\Disk4.vmdk”
setconfig(scsi4:1.fileName Disk 4\Disk4.vmdk) = 1
D:\Virtual Machines\DBA Dev 1>vmware-cmd -v “D:\Virtual Machines\DBA Dev 1\Ubuntu.vmx” setconfig scsi4:1.present true
API Version: 1.01
setconfig(scsi4:1.present true) = 1

After you restart the virtual machine, the device will now show up when you run fdisk -l.


Viewing latest article 7
Browse Latest Browse All 20

Trending Articles