Welcome Guest. Please Login or Register  

You are here: Index > Virtualizor - Virtual Server Control Panel > General Support > Topic : The primary storage could not be found

Threaded Mode | Print  

 The primary storage could not be found, Error while creating VPS with api (0 Replies, Read 1025 times)
Group: Member
Post Group: Newbie
Posts: 1

I tried to create a php script creating a server with virtualizor api (tested functions and boot/reboot and so on works fine). I need the script to create a vps on the less used node automatically, so I didn't filled the slave_server and stid values (they are not marked as required in the API documentation). Checked the storage which is marked as primary for one of the nodes and it has enough space available (1.8TB). I am able to create VPS from virtualizor panel itself by selecting the node. However when I run the command on the PHP script via API, I get the error: "error":{"no_storage":"The primary storage could not be found"}. If I set the slave_server to a server ID, it works fine, however I need it to automatically select the node. Is this possible?

Here is the script I made:

    $post = array();
    $post['virt'] = 'xen';
    $post['user_email'] = 'test@test.com';
    $post['user_pass'] = 'test123';
    $post['hostname'] = 'cloud.zetservers.com';
    $post['rootpass'] = 'test123';
    $post['ips'] = array('');
    $post['space'] = '25';
    $post['ram'] = 1024;
    $post['swapram'] = 0;
    $post['bandwidth'] = 0;
    $post['network_speed'] = 0;
    $post['cpu'] = 1000;
    $post['cores'] = 2;
    $post['osid'] = 866;
    $output = $admin->addvs_v2($post);

    return json_encode($output);
IP: --   

« Previous    Next »

Threaded Mode | Print  

Jump To :

Users viewing this topic
1 guests, 0 users.

All times are GMT. The time now is April 21, 2021, 5:34 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.152