Changeset 68024 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jul 18, 2017 1:54:10 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 117044
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r67898 r68024 3767 3767 <interface 3768 3768 name="IUnattended" extends="$unknown" 3769 uuid=" a6ba3585-5fc3-4465-d61d-5b70540690af"3769 uuid="b365bb45-267f-44fa-c32a-cad265372f8e" 3770 3770 wsmap="managed" 3771 3771 reservedMethods="4" reservedAttributes="16" … … 3776 3776 the Guest OS for fully automated install. 3777 3777 3778 It is based on the IMachine: 3779 <link to="IMachine::unattended"/> attribute. 3778 The typical workflow is: 3779 <ol> 3780 <li>Call <link to="IMachine::createUnattendedInstaller"/> to create the object</li> 3781 <li>Set the IUnattended attributes.</li> 3782 <li>Call <link to="IUnattended::prepare"/> for the object to check the 3783 attribute values and create an internal installer instance.</li> 3784 <li>Call <link to="IUnattended::constructMedia"/> to create additional 3785 media files (ISO/floppy) needed.</li> 3786 <li>Call <link to="IUnattended::reconfigureVM"/> to reconfigure the VM 3787 with the installation ISO, additional media files and whatnot </li> 3788 <li>Optionally call <link to="IUnattended::done"/> to destroy the internal 3789 installer and allow restarting from the second step.</li> 3790 </ol> 3780 3791 </desc> 3781 3792 … … 3815 3826 <attribute name="additionsIsoPath" type="wstring"> 3816 3827 <desc> 3817 Guest Additions ISO image path 3828 Guest Additions ISO image path. This defaults to 3829 <link to="ISystemProperties::defaultAdditionsISO"/> when the Unattended 3830 object is instantiated. 3831 3832 This property is ignored when <link to="IUnattended::installGuestAdditions"/> is false. 3818 3833 </desc> 3819 3834 </attribute> … … 3826 3841 distribution, only the installation of additions pointed to by 3827 3842 <link to="IUnattended::additionsIsoPath"/>. 3843 </desc> 3844 </attribute> 3845 3846 <attribute name="validationKitIsoPath" type="wstring"> 3847 <desc> 3848 VirtualBox ValidationKit ISO image path. This is used when 3849 <link to="IUnattended::installTestExecService"/> is set to true. 3850 </desc> 3851 </attribute> 3852 3853 <attribute name="installTestExecService" type="boolean"> 3854 <desc> 3855 Indicates whether the test execution service (TXS) from the VBox 3856 ValidationKit should be installed. 3857 3858 The TXS binary will be taken from the ISO indicated by 3859 <link to="IUnattended::validationKitIsoPath"/>. 3828 3860 </desc> 3829 3861 </attribute> … … 3846 3878 Used only with Windows installation CD/DVD: 3847 3879 https://technet.microsoft.com/en-us/library/cc766022%28v=ws.10%29.aspx 3880 </desc> 3881 </attribute> 3882 3883 <attribute name="machine" type="IMachine" readonly="yes"> 3884 <desc> 3885 The associated machine object. 3886 </desc> 3887 </attribute> 3888 3889 <attribute name="scriptTemplatePath" type="wstring"> 3890 <desc> 3891 The unattended installation script template file. 3892 3893 The template default is based on the guest OS type and is determined by the 3894 internal installer when when <link to="IUnattended::prepare"/> is invoked. 3895 Most users will want the defaults. 3896 3897 After <link to="IUnattended::prepare"/> is called, it can be read to see 3898 which file is being used. 3848 3899 </desc> 3849 3900 </attribute> … … 5386 5437 </attribute> 5387 5438 5388 <attribute name="unattended" type="IUnattended" readonly="yes">5389 <desc>Associated unattended install class, always present.</desc>5390 </attribute>5391 5392 5439 <method name="lockMachine"> 5393 5440 <desc> … … 7968 8015 <param name="progress" type="IProgress" dir="return"> 7969 8016 <desc>Progress object to track the operation completion.</desc> 8017 </param> 8018 </method> 8019 8020 <method name="createUnattendedInstaller"> 8021 <desc> 8022 Creates a new <link to="IUnattended"/> guest installation object. 8023 </desc> 8024 <param name="unattended" type="IUnattended" dir="return"> 8025 <desc>New unattended object.</desc> 7970 8026 </param> 7971 8027 </method> -
trunk/src/VBox/Main/include/MachineImpl.h
r67738 r68024 776 776 const ComObjPtr<BIOSSettings> mBIOSSettings; 777 777 const ComObjPtr<BandwidthControl> mBandwidthControl; 778 #ifdef VBOX_WITH_UNATTENDED779 const ComObjPtr<Unattended> mUnattended;780 #endif781 778 782 779 typedef std::vector<ComObjPtr<NetworkAdapter> > NetworkAdapterVector; … … 984 981 HRESULT getVMProcessPriority(com::Utf8Str &aVMProcessPriority); 985 982 HRESULT setVMProcessPriority(const com::Utf8Str &aVMProcessPriority); 986 HRESULT getUnattended(ComPtr<IUnattended> &aUnattended);987 983 988 984 // wrapped IMachine methods … … 1202 1198 HRESULT restoreSnapshot(const ComPtr<ISnapshot> &aSnapshot, 1203 1199 ComPtr<IProgress> &aProgress); 1200 HRESULT createUnattendedInstaller(ComPtr<IUnattended> &aUnattended); 1204 1201 HRESULT applyDefaults(const com::Utf8Str &aFlags); 1205 1202 -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r67738 r68024 7184 7184 } 7185 7185 7186 HRESULT Machine::getUnattended(ComPtr<IUnattended> &aUnattended)7187 {7188 #ifdef VBOX_WITH_UNATTENDED7189 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);7190 if (mUnattended.isNotNull())7191 aUnattended = mUnattended;7192 else7193 {7194 /* Do on-demand creation. */7195 alock.release();7196 AutoWriteLock wlock(this COMMA_LOCKVAL_SRC_POS);7197 if (mUnattended.isNull())7198 {7199 unconst(mUnattended).createObject();7200 HRESULT hrc = mUnattended->init(this);7201 if (FAILED(hrc))7202 {7203 mUnattended->uninit();7204 unconst(mUnattended).setNull();7205 return hrc;7206 }7207 }7208 aUnattended = mUnattended;7209 }7210 return S_OK;7211 #else7212 NOREF(aUnattended);7213 return E_NOTIMPL;7214 #endif7215 }7216 7217 7186 HRESULT Machine::cloneTo(const ComPtr<IMachine> &aTarget, CloneMode_T aMode, const std::vector<CloneOptions_T> &aOptions, 7218 7187 ComPtr<IProgress> &aProgress) … … 8445 8414 mBandwidthControl->init(this); 8446 8415 8447 #ifdef VBOX_WITH_UNATTENDED8448 Assert(mUnattended.isNull()); /* Created on-demand. */8449 #endif8450 8451 8416 return S_OK; 8452 8417 } … … 8525 8490 unconst(mBIOSSettings).setNull(); 8526 8491 } 8527 8528 #ifdef VBOX_WITH_UNATTENDED8529 if (mUnattended)8530 {8531 mUnattended->uninit();8532 unconst(mUnattended).setNull();8533 }8534 #endif8535 8492 8536 8493 /* Deassociate media (only when a real Machine or a SnapshotMachine … … 15158 15115 } 15159 15116 15117 HRESULT Machine::createUnattendedInstaller(ComPtr<IUnattended> &aUnattended) 15118 { 15119 #ifdef VBOX_WITH_UNATTENDED 15120 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 #else 15131 NOREF(aUnattended); 15132 return E_NOTIMPL; 15133 #endif 15134 } 15135 15160 15136 HRESULT Machine::applyDefaults(const com::Utf8Str &aFlags) 15161 15137 {
Note:
See TracChangeset
for help on using the changeset viewer.