VirtualBox

Ignore:
Timestamp:
Oct 12, 2009 3:34:36 PM (15 years ago)
Author:
vboxsync
Message:

Main,++: Added MachineState_MigratingFrom for use during startup on the migration target.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r23669 r23703  
    47304730     * any error reporting and appropriate state change! */
    47314731
    4732     if (   mMachineState == MachineState_Saved
    4733         || fLiveMigrationTarget)
     4732    if (mMachineState == MachineState_Saved)
    47344733        setMachineState(MachineState_Restoring);
     4734    else if (fLiveMigrationTarget)
     4735        setMachineState(MachineState_MigratingFrom);
    47354736    else
    47364737        setMachineState(MachineState_Starting);
     
    47984799              mMachineState == MachineState_Starting ||
    47994800              mMachineState == MachineState_Restoring ||
     4801              mMachineState == MachineState_MigratingFrom || /** @todo LiveMigration ???*/
    48004802              mMachineState == MachineState_Stopping,
    48014803              ("Invalid machine state: %s\n", Global::stringifyMachineState(mMachineState)));
     
    48094811     * powerUpThread() is calling us on failure, so the VM is already off at
    48104812     * that point. */
    4811     if (!mVMPoweredOff &&
    4812         (mMachineState == MachineState_Starting ||
    4813          mMachineState == MachineState_Restoring))
     4813    if (   !mVMPoweredOff
     4814        && (   mMachineState == MachineState_Starting
     4815            || mMachineState == MachineState_Restoring
     4816            || mMachineState == MachineState_MigratingFrom)
     4817       )
    48144818        mVMPoweredOff = true;
    48154819
     
    48194823     * inappropriate operations while leaving the lock below, Saving or
    48204824     * Restoring should be fine too */
    4821     if (mMachineState != MachineState_Saving &&
    4822         mMachineState != MachineState_Restoring &&
    4823         mMachineState != MachineState_Stopping)
     4825    if (   mMachineState != MachineState_Saving
     4826        && mMachineState != MachineState_Restoring
     4827        && mMachineState != MachineState_MigratingFrom
     4828        && mMachineState != MachineState_Stopping
     4829       )
    48244830        setMachineState(MachineState_Stopping);
    48254831
     
    55045510            if (   that->mMachineState != MachineState_Stopping
    55055511                && that->mMachineState != MachineState_Saving
    5506                 && that->mMachineState != MachineState_Restoring)
     5512                && that->mMachineState != MachineState_Restoring
     5513                && that->mMachineState != MachineState_MigratingFrom
     5514               )
    55075515            {
    55085516                LogFlowFunc(("VM has powered itself off but Console still thinks it is running. Notifying.\n"));
     
    55985606                    that->setMachineState(MachineState_Saved);
    55995607                    break;
     5608                case MachineState_MigratingFrom:
     5609                    /* Migration failed or was cancelled.  Back to powered off. */
     5610                    that->setMachineState(MachineState_PoweredOff);
     5611                    break;
    56005612            }
    56015613            break;
     
    56355647                           && aOldState == VMSTATE_POWERING_ON)
    56365648                       || (   (   that->mMachineState == MachineState_Restoring
     5649                               || that->mMachineState == MachineState_MigratingFrom
    56375650                               || that->mMachineState == MachineState_Paused)
    56385651                           && aOldState == VMSTATE_RESUMING));
     
    68286841    catch (HRESULT aRC) { rc = aRC; }
    68296842
    6830     if (console->mMachineState == MachineState_Starting ||
    6831         console->mMachineState == MachineState_Restoring)
     6843    if (   console->mMachineState == MachineState_Starting
     6844        || console->mMachineState == MachineState_Restoring
     6845        || console->mMachineState == MachineState_MigratingFrom
     6846       )
    68326847    {
    68336848        /* We are still in the Starting/Restoring state. This means one of:
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