From Virtualizor Wiki
Jump to: navigation, search
This is OLD API Documentation. Click on the following link for New API Documentation
Admin API

Edit a VPS

Parameters Required Description
vpsid The id of the VPS
rootpass The root password for the VPS
plid Optional The plan id for the VPS
hostname The hostname the VPS
space The disk space for the VPS
ram The ram for the VPS
bandwidth The network bandwidth for the VPS
network_speed Optional The network_speed for the VPS
cores The number of cores allotted to the VPS
uid The user id assigned to the VPS
osreinstall_limit Optional The number of times the user can reinstall the OS
mgs Optional Media groups ids (optional)
mac Optional The MAC Address for the VPS (Only for Xen and KVM)
priority The IO priority for the VPS (Only for OpenVZ)
cpu The CPU weight for the VPS
burst The burst RAM for the VPS (Only for OpenVZ)
cpu_percent The CPU Percent time for the VPS (Only for OpenVZ and Xen)
osid The id of the Operating System
iso Optional The ISO name (For Xen, KVM and XenServer only)
cpu The CPU weight for the VPS
tuntap Optional Flag to enable tuntap (0 or 1) (Only for OpenVZ)
vnc Optional Flag to enable vnc(0 or 1) (Only for KVM and Xen)
vncpass Optional The vnc password (Only for KVM and Xen)
swapram The amount of SWAP for the VPS (Only for KVM and Xen)
shadow The amount of shadow memory for the VPS (Only Xen HVM)
virtio Optional Flag to enable VIRTIO (0 or 1)(Only for KVM)
nic_type Optional The NIC type (default or e1000) (Only for KVM and Xen)
vif_type Optional The VIF type (netfront or ioemu) (Only for KVM and Xen HVM)
hvm Flag to enable hvm(0 or 1)(Only for Xen HVM)
band_suspend Optional Flag to suspend the VPS network (0 or 1)
boot Optional The boot order (dca or cda) (Only for KVM and Xen HVM)
ips The IP Address(s) for the VPS (Array)
admin_managed Optional Flag to enable Managed By Admin option (0 or 1)

Example SDK Code


    $key =  'uketenhrhpunty5lhgwkcuxxxxxxxxxx';

    $pass = 'yrsofc3tg3tre7bjpfppspxxxxxxxxxx';

    $ip = 'xxx.xxx.xxx.xxx';

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

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


    [title] => Edit Virtual Server
    [error] => Array
    [vs_info] => Array
            [vpsid] => 13
            [vps_name] => 1004
            [serid] => 0
            [time] => 1399983400
            [edittime] => 1400135915
            [virt] => kvm
            [uid] => 1
            [plid] => 0
            [hostname] => test123456799999999.com
            [osid] => 270
            [iso] => 
            [sec_iso] => 
            [boot] => cda
            [space] => 15
            [inodes] => 0
            [ram] => 1024
            [burst] => 0
            [swap] => 1024
            [cpu] => 1000
            [cores] => 4
            [cpu_percent] => 100.00
            [bandwidth] => 0
            [network_speed] => 0
            [io] => 0
            [ubc] => 
            [acpi] => 1
            [apic] => 1
            [pae] => 1
            [shadow] => 0
            [vnc] => 1
            [hvm] => 0
            [suspended] => 0
            [rescue] => 0
            [band_suspend] => 0
            [tuntap] => 0
            [ppp] => 0
            [ploop] => 0
            [dns_nameserver] => a:2:{i:0;s:7:"";i:1;s:7:"";}
            [osreinstall_limit] => 0
            [preferences] => 
            [nic_type] => default
            [vif_type] => 
            [virtio] => 0
            [disk] => 
            [kvm_cache] => 0
            [io_mode] => 0
            [vnc_keymap] => en-us
            [routing] => 0
            [mg] => 
            [webuzo] => 0
            [admin_managed] => 0