VirtualBox

Changeset 36898 in vbox


Ignore:
Timestamp:
Apr 29, 2011 3:34:05 PM (14 years ago)
Author:
vboxsync
Message:

Main/Machine: first draft of method for cloning entire machines

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r36887 r36898  
    34993499  <interface
    35003500    name="IMachine" extends="$unknown"
    3501     uuid="662c175e-a69d-40b8-a77a-1d719d0ab062"
     3501    uuid="59d09c78-2558-45c8-a95e-8761d70fdc95"
    35023502    wsmap="managed"
    35033503    >
     
    59175917      </param>
    59185918    </method>
     5919
     5920    <method name="cloneTo">
     5921      <desc>
     5922        Creates a clone of this machine, either as a full clone (which means
     5923        creating independent copies of the hard disk media), or as a linked
     5924        clone (which uses its own differencing media, sharing the parent media
     5925        with the source machine).
     5926
     5927        The target machine object must have been created previously with
     5928        <link to="IVirtualBox::createMachine"/>, and all the settings will be
     5929        transferred except the VM name, hardware UUID and the network card
     5930        MAC addresses. These can be set after the clone operation if required.
     5931        The operation is performed asynchronously, so the machine object will
     5932        be not be usable until the @a progress object signals completion. If
     5933        any step of the machine clone operation fails this will abort the
     5934        operation. The result will be a machine which is not a complete clone.
     5935        It is the responsibility of the caller to delete this incomplete
     5936        machine if desired with <link to="#unregister"/> and/or
     5937        <link to="#delete"/>.
     5938
     5939        <result name="E_INVALIDARG">
     5940          @a target is @c null.
     5941        </result>
     5942      </desc>
     5943
     5944      <param name="target" type="IMachine" dir="in">
     5945        <desc>Target machine object.</desc>
     5946      </param>
     5947      <param name="fullClone" type="boolean" dir="in">
     5948        <desc>Selects whether a full or linked clone is created.</desc>
     5949      </param>
     5950      <param name="progress" type="IProgress" dir="return">
     5951        <desc>Progress object to track the operation completion.</desc>
     5952      </param>
     5953    </method>
     5954
    59195955  </interface>
    59205956
  • trunk/src/VBox/Main/include/MachineImpl.h

    r36673 r36898  
    460460    STDMETHOD(COMGETTER(IoCacheSize)) (ULONG *aIoCacheSize);
    461461    STDMETHOD(COMSETTER(IoCacheSize)) (ULONG  aIoCacheSize);
     462    STDMETHOD(COMGETTER(PciDeviceAssignments))(ComSafeArrayOut(IPciDeviceAttachment *, aAssignments));
     463    STDMETHOD(COMGETTER(BandwidthControl))(IBandwidthControl **aBandwidthControl);
    462464
    463465    // IMachine methods
     
    527529    STDMETHOD(AttachHostPciDevice(LONG hostAddress, LONG desiredGuestAddress, BOOL tryToUnbind));
    528530    STDMETHOD(DetachHostPciDevice(LONG hostAddress));
    529     STDMETHOD(COMGETTER(PciDeviceAssignments))(ComSafeArrayOut(IPciDeviceAttachment *, aAssignments));
    530     STDMETHOD(COMGETTER(BandwidthControl))(IBandwidthControl **aBandwidthControl);
     531    STDMETHOD(CloneTo(IMachine *aTarget, BOOL aFullClone, IProgress **aProgress));
    531532    // public methods only for internal purposes
    532533
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r36839 r36898  
    60276027}
    60286028
     6029STDMETHODIMP Machine::CloneTo(IMachine *aTarget, BOOL aFullClone, IProgress **aProgress)
     6030{
     6031    NOREF(aTarget); NOREF(aFullClone); NOREF(aProgress);
     6032    ReturnComNotImplemented();
     6033}
     6034
    60296035// public methods for internal purposes
    60306036/////////////////////////////////////////////////////////////////////////////
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