Changeset 81084 in vbox
- Timestamp:
- Sep 30, 2019 3:55:04 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 133690
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp
r80948 r81084 470 470 { 471 471 { "--image-id", 'i', RTGETOPT_REQ_STRING }, 472 { "--boot-volume-id", 'v', RTGETOPT_REQ_STRING }, 472 473 { "--display-name", 'n', RTGETOPT_REQ_STRING }, 473 474 { "--launch-mode", 'm', RTGETOPT_REQ_STRING }, … … 495 496 ComPtr<IVirtualSystemDescription> pVSD = virtualSystemDescriptions[0]; 496 497 497 Utf8Str strDisplayName, strImageId ;498 Utf8Str strDisplayName, strImageId, strBootVolumeId; 498 499 int c; 499 500 while ((c = RTGetOpt(&GetState, &ValueUnion)) != 0) … … 504 505 strImageId = ValueUnion.psz; 505 506 pVSD->AddDescription(VirtualSystemDescriptionType_CloudImageId, 507 Bstr(ValueUnion.psz).raw(), 508 Bstr(ValueUnion.psz).raw()); 509 break; 510 511 case 'v': 512 strBootVolumeId = ValueUnion.psz; 513 pVSD->AddDescription(VirtualSystemDescriptionType_CloudBootVolumeId, 506 514 Bstr(ValueUnion.psz).raw(), 507 515 Bstr(ValueUnion.psz).raw()); … … 564 572 } 565 573 566 if (strImageId.isEmpty()) 567 return errorArgument("Missing parameter --image-id."); 574 if (strImageId.isNotEmpty() && strBootVolumeId.isNotEmpty()) 575 return errorArgument("Parameters --image-id and --boot-volume-id are mutually exclusive. " 576 "Only one of them must be presented."); 577 578 if (strImageId.isEmpty() && strBootVolumeId.isEmpty()) 579 return errorArgument("Missing parameter --image-id or --boot-volume-id. One of them must be presented."); 568 580 569 581 ComPtr<ICloudProfile> pCloudProfile = pCommonOpts->profile.pCloudProfile; … … 600 612 #endif 601 613 602 RTPrintf("Creating cloud instance with name \'%s\' from the image \'%s\'...\n", 603 strDisplayName.c_str(), strImageId.c_str()); 604 614 if (strImageId.isNotEmpty()) 615 RTPrintf("Creating cloud instance with name \'%s\' from the image \'%s\'...\n", 616 strDisplayName.c_str(), strImageId.c_str()); 617 else 618 RTPrintf("Creating cloud instance with name \'%s\' from the boot volume \'%s\'...\n", 619 strDisplayName.c_str(), strBootVolumeId.c_str()); 605 620 606 621 CHECK_ERROR2_RET(hrc, oCloudClient, LaunchVM(pVSD, pProgress.asOutParam()), RTEXITCODE_FAILURE); -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r80824 r81084 4035 4035 <enum 4036 4036 name="VirtualSystemDescriptionType" 4037 uuid=" 6d85a5f8-d305-11e9-986e-f3fb16e309d4"4037 uuid="eca6989c-1de0-456b-8c4f-49c609791156" 4038 4038 > 4039 4039 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of … … 4098 4098 <const name="CloudOCILaunchMode" value="43" /> 4099 4099 <const name="CloudPrivateIP" value="44" /> 4100 <const name="CloudBootVolumeId" value="45" /> 4100 4101 </enum> 4101 4102
Note:
See TracChangeset
for help on using the changeset viewer.