VirtualBox

Opened 6 years ago

Last modified 6 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:

  1. 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).
  2. Shut down the guest.
  3. Connect the USB drive to the host.
  4. 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.
  5. Start the guest.
  6. Check that the hotplug disk is there: ls /dev/sdb1
  7. Unplug the disk: echo 1 > /sys/block/sdb/device/delete
  8. Check that the hotplug disk is unplugged (output should be an error message): ls /dev/sdb1
  9. Disconnect the USB drive from the host.
  10. Shut down the guest.
  11. 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).

Change History (1)

comment:1 by Socratis, 6 years ago

I believe you have an over-complicated description. Steps 1-11 can be summarized as follows:

You cannot start the VM if a VDI is missing, even if the VDI is set as hotpluggable.


This pretty much describes your problem, right?. Because you would get the exact same behavior under the following conditions:

  • The VDI was or wasn't hotplugable.
  • The VDI was or wasn't residing in a USB drive.
  • And BTW, this is independent of host or guest.

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... :)

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use