VirtualBox

Changeset 20945 in vbox


Ignore:
Timestamp:
Jun 25, 2009 2:34:57 PM (15 years ago)
Author:
vboxsync
Message:

API/HardDisk: allow cloning to existing images. just a stub for now.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

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

    r20842 r20945  
    15951595    try
    15961596    {
    1597         if (target->m.state != MediaState_NotCreated)
     1597        if (    target->m.state != MediaState_NotCreated
     1598            &&  target->m.state != MediaState_Created)
    15981599            throw target->setStateError();
     1600
     1601        /** @todo implement the cloning to existing media */
     1602        if (target->m.state == MediaState_Created)
     1603            throw setError (E_NOTIMPL, tr ("This cloning variant is not implemented"));
    15991604
    16001605        /** @todo separate out creating/locking an image chain from
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r20928 r20945  
    96079607        </note>
    96089608        <result name="VBOX_E_OBJECT_IN_USE">
    9609           Hard disk not in NotCreated state.
     9609          Hard disk not in @c NotCreated state.
    96109610        </result>
    96119611      </desc>
     
    97089708        location defined by the @a target argument.
    97099709
    9710         The target hard disk must be in <link to="MediaState_NotCreated"/>
    9711         state (i.e. must not have an existing storage unit). Upon successful
    9712         completion, the cloned hard disk will contain exactly the same sector
    9713         data as the hard disk being cloned, except that a new UUID for the
    9714         clone will be randomly generated.
     9710        The target hard disk must be either in <link to="MediaState_NotCreated"/>
     9711        state (i.e. must not have an existing storage unit) or in
     9712        <link to="MediaState_Created"/> state (i.e. created and not locked, and
     9713        big enough to hold the data or else the copy will be partial). Upon
     9714        successful completion, the cloned hard disk will contain exactly the
     9715        same sector data as the hard disk being cloned, except that in the
     9716        first case a new UUID for the clone will be randomly generated, and in
     9717        the second case the UUID will remain unchanged.
    97159718
    97169719        The @a parent argument defines which hard disk will be the parent
     
    97299732          state for the duration of this operation.
    97309733        </note>
     9734        <result name="E_NOTIMPL">
     9735          The specified cloning variant is not supported at the moment.
     9736        </result>
    97319737      </desc>
    97329738      <param name="target" type="IHardDisk" dir="in">
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