Get Virtualizor

Add ISO

Use the Add ISO API to add an ISO image on the server. All ISOs are stored in /var/virtualizor/iso directory of the server. These ISOs can be used to create Virtual Private Servers. The API response will contain "done" as "1" on successful download of the ISO.

For more information, you can refer this Add ISO guide.

HTTP Request

https://hostname:4085/index.php?act=edittemplate&osid=OSID

Parameters

NameMethodValueDescriptionRequired
actGETaddisoThe action specified to perform operation and retrieve dataYes
urlPOSTtextURL of the OS ISOYes
filenamePOSTtextName of the ISO to be saved asNo
mgsPOSTarrayArray of media group IDs, if passed the added ISO will belong to that media group(s)No

Sample Code

<?php

    require_once('/usr/local/virtualizor/sdk/admin.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Admin_API($ip, $key, $pass);

    $post = array();
    $post['url'] = 'http://old.kali.org/kali-images/kali-1.0.6/kali-linux-1.0.6-amd64-mini.iso';
    $post['filename'] = 'template_name';

    $output = $admin->addiso($post);

    print_r($output);
?>

Output

{
    "title": "Add ISO",
    "done": 1,
    "time_taken": "0.187"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list