Changeset 68133 in vbox
- Timestamp:
- Jul 27, 2017 9:44:28 AM (7 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
r68129 r68133 1531 1531 */ 1532 1532 ComPtr<IUnattended> ptrUnattended; 1533 CHECK_ERROR_BREAK(machine, CreateUnattendedInstaller(ptrUnattended.asOutParam())); 1533 CHECK_ERROR_BREAK(a->virtualBox, CreateUnattendedInstaller(ptrUnattended.asOutParam())); 1534 CHECK_ERROR_BREAK(ptrUnattended, COMSETTER(Machine)(machine)); 1534 1535 1535 1536 if (pszIsoPath) -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r68126 r68133 1900 1900 <interface 1901 1901 name="IVirtualBox" extends="$unknown" 1902 uuid=" 0169423f-46b4-cde9-91af-1e9d5b6cd945"1902 uuid="9570b9d5-f1a1-448a-10c5-e12f5285adad" 1903 1903 wsmap="managed" 1904 1904 reservedMethods="8" reservedAttributes="12" … … 2383 2383 <param name="appliance" type="IAppliance" dir="return"> 2384 2384 <desc>New appliance.</desc> 2385 </param> 2386 </method> 2387 2388 <method name="createUnattendedInstaller"> 2389 <desc> 2390 Creates a new <link to="IUnattended"/> guest installation object. This can be used to 2391 analyze an installation ISO to create and configure a new machine for it to be installed 2392 on. It can also be used to (re)install an existing machine. 2393 </desc> 2394 <param name="unattended" type="IUnattended" dir="return"> 2395 <desc>New unattended object.</desc> 2385 2396 </param> 2386 2397 </method> … … 3767 3778 <interface 3768 3779 name="IUnattended" extends="$unknown" 3769 uuid=" da34bfb3-437a-4510-6c7e-7687b00d378d"3780 uuid="3107e9fd-7b3a-4008-91de-24273f605a8e" 3770 3781 wsmap="managed" 3771 3782 reservedMethods="4" reservedAttributes="16" … … 3778 3789 The typical workflow is: 3779 3790 <ol> 3780 <li>Call <link to="IMachine::createUnattendedInstaller"/> to create the object</li> 3781 <li>Set the relevant IUnattended attributes.</li> 3791 <li>Call <link to="IVirtualBox::createUnattendedInstaller"/> to create the object</li> 3792 <li>Set <link to="IUnattended::isoPath"/> and call <link to="IUnattended::detectIsoOS"/></li> 3793 <li>Create, configure and register a machine according to <link to="IUnattended::detectedOSTypeId"/> 3794 and the other detectedOS* attributes.</li> 3795 <li>Set <link to="IUnattended::machine"/> to the new IMachine instance.</li> 3796 <li>Set the other IUnattended attributes as desired.</li> 3782 3797 <li>Call <link to="IUnattended::prepare"/> for the object to check the 3783 3798 attribute values and create an internal installer instance.</li> … … 3789 3804 installer and allow restarting from the second step.</li> 3790 3805 </ol> 3806 3807 Note! Steps one is currently not implemented. 3791 3808 </desc> 3792 3809 … … 3794 3811 <desc> 3795 3812 Guest operating system ISO image 3813 </desc> 3814 </attribute> 3815 3816 <attribute name="machine" type="IMachine"> 3817 <desc> 3818 The associated machine object. 3819 3820 This must be set before <link to="IUnattended::prepare"/> is called. 3821 The VM must be registered. 3796 3822 </desc> 3797 3823 </attribute> … … 3959 3985 Used only with Windows installation CD/DVD: 3960 3986 https://technet.microsoft.com/en-us/library/cc766022%28v=ws.10%29.aspx 3961 </desc>3962 </attribute>3963 3964 <attribute name="machine" type="IMachine" readonly="yes">3965 <desc>3966 The associated machine object.3967 3987 </desc> 3968 3988 </attribute> … … 4723 4743 <interface 4724 4744 name="IMachine" extends="$unknown" 4725 uuid=" b2547866-a0a1-4391-8b86-6952d82efaa0"4745 uuid="f50b24f0-0956-453c-d14c-8c27c683c295" 4726 4746 wsmap="managed" 4727 4747 wrap-hint-server-addinterfaces="IInternalMachineControl" … … 8172 8192 <param name="progress" type="IProgress" dir="return"> 8173 8193 <desc>Progress object to track the operation completion.</desc> 8174 </param>8175 </method>8176 8177 <method name="createUnattendedInstaller">8178 <desc>8179 Creates a new <link to="IUnattended"/> guest installation object.8180 </desc>8181 <param name="unattended" type="IUnattended" dir="return">8182 <desc>New unattended object.</desc>8183 8194 </param> 8184 8195 </method> -
trunk/src/VBox/Main/include/MachineImpl.h
r68024 r68133 1198 1198 HRESULT restoreSnapshot(const ComPtr<ISnapshot> &aSnapshot, 1199 1199 ComPtr<IProgress> &aProgress); 1200 HRESULT createUnattendedInstaller(ComPtr<IUnattended> &aUnattended);1201 1200 HRESULT applyDefaults(const com::Utf8Str &aFlags); 1202 1201 -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r66938 r68133 300 300 std::vector<MachineState_T> &aStates); 301 301 HRESULT createAppliance(ComPtr<IAppliance> &aAppliance); 302 HRESULT createUnattendedInstaller(ComPtr<IUnattended> &aUnattended); 302 303 HRESULT createMedium(const com::Utf8Str &aFormat, 303 304 const com::Utf8Str &aLocation, -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r68024 r68133 44 44 #include "MachineImplCloneVM.h" 45 45 #include "AutostartDb.h" 46 #ifdef VBOX_WITH_UNATTENDED47 # include "UnattendedImpl.h"48 #endif49 46 #include "SystemPropertiesImpl.h" 50 47 … … 15115 15112 } 15116 15113 15117 HRESULT Machine::createUnattendedInstaller(ComPtr<IUnattended> &aUnattended)15118 {15119 #ifdef VBOX_WITH_UNATTENDED15120 ComObjPtr<Unattended> ptrUnattended;15121 HRESULT hrc = ptrUnattended.createObject();15122 if (SUCCEEDED(hrc))15123 {15124 AutoReadLock wlock(this COMMA_LOCKVAL_SRC_POS);15125 hrc = ptrUnattended->init(this);15126 if (SUCCEEDED(hrc))15127 hrc = ptrUnattended.queryInterfaceTo(aUnattended.asOutParam());15128 }15129 return hrc;15130 #else15131 NOREF(aUnattended);15132 return E_NOTIMPL;15133 #endif15134 }15135 15136 15114 HRESULT Machine::applyDefaults(const com::Utf8Str &aFlags) 15137 15115 { -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r67642 r68133 70 70 #ifdef VBOX_WITH_EXTPACK 71 71 # include "ExtPackManagerImpl.h" 72 #endif 73 #ifdef VBOX_WITH_UNATTENDED 74 # include "UnattendedImpl.h" 72 75 #endif 73 76 #include "AutostartDb.h" … … 1799 1802 } 1800 1803 1804 HRESULT VirtualBox::createUnattendedInstaller(ComPtr<IUnattended> &aUnattended) 1805 { 1806 #ifdef VBOX_WITH_UNATTENDED 1807 ComObjPtr<Unattended> ptrUnattended; 1808 HRESULT hrc = ptrUnattended.createObject(); 1809 if (SUCCEEDED(hrc)) 1810 { 1811 AutoReadLock wlock(this COMMA_LOCKVAL_SRC_POS); 1812 hrc = ptrUnattended->initUnattended(this); 1813 if (SUCCEEDED(hrc)) 1814 hrc = ptrUnattended.queryInterfaceTo(aUnattended.asOutParam()); 1815 } 1816 return hrc; 1817 #else 1818 NOREF(aUnattended); 1819 return E_NOTIMPL; 1820 #endif 1821 } 1822 1801 1823 HRESULT VirtualBox::createMedium(const com::Utf8Str &aFormat, 1802 1824 const com::Utf8Str &aLocation,
Note:
See TracChangeset
for help on using the changeset viewer.