VirtualBox

Changeset 86709 in vbox


Ignore:
Timestamp:
Oct 26, 2020 2:27:40 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
141093
Message:

The public SSH key is mandatory for the command "cloud instance create"

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/en_US/man_VBoxManage-cloud.xml

    r86157 r86709  
    6868       <arg choice="req" rep="norepeat">--shape=<replaceable>type</replaceable></arg>
    6969       <arg choice="req" rep="norepeat">--subnet=<replaceable>id</replaceable></arg>
     70       <arg choice="req" rep="repeat">--public-ssh-key=<replaceable>key string</replaceable></arg>
    7071       <arg rep="norepeat">--boot-disk-size=<replaceable>size in GB</replaceable></arg>
    7172       <arg rep="norepeat">--publicip=<replaceable>true/false</replaceable></arg>
    7273       <arg rep="norepeat">--privateip=<replaceable>IP address</replaceable></arg>
    73        <arg rep="repeat">--public-ssh-key=<replaceable>key string</replaceable></arg>
    7474       <arg rep="norepeat">--launch-mode=<replaceable>NATIVE/EMULATED/PARAVIRTUALIZED</replaceable></arg>
    7575     </cmdsynopsis>
     
    289289         1. Create an instance from an existing custom image.
    290290         2. Create an instance from an existing bootable volume. This bootable volume shouldn't  be attached to any instance.
    291         For the 1st approach next parameters are required: image-id and  boot-disk-size.
    292         For the 2nd approach next parameters are required: boot-volume-id;
     291        For the 1st approach next parameters are required: image-id, boot-disk-size and public-ssh-key.
     292        For the 2nd approach next parameters are required: boot-volume-id and public-ssh-key;
    293293        The rest parameters are common for both cases:
    294294         display-name, launch-mode, subnet-id, publicIP, privateIP, shape, domain.
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp

    r86703 r86709  
    530530
    531531    Utf8Str strDisplayName, strImageId, strBootVolumeId, strPublicSSHKey;
     532    bool fKeyPresented = false;
    532533    int c;
    533534    while ((c = RTGetOpt(&GetState, &ValueUnion)) != 0)
     
    591592                pVSD->AddDescription(VirtualSystemDescriptionType_CloudPublicSSHKey,
    592593                                     Bstr(ValueUnion.psz).raw(), NULL);
     594                if ( !strPublicSSHKey.isEmpty() )
     595                    fKeyPresented = true;
    593596                break;
    594597            case 1001:
     
    608611        return RTEXITCODE_FAILURE;
    609612
    610     if (strPublicSSHKey.isEmpty())
    611         RTPrintf("Warning!!! Public SSH key doesn't present in the passed arguments...\n");
     613    if ( !fKeyPresented )
     614        return errorArgument("Parameter --public-ssh-key is absent. if there is no need to pass a key just use the form"
     615                             " '--public-ssh-key='.");
    612616
    613617    if (strImageId.isNotEmpty() && strBootVolumeId.isNotEmpty())
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette