Changeset 24136 in vbox for trunk/src/VBox
- Timestamp:
- Oct 28, 2009 12:48:41 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 54055
- Location:
- trunk/src/VBox
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r23998 r24136 237 237 " [--teleporterport <port>]\n" 238 238 " [--teleporteraddress <address|empty>\n" 239 " [--teleporterpassword <password>]\n"); 239 " [--teleporterpassword <password>]\n" 240 " [--hardwareuuid <uuid>]\n" 241 ); 240 242 RTPrintf("\n"); 241 243 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r23884 r24136 146 146 147 147 BOOL accessible = FALSE; 148 CHECK_ERROR (machine, COMGETTER(Accessible)(&accessible));149 CheckComRCReturnRC 148 CHECK_ERROR(machine, COMGETTER(Accessible)(&accessible)); 149 CheckComRCReturnRC(rc); 150 150 151 151 Bstr uuid; 152 rc = machine->COMGETTER(Id) 152 rc = machine->COMGETTER(Id)(uuid.asOutParam()); 153 153 154 154 if (!accessible) … … 161 161 RTPrintf("name=\"<inaccessible>\"\n"); 162 162 else 163 RTPrintf 163 RTPrintf("Name: <inaccessible!>\n"); 164 164 if (details == VMINFO_MACHINEREADABLE) 165 RTPrintf 166 else 167 RTPrintf 165 RTPrintf("UUID=\"%s\"\n", Utf8Str(uuid).raw()); 166 else 167 RTPrintf("UUID: %s\n", Utf8Str(uuid).raw()); 168 168 if (details != VMINFO_MACHINEREADABLE) 169 169 { 170 170 Bstr settingsFilePath; 171 rc = machine->COMGETTER(SettingsFilePath) 172 RTPrintf 171 rc = machine->COMGETTER(SettingsFilePath)(settingsFilePath.asOutParam()); 172 RTPrintf("Config file: %lS\n", settingsFilePath.raw()); 173 173 ComPtr<IVirtualBoxErrorInfo> accessError; 174 rc = machine->COMGETTER(AccessError) 175 RTPrintf 176 ErrorInfo ei 174 rc = machine->COMGETTER(AccessError)(accessError.asOutParam()); 175 RTPrintf("Access error details:\n"); 176 ErrorInfo ei(accessError); 177 177 GluePrintErrorInfo(ei); 178 RTPrintf 178 RTPrintf("\n"); 179 179 } 180 180 } … … 218 218 else 219 219 RTPrintf("Config file: %lS\n", settingsFilePath.raw()); 220 221 Bstr strHardwareUuid; 222 rc = machine->COMGETTER(HardwareUUID)(strHardwareUuid.asOutParam()); 223 if (details == VMINFO_MACHINEREADABLE) 224 RTPrintf("HardwareUUID=\"%s\"\n", strHardwareUuid.raw()); 225 else 226 RTPrintf("Hardware UUID: %lS\n", strHardwareUuid.raw()); 220 227 221 228 ULONG memorySize; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r24135 r24136 126 126 MODIFYVM_TELEPORTER_PORT, 127 127 MODIFYVM_TELEPORTER_ADDRESS, 128 MODIFYVM_TELEPORTER_PASSWORD 128 MODIFYVM_TELEPORTER_PASSWORD, 129 MODIFYVM_HARDWARE_UUID 129 130 }; 130 131 … … 201 202 { "--teleporteraddress", MODIFYVM_TELEPORTER_ADDRESS, RTGETOPT_REQ_STRING }, 202 203 { "--teleporterpassword", MODIFYVM_TELEPORTER_PASSWORD, RTGETOPT_REQ_STRING }, 204 { "--hardwareuuid", MODIFYVM_HARDWARE_UUID, RTGETOPT_REQ_STRING }, 203 205 }; 204 206 … … 1816 1818 } 1817 1819 1820 case MODIFYVM_HARDWARE_UUID: 1821 { 1822 CHECK_ERROR(machine, COMSETTER(HardwareUUID)(Bstr(ValueUnion.psz))); 1823 break; 1824 } 1825 1818 1826 default: 1819 1827 { -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r23894 r24136 199 199 hrc = pMachine->COMGETTER(BIOSSettings)(biosSettings.asOutParam()); H(); 200 200 201 hrc = pMachine->COMGETTER( Id)(&str);H();202 Guid MachineUuid(str);203 PCRTUUID pUuid = MachineUuid.raw();201 hrc = pMachine->COMGETTER(HardwareUUID)(&str); H(); 202 RTUUID HardwareUuid; 203 rc = RTUuidFromUtf16(&HardwareUuid, str); RC_CHECK(); 204 204 STR_FREE(); 205 205 … … 234 234 hrc = pMachine->COMGETTER(Name)(&str); H(); 235 235 rc = CFGMR3InsertStringW(pRoot, "Name", str); RC_CHECK(); 236 rc = CFGMR3InsertBytes(pRoot, "UUID", pUuid, sizeof(*pUuid));RC_CHECK();236 rc = CFGMR3InsertBytes(pRoot, "UUID", &HardwareUuid, sizeof(HardwareUuid)); RC_CHECK(); 237 237 rc = CFGMR3InsertInteger(pRoot, "RamSize", cbRam); RC_CHECK(); 238 238 rc = CFGMR3InsertInteger(pRoot, "RamHoleSize", cbRamHole); RC_CHECK(); … … 705 705 rc = CFGMR3InsertInteger(pBiosCfg, "IOAPIC", fIOAPIC); RC_CHECK(); 706 706 rc = CFGMR3InsertInteger(pBiosCfg, "PXEDebug", fPXEDebug); RC_CHECK(); 707 rc = CFGMR3InsertBytes(pBiosCfg, "UUID", pUuid, sizeof(*pUuid));RC_CHECK();707 rc = CFGMR3InsertBytes(pBiosCfg, "UUID", &HardwareUuid,sizeof(HardwareUuid));RC_CHECK(); 708 708 709 709 DeviceType_T bootDevice; -
trunk/src/VBox/Main/MachineImpl.cpp
r24090 r24136 213 213 214 214 if (mHWVersion != that.mHWVersion || 215 mHardwareUUID != that.mHardwareUUID || 215 216 mMemorySize != that.mMemorySize || 216 217 mMemoryBalloonSize != that.mMemoryBalloonSize || … … 988 989 mHWData.backup(); 989 990 mHWData->mHWVersion = hwVersion; 991 992 return S_OK; 993 } 994 995 STDMETHODIMP Machine::COMGETTER(HardwareUUID)(BSTR *aUUID) 996 { 997 CheckComArgOutPointerValid(aUUID); 998 999 AutoCaller autoCaller(this); 1000 CheckComRCReturnRC(autoCaller.rc()); 1001 1002 AutoReadLock alock(this); 1003 1004 if (!mHWData->mHardwareUUID.isEmpty()) 1005 mHWData->mHardwareUUID.toUtf16().cloneTo(aUUID); 1006 else 1007 mData->mUuid.toUtf16().cloneTo(aUUID); 1008 1009 return S_OK; 1010 } 1011 1012 STDMETHODIMP Machine::COMSETTER(HardwareUUID) (IN_BSTR aUUID) 1013 { 1014 Guid hardwareUUID(aUUID); 1015 if (hardwareUUID.isEmpty()) 1016 return E_INVALIDARG; 1017 1018 AutoCaller autoCaller(this); 1019 CheckComRCReturnRC(autoCaller.rc()); 1020 1021 AutoWriteLock alock(this); 1022 1023 HRESULT rc = checkStateDependency(MutableStateDep); 1024 CheckComRCReturnRC(rc); 1025 1026 mHWData.backup(); 1027 if (hardwareUUID == mData->mUuid) 1028 mHWData->mHardwareUUID.clear(); 1029 else 1030 mHWData->mHardwareUUID = hardwareUUID; 990 1031 991 1032 return S_OK; … … 5304 5345 /* The hardware version attribute (optional). */ 5305 5346 mHWData->mHWVersion = data.strVersion; 5347 mHWData->mHardwareUUID = data.uuid; 5306 5348 5307 5349 mHWData->mHWVirtExEnabled = data.fHardwareVirt; … … 6251 6293 6252 6294 data.strVersion = mHWData->mHWVersion; 6295 data.uuid = mHWData->mHardwareUUID; 6253 6296 6254 6297 // CPU -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r24075 r24136 4059 4059 <interface 4060 4060 name="IMachine" extends="$unknown" 4061 uuid=" db35f17a-179f-4332-91b2-a49d5cfb678c"4061 uuid="37642E74-969A-4590-BD52-390E541F904D" 4062 4062 wsmap="managed" 4063 4063 > … … 4236 4236 </attribute> 4237 4237 4238 <attribute name="hardwareUUID" type="uuid" mod="string"> 4239 <desc> 4240 The UUID presented to the guest via memory tables, hardware and guest 4241 properties. For most VMs this is the same as the @a id, but for VMs 4242 which have been cloned or teleported it may be the same as the source 4243 VM. This latter is because the guest shouldn't notice that it was 4244 cloned or teleported. 4245 </desc> 4246 </attribute> 4247 4238 4248 <attribute name="CPUCount" type="unsigned long"> 4239 4249 <desc>Number of virtual CPUs in the VM.</desc> … … 11947 11957 <attribute name="ports" type="wstring"> 11948 11958 <desc> 11949 VRDP server port numbers. The server will try to bind to one of free ports from the list. 11959 VRDP server port numbers. The server will try to bind to one of free ports from the list. 11950 11960 <note> 11951 11961 This is a string of comma separated TCP port numbers or port number ranges. -
trunk/src/VBox/Main/include/MachineImpl.h
r23928 r24136 282 282 283 283 Bstr mHWVersion; 284 Guid mHardwareUUID; /**< If Null, use mData.mUuid. */ 284 285 ULONG mMemorySize; 285 286 ULONG mMemoryBalloonSize; … … 521 522 STDMETHOD(COMGETTER(HardwareVersion))(BSTR *aVersion); 522 523 STDMETHOD(COMSETTER(HardwareVersion))(IN_BSTR aVersion); 524 STDMETHOD(COMGETTER(HardwareUUID))(BSTR *aUUID); 525 STDMETHOD(COMSETTER(HardwareUUID))(IN_BSTR aUUID); 523 526 STDMETHOD(COMGETTER(MemorySize))(ULONG *memorySize); 524 527 STDMETHOD(COMSETTER(MemorySize))(ULONG memorySize); -
trunk/src/VBox/Main/xml/Settings.cpp
r23808 r24136 1447 1447 // defaults to 2 and is only written if != 2 1448 1448 1449 Utf8Str strUUID; 1450 if (elmHardware.getAttributeValue("uuid", strUUID)) 1451 parseUUID(hw.uuid, strUUID); 1452 else 1453 hw.uuid.clear(); 1454 1449 1455 xml::NodesLoop nl1(elmHardware); 1450 1456 const xml::ElementNode *pelmHwChild; … … 2330 2336 if (hw.strVersion != "2") 2331 2337 pelmHardware->setAttribute("version", hw.strVersion); 2338 if (!hw.uuid.isEmpty()) 2339 pelmHardware->setAttribute("uuid", makeString(hw.uuid)); 2332 2340 2333 2341 xml::ElementNode *pelmCPU = pelmHardware->createChild("CPU"); … … 2896 2904 ) 2897 2905 ) 2906 m->sv = SettingsVersion_v1_9; 2907 2908 if ( m->sv < SettingsVersion_v1_9 2909 && !hardwareMachine.uuid.isEmpty()) 2898 2910 m->sv = SettingsVersion_v1_9; 2899 2911 }
Note:
See TracChangeset
for help on using the changeset viewer.