VirtualBox

source: vbox/trunk/doc/manual/en_US/dita/topics/cloud-using-cli.dita@ 99497

Last change on this file since 99497 was 99497, checked in by vboxsync, 20 months ago

manual: Split out the topics of converted manpages into separate files and generate ditamap files for each manpage to avoid needing to hardcode anything in UserManual.xml. This means that the topics inside a manpage can be supressed from the toc, but otoh, they get numbered (with 4.x). The per-topic files are named by refentry/refsect1/refsect2 @id and are currently not cleaned up by 'kmk clean'. bugref:10302

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1<?xml version='1.0' encoding='UTF-8'?>
2<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
3<topic xml:lang="en-us" id="cloud-using-cli">
4 <title>Using VBoxManage Commands With Oracle Cloud Infrastructure</title>
5
6 <body>
7 <p>
8 This section includes some examples of how
9 <userinput>VBoxManage</userinput> commands can be used to integrate
10 with Oracle Cloud Infrastructure and perform common cloud operations.
11 </p>
12 <p>
13 <b outputclass="bold">Creating a Cloud Profile</b>
14 </p>
15 <p>
16 To create a cloud profile called <codeph>vbox-oci</codeph>:
17 </p>
18 <pre xml:space="preserve">VBoxManage cloudprofile --provider "OCI" --profile="vbox-oci" add \
19--clouduser="ocid1.user.oc1..." --keyfile="/home/username/.oci/oci_api_key.pem" \
20--tenancy="ocid1.tenancy.oc1..." --compartment="ocid1.compartment.oc1..." --region="us-ashburn-1"
21</pre>
22 <p>
23 The new cloud profile is added to the
24 <filepath>oci_config</filepath> file in your Oracle VM VirtualBox
25 global configuration directory. For example, this is
26 <filepath>$HOME/.VirtualBox/oci_config</filepath> on a Windows
27 host.
28 </p>
29 <p>
30 <b outputclass="bold">Listing Cloud Instances</b>
31 </p>
32 <p>
33 To list the instances in your Oracle Cloud Infrastructure compartment:
34 </p>
35 <pre xml:space="preserve">VBoxManage cloud --provider="OCI" --profile="vbox-oci" list instances
36</pre>
37 <p>
38 <b outputclass="bold">Exporting an Oracle VM VirtualBox VM to the
39 Cloud</b>
40 </p>
41 <p>
42 To export a VM called <codeph>myVM</codeph> and create a cloud
43 instance called <codeph>myVM_Cloud</codeph>:
44 </p>
45 <pre xml:space="preserve">VBoxManage export myVM --output OCI:// --cloud 0 --vmname myVM_Cloud \
46--cloudprofile "vbox-oci" --cloudbucket myBucket \
47--cloudshape VM.Standard2.1 --clouddomain US-ASHBURN-AD-1 --clouddisksize 50 \
48--cloudocivcn ocid1.vcn.oc1... --cloudocisubnet ocid1.subnet.oc1... \
49--cloudkeepobject true --cloudlaunchinstance true --cloudpublicip true
50 </pre>
51 <p>
52 <b outputclass="bold">Importing a Cloud Instance Into
53 Oracle VM VirtualBox</b>
54 </p>
55 <p>
56 To import a cloud instance and create an Oracle VM VirtualBox VM
57 called <codeph>oci_Import</codeph>:
58 </p>
59 <pre xml:space="preserve">VBoxManage import OCI:// --cloud --vmname oci_Import --memory 4000
60--cpus 3 --ostype FreeBSD_64 --cloudprofile "vbox-oci"
61--cloudinstanceid ocid1.instance.oc1... --cloudbucket myBucket
62 </pre>
63 <p>
64 <b outputclass="bold">Creating a New Cloud Instance From a
65 Custom Image</b>
66 </p>
67 <p>
68 To create a new cloud instance from a custom image on Oracle Cloud Infrastructure:
69 </p>
70 <pre xml:space="preserve">VBoxManage cloud --provider="OCI" --profile="vbox-oci" instance create \
71--domain-name="oraclecloud.com" --image-id="ocid1.image.oc1..." --display-name="myInstance" \
72--shape="VM.Standard2.1" --subnet="ocid1.subnet.oc1..."</pre>
73 <p>
74 <b outputclass="bold">Terminating a Cloud Instance</b>
75 </p>
76 <p>
77 To terminate an instance in your compartment on Oracle Cloud Infrastructure:
78 </p>
79 <pre xml:space="preserve">VBoxManage cloud --provider="OCI" --profile="vbox-oci" instance terminate \
80--id="ocid1.instance.oc1..." </pre>
81 <p>
82 For more details about the available commands for cloud
83 operations, see <xref href="vboxmanage-cloud.dita"/>.
84 </p>
85 </body>
86
87</topic>
Note: See TracBrowser for help on using the repository browser.

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