VirtualBox

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

最後變更 在這個檔案從105939是 105289,由 vboxsync 提交於 7 月 前

Docs: bugref:10705. Merging current changes to dita files from docs team's repo. (r6123, r6120, r6117)

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 3.8 KB
 
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 <ph conkeyref="vbox-conkeyref-phrases/oci"/></title>
5
6 <body>
7 <p>This section includes some examples of how <userinput>VBoxManage</userinput> commands can be used to integrate
8 with <ph conkeyref="vbox-conkeyref-phrases/oci"/> and perform common cloud operations. </p>
9 <p><b outputclass="bold">Creating a Cloud Profile</b>
10 </p>
11 <p>To create a cloud profile called <codeph>vbox-oci</codeph>: </p>
12 <pre xml:space="preserve">VBoxManage cloudprofile --provider "OCI" --profile="vbox-oci" add \
13--clouduser="ocid1.user.oc1..." --keyfile="/home/username/.oci/oci_api_key.pem" \
14--tenancy="ocid1.tenancy.oc1..." --compartment="ocid1.compartment.oc1..." --region="us-ashburn-1"
15</pre>
16 <p>The new cloud profile is added to the <filepath>oci_config</filepath> file in your <ph
17 conkeyref="vbox-conkeyref-phrases/product-name"/> global configuration directory. For example, this is
18 <filepath>$HOME/.VirtualBox/oci_config</filepath> on a Windows host. </p>
19 <p><b outputclass="bold">Listing Cloud Instances</b>
20 </p>
21 <p>To list the instances in your <ph conkeyref="vbox-conkeyref-phrases/oci"/> compartment: </p>
22 <pre xml:space="preserve">VBoxManage cloud --provider="OCI" --profile="vbox-oci" list instances
23</pre>
24 <p><b outputclass="bold">Exporting an <ph conkeyref="vbox-conkeyref-phrases/product-name"/> VM to the Cloud</b>
25 </p>
26 <p>To export a VM called <codeph>myVM</codeph> and create a cloud instance called <codeph>myVM_Cloud</codeph>: </p>
27 <pre xml:space="preserve">VBoxManage export myVM --output OCI:// --cloud 0 --vmname myVM_Cloud \
28--cloudprofile "vbox-oci" --cloudbucket myBucket \
29--cloudshape VM.Standard2.1 --clouddomain US-ASHBURN-AD-1 --clouddisksize 50 \
30--cloudocivcn ocid1.vcn.oc1... --cloudocisubnet ocid1.subnet.oc1... \
31--cloudkeepobject true --cloudlaunchinstance true --cloudpublicip true
32 </pre>
33 <p><b outputclass="bold">Importing a Cloud Instance Into <ph conkeyref="vbox-conkeyref-phrases/product-name"/></b>
34 </p>
35 <p>To import a cloud instance and create an <ph conkeyref="vbox-conkeyref-phrases/product-name"/> VM called
36 <codeph>oci_Import</codeph>: </p>
37 <pre xml:space="preserve">VBoxManage import OCI:// --cloud --vmname oci_Import --memory 4000
38--cpus 3 --ostype FreeBSD_64 --cloudprofile "vbox-oci"
39--cloudinstanceid ocid1.instance.oc1... --cloudbucket myBucket
40 </pre>
41 <p><b outputclass="bold">Creating a New Cloud Instance From a Custom Image</b>
42 </p>
43 <p>To create a new cloud instance from a custom image on <ph conkeyref="vbox-conkeyref-phrases/oci"/>: </p>
44 <pre xml:space="preserve">VBoxManage cloud --provider="OCI" --profile="vbox-oci" instance create \
45--domain-name="oraclecloud.com" --image-id="ocid1.image.oc1..." --display-name="myInstance" \
46--shape="VM.Standard2.1" --subnet="ocid1.subnet.oc1..."</pre>
47 <p><b outputclass="bold">Terminating a Cloud Instance</b>
48 </p>
49 <p>To terminate an instance in your compartment on <ph conkeyref="vbox-conkeyref-phrases/oci"/>: </p>
50 <pre xml:space="preserve">VBoxManage cloud --provider="OCI" --profile="vbox-oci" instance terminate \
51--id="ocid1.instance.oc1..." </pre>
52
53 <p><b outputclass="bold">Showing Cloud Instance Performance Metrics</b></p>
54 <p>To show CPU usage metrics for a cloud instance: </p>
55 <pre xml:space="preserve">VBoxManage cloud --provider="OCI" --profile="vbox-oci" instance metricdata \
56--id="ocid1.instance.oc1..." --metric-name="CpuUtilization"</pre>
57 <p>For more details about the available commands for cloud operations, see <xref href="vboxmanage-cloud.dita"/>. </p>
58 </body>
59
60</topic>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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