Skip to content

VMware VM: Hot Add Virtual Disk

From time-to-time, I find myself needing to hot add a virtual disk to a VM and expand capacity. While the process has improved over time, I still occasionally run into issues on Linux. In the post, I will cover potential issues and provide a workaround.

To add a hard drive or network card to a running VM, go to the settings of the VM and add the appropriate device. Answer the prompts that follow and select OK to add the new resource. Once the task shows as completed, the resource has been added to the VM. Although the resource has been added to the VM, the VM may not see the new hardware without manual intervention.

  • On Windows VMs, go to the device manager or storage manager as appropriate and select scan for new devices. Once the new devices are discovered you can configure them as appropriate.
  • On Linux VMs, run a script similar to the following to discover the new hardware:

Unfortunately, when I ran the above script on a 64-bit Ubuntu VM running 10.04, it did not add the drive. Upon manually executing the commands, I received the following:

To confirm the drive has not be discovered, I ran:

The hard drive I had just added was the third hard drive for the VM so as you can see the drive was not being seen. Based on the information from the previous command, I attempted to manually add the drive by running:

Still, the hard drive was not be discovered. Running out of ideas, I installed a third-party tool by running: apt-get install scsitools. After installation, the tool can be run as follows:

As you can see, this tool was successfully able to discover the new hard drive. While I finally found a workaround to this problem, I am curious why the other methods did not work and if there is an easier way to hot add a hard drive to a running Ubuntu VM.

© 2015, Steve Flanders. All rights reserved.

Published inVMware

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *