VirtualBox

Changeset 98101 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jan 17, 2023 10:59:59 AM (2 years ago)
Author:
vboxsync
Message:

Main/IMachine::attachDevice: Attempt at fixing r150710 regression. Looks like fHotplug was incorrectly set just to make USB media attachments always hotpluggable, with the result that attaching an MSD while the VM was powered off caused media to be in a locked state when it shouldn't and prevent the machine from powering up. bugref:8211

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r98100 r98101  
    38903890                        aName.c_str());
    38913891
    3892     /* Attaching a USB device when a VM is powered off should default to being marked as hot-pluggable */
    3893     if (!fHotplug && !Global::IsOnlineOrTransient(mData->mMachineState) && ctrlType == StorageControllerType_USB)
    3894         fHotplug = true;
    3895 
    38963892    // check that the port and device are not out of range
    38973893    rc = ctl->i_checkPortAndDeviceValid(aControllerPort, aDevice);
     
    43484344                          false /* fNonRotational */,
    43494345                          false /* fDiscard */,
    4350                           fHotplug /* fHotPluggable */,
     4346                          fHotplug || ctrlType == StorageControllerType_USB /* fHotPluggable */,
    43514347                          Utf8Str::Empty);
    43524348    if (FAILED(rc)) return rc;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette