Opened 7 years ago
Last modified 7 years ago
#17506 new enhancement
It should be possible to boot a guest with an unconnected hotplug disk
Reported by: | dlippold | Owned by: | |
---|---|---|---|
Component: | virtual disk | Version: | VirtualBox 5.2.4 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | Windows |
Description
If there is a hotplug virtual disk (a VDI file on an external drive) attached to a SATA controller, the virtual disk is unplugged in the running guest, the external drive is removed and the guest is shutdown, then the guest cannot be booted anymore. I got the following message:
Could not open the medium 'E:\VirtualBoxDisks\Lubuntu-16.04-Backup.vdi'. VD: error VERR_PATH_NOT_FOUND opening image file 'E:\VirtualBoxDisks\Lubuntu-16.04-Backup.vdi' (VERR_PATH_NOT_FOUND). Fehlercode: E_FAIL (0x80004005) Komponente: MediumWrap Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
Steps to reproduce the problem:
- Assume you have a Windows 7 host (other host may have the same problem), an USB drive (an USB stick may have the same problem) and a Linux guest (other guests may have the same problem).
- Shut down the guest.
- Connect the USB drive to the host.
- Add a new virtual disk to the guest as a VDI file on the USB drive with a virtual SATA controller. Mark the virtual disk as hotpluggable.
- Start the guest.
- Check that the hotplug disk is there:
ls /dev/sdb1
- Unplug the disk:
echo 1 > /sys/block/sdb/device/delete
- Check that the hotplug disk is unplugged (output should be an error message):
ls /dev/sdb1
- Disconnect the USB drive from the host.
- Shut down the guest.
- Start the guest.
For a simple test you can omit the steps 5 to 8 and 10.
From my point of view a hotplug disk should be handed like a DVD: It is not necessary that it there (is in the drive) to boot the guest.
Workaround: Disconnect the hotplug disk by hand from the SATA controller before booting, in cold state between step 10 and 11 (in the GUI or by the command VBoxManage storagectl
).
I believe you have an over-complicated description. Steps 1-11 can be summarized as follows:
This pretty much describes your problem, right?. Because you would get the exact same behavior under the following conditions:
When you add/remove a VDI, you modify the .vbox file, the VM "recipe". What you're asking for is to be able to start the VM even if a VDI from the recipe is physically missing.
As you were told, and you also said in the forums, the situation can be changed at run-time with the "
VBoxManage storageattach
" command.Please don't answer here, but in the related discussion in the forums: https://forums.virtualbox.org/viewtopic.php?f=6&t=86421. That's what "forums" means after all; a public place for discussion... :)