Wednesday, 17 February 2016

Safely Remove Hardware For Virtual Machine?

Written by Suhas Savkoor



When you have a hard disk given to a virtual machine with a SCSI controller, or a Network Interface Card provided to it, and when you login to this virtual machine, you will see our old friend, "Safely Remove Hardware" When you click this, your SCSI controller, your network card, and USB if mounted, will be displayed. Now, if you click the remove button by some mistake, the respective device will be unmounted and removed from the virtual machine. Too bad of a scenario eh? Well, not to worry, virtual machine advanced settings will always come to the rescue. 

1. Power OFF the virtual machine on which you want to disable the Safely Remove Hardware option. 
2. Right click the machine and click Edit Settings
3. Click Options, select General and click Configuration Parameters.
4. Click Add Row and under Namedevices.hotplug Under Value: false
5. Click OK.

Now power ON the virtual machine and this time the safely remove hardware option is no longer present. There was one more question that was asked:

"If I have CPU and memory hot-add option enabled will this parameter affect that operation? Also will I have issues adding disk and network card to the virtual machine once this parameter is set?"

The answer is, No. The add devices, and CPU/Memory hot-add (if enabled) will not be affected by this parameter. 
So, unplug those at your will. Life is too short for safely remove hardware!

Cheers!