You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/userguide/Compute/Server.md
+43-2Lines changed: 43 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,9 @@ RAX-SI:image_schedule|If scheduled images enabled or not. If the value is TRUE,
47
47
48
48
## Create server
49
49
50
-
There are a few parameter requirements when creating a server:
50
+
### Using an image
51
+
52
+
There are a few parameter requirements when creating a server using an image:
51
53
52
54
***name** - needs to be a string;
53
55
-**flavor** - a `OpenCloud\Compute\Resource\Flavor` object, that is populated with the values of a real API flavor;
@@ -86,13 +88,52 @@ try {
86
88
87
89
It's always best to be defensive when executing functionality over HTTP; you can achieve this best by wrapping calls in a try/catch block. It allows you to debug your failed operations in a graceful and efficient manner.
88
90
91
+
### Using a bootable volume
92
+
93
+
There are a few parameter requirements when creating a server using a bootable volume:
94
+
95
+
***name** - needs to be a string;
96
+
***flavor** - a `OpenCloud\Compute\Resource\Flavor` object, that is populated with the values of a real API flavor;
97
+
***volume** - a `OpenCloud\Volume\Resource\Volume` object, that is populated with the values of a real API volume;
98
+
99
+
Firstly we need to find our flavor and volume using their IDs.
It's always best to be defensive when executing functionality over HTTP; you can achieve this best by wrapping calls in a try/catch block. It allows you to debug your failed operations in a graceful and efficient manner.
128
+
89
129
### Create parameters
90
130
91
131
Name|Description|Type|Required
92
132
---|---|---|---
93
133
name|The server name. The name that you specify in a create request becomes the initial host name of the server. After the server is built, if you change the server name in the API or change the host name directly, the names are not kept in sync.|string|Yes
94
134
flavor|A populated `OpenCloud\Compute\Resource\Flavor` object representing your chosen flavor|object|Yes
95
-
image|A populated `OpenCloud\Compute\Resource\Image` object representing your chosen image|object|Yes
135
+
image|A populated `OpenCloud\Compute\Resource\Image` object representing your chosen image|object|No, if volume is specified
136
+
volume|A populated `OpenCloud\Volume\Resource\Volume` object representing your chosen bootable volume|object|No, if image is specified
96
137
OS-DCF:diskConfig|The disk configuration value. You can use two options: `AUTO` or `MANUAL`. <br><br>`AUTO` means the server is built with a single partition the size of the target flavor disk. The file system is automatically adjusted to fit the entire partition. This keeps things simple and automated. `AUTO` is valid only for images and servers with a single partition that use the EXT3 file system. This is the default setting for applicable Rackspace base images.<br><br>`MANUAL` means the server is built using whatever partition scheme and file system is in the source image. If the target flavor disk is larger, the remaining disk space is left unpartitioned. This enables images to have non-EXT3 file systems, multiple partitions, and so on, and enables you to manage the disk configuration.|string|No
97
138
networks|An array of populated `OpenCloud\Compute\Resource\Network` objects that indicate which networks your instance resides in.|array|No
98
139
metadata|An array of arbitrary data (key-value pairs) that adds additional meaning to your server.|array|No
0 commit comments