'{username}', 'apiKey' => '{apiKey}', )); // 2. Create Compute service $service = $client->computeService(null, '{region}'); // 3. Get empty server $server = $service->server(); // 4. Create the server. If you do not know what imageId or flavorId to use, // please run the list_flavors.php and list_images.php scripts. try { $response = $server->create(array( 'name' => '{serverName}', 'imageId' => '{imageId}', 'flavorId' => '{flavorId}', 'keypair' => '{keypairName}' )); } catch (BadResponseException $e) { echo $e->getResponse(); }