- Open Virtual Box settings and open File -> Virtual Media Manager
- Identify the hard disk under the tab “Hard Disks“.
- Click on it and select Copy from the options above.
- The Disk Image to Copy wizard opens and select appropriate options.
- Once the hard disk is successfully copied, select the VM where you want to mount the new hard disk.
- Open the Settings for the VM.
- Go to Storage and Click on Add New Storage Controller ICON [Choose SCSI or SAS].
- Once the controller is added, click on Add hard disk icon and choose the hard disk which was copied earlier.
- Once the hard disk is chosen, select the Solid-State Drive checkbox and click on OK to save the settings.
- The newly created hard disk will have boot sector already and so there is no problem with booting the guest OS.
- To cross-check if the boot option is available or not, start the VM and then run the command.
In this case, the guest OS is Ubuntu.
#sudo fdisk -l[This will print the hard disks available and observe the boot option if checked for both or not]
- If the boot option is available in both the disks, shut down the VM.
- Open the VM settings -> Storage again and remove the Old disk and the Controller[SATA].
- Click on OK and save the settings.
- Start the VM and now you are on SCSI/SAS controller whichever you have chosen.
- Open Virtual Box settings -> File -> Virtual Media Manager and remove the old hard disks to save space.