Edit VM
This article provides a guide for a VPS Reseller user to Edit VM via API.
Use Edit VM API to edit existing VPS.
This function is for cloud user
HTTP Request
https://vm1.apivps.com:4083/index.php?act=editvm&vid=vpsid
Parameters
| Name | Type | Value | Description | Required |
|---|---|---|---|---|
| act | GET | editvm | Retrieves information regarding a particular page | Yes |
| vid | GET | Int | Retrieves all information regarding the particular vps. This will be passed in the URL | Yes |
| vid | POST | Int | The vpsid that needs to be edited. This will be specified as a POST Parameter during call | Yes |
| editvm | POST | 1 | IF set then the vm will edited | Yes |
| uid | POST | Int | The user whose vps needs to be edited | Yes |
| hostname | POST | hostname | This sets the hostname of the vps | Yes |
| space | POST | space | This gives the disk size to the vps | Yes |
| ram | POST | ram | This sets the RAM of the vps | Yes |
| bandwidth | POST | bandwidth | This sets the bandwidth for the vps | Yes |
| cores | POST | cores | This sets the CPU cores | Yes |
| rootpass | POST | rootpass | Sets the root password of the vps | No |
| swapram | POST | swapram | Swap RAM is set | Yes |
| vnc | POST | 1/0 | This enables VNC for accessing the vps | Yes |
| ips | POST | ips | This sets number of ips for the vps | Yes |
| ips_int | POST | Int | Number of internal ip addresses that will be assigned to the vps | No |
| ipv6 | POST | Int | Number of ipv6 addresses that will be assigned to the vps | No |
| ipv6_subnet | POST | Int | Number of ipv6 subnet that will be assigned to the vps | No |
Sample Code
PHP
<?php
require_once('/usr/local/virtualizor/sdk/enduser.php');
$key = '';
$pass = '';
$ip = '';
$admin = new Virtualizor_Enduser_API($ip, $key, $pass);
$post = array();
$post['editvm'] = 1;
$post['uid'] = 5;
$post['hostname'] = 'test.us.servername.us';
$post['space'] = 40 ;
$post['ram'] = 2048;
$post['bandwidth'] = 1000;
$post['cores'] = 2;
$post['rootpass'] = 'test@123';
$post['swapram'] = 1024;
$post['vnc'] = 1;
$post['ips'] = 1;
$vid = 9999;
$output = $admin->editvm($vid, $post);
print_r(json_encode($output));
?>
Curl
curl -k -X POST -d "editvm=1&uid=5&hostname=test.us.servername.us&ram=2048&swap=1024&cores=2&space=40&bandwidth=1000&vnc=1&ips=1" -L "https://vm1.apivps.com:4083/index.php?act=editvm&vid=9999&api=json&apikey=your_api_key&apipass=your_api_pass&do=1"
Output
{
"uid": "5",
"act": "editvm",
"timezone": "America/Chicago",
"timenow": "July 4, 2026, 11:18 am",
"vpsid": "9999",
"username": "user@example.com",
"user_type": "2",
"preferences": {
"fname": "",
"lname": "",
"company": "example.com",
"address": "400 S. AKARD ST., STE 200",
"city": "Dallas",
"state": "Texas",
"zip": "75202",
"country": "USA",
"phone": "8668444908",
"sys_admin_email": "user@example.com",
"cc_emails": "user@example.com",
"theme": "default",
"language": "english",
"timezone": "America/Chicago",
"default_enduser_timezone": "0"
},
"url": "index.php?",
"rdns": {
"pdnsid": "4"
},
"pdns": {
"pdnsid": "4"
},
"disable_login_logo": 1,
"enable_eu_iso": 1,
"pubkey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwY+JhQjrzZIGjmulMyEz\nTjcvEA2Ma1NM9wboi3goWEwUNd6AGVTvORqOUAWscX1QrNBCKbqE530CVwoAczGf\nZ+xHoRLOMx8FXZo0X3+7L2MCLruOomYbq3zNRbUPgvNrOmGheANkW0310pd/fDbb\nudu8hHEQ+DEpacUzLVEXn3aTJq2SB12sZDOGPAnKr5duGBeSo+h8XcC8EWo3WEJZ\nKgkKdHNS40b0RAhfcv907WjSQTxVXd9Qc3t6tSozxmfYz1J9Q8FNj4iD3Eiya/pr\nqQnqu1nEvtXohuKCtXOY12876ii9zh3rAhryuF82GRibVCH+EU5Et84nDNLyyuaB\nOQIDAQAB\n-----END PUBLIC KEY-----\n",
"disable_volume_enduser": 1,
"show_user_notice": [],
"disable_recipes": 0,
"check_licensepro": true,
"eu_dont_show_remote_ip": 1,
"eu_hide_bkp_del": null,
"counts": {
"vps": "9",
"baremetal": "0",
"users": "0",
"ssh_keys": "4",
"api": "1",
"euiso": "1",
"lb": "0",
"recipes": "1"
},
"billing_symbol": "$",
"enable_registration": 0,
"inhouse_billing": "0",
"force_preference": 0,
"enable_kyc": 0,
"kyc": {
"kyc_settings": {
"enable_kyc_form": 1
},
"kyc_request_made": 0
},
"force_kyc": 0,
"title": "Edit VPS",
"resources": {
"num_vs": -9,
"num_users": 0,
"space": 38375,
"ram": 743424,
"burst": 31744,
"bandwidth": 2127658555.0099999904632568359375,
"num_ipv4": 391,
"num_ip_int": "0",
"num_ipv6_subnet": 391,
"num_ipv6": 391,
"cores": "32",
"space_per_vm": "0",
"cpu": "256",
"num_cores": 374,
"network_speed": "0",
"upload_speed": "0",
"allowed_virts": {
"kvm": "kvm"
},
"cloud_allow_virtio": 1,
"allow_cloud_anti_spoofing_rules_disable": 0,
"allow_cloud_ebt_disable": 0,
"disable_change_hostname": 0,
"disable_change_password": 0,
"enable_iops_sec": null
},
"usage": {
"num_cores": 26
},
"cpu_topology": {
"kvm": true
},
"cpu_threads": {
"kvm": true
},
"cpu_modes": {
"kvm": [
[
"default",
"Default"
],
[
"host-model",
"Host Model"
],
[
"host-passthrough",
"Host Passthrough"
]
]
},
"users": {
"5": {
"uid": "5",
"email": "user@example.com"
}
},
"ostemplates": {
"812": {
"osid": "812",
"type": "kvm",
"name": "ubuntu-18.04-x86_64",
"filename": "ubuntu-18.04-x86_64.img",
"size": "1732247552",
"pygrub": "0",
"drive": "",
"hvm": "0",
"perf_ops": "1",
"active": "1",
"url": "",
"distro": "ubuntu",
"Nvirt": "kvm",
"mg": [
1
]
},
"1188": {
"osid": "1188",
"type": "kvm",
"name": "debian-13.0-x86_64",
"filename": "debian-13.0-x86_64.qcow2",
"size": "620494848",
"pygrub": "0",
"drive": "",
"hvm": "0",
"perf_ops": "1",
"active": "1",
"url": "http://media.apivps.com/ostemplates.php?osid=1188",
"distro": "debian",
"Nvirt": "kvm",
"mg": [
1,
5,
6
]
},
"100039": {
"type": "kvm",
"url": "",
"filename": "azuracast-24.04-lts-x86_64.img",
"name": "azuracast-24.04-lts-x86_64",
"fstype": "ext3",
"perf_ops": true,
"size": 10737418240,
"distro": "azuracast",
"mg": [
1,
5,
6
],
"Nvirt": "kvm"
}
},
"isos": {
"ZysfGa6rCdiUnPpE": {
"uuid": "ZysfGa6rCdiUnPpE",
"iso": "AlmaLinux-8.10-x86_64-minimal.iso",
"mg": [
1,
5,
6
],
"name": "AlmaLinux-8.10-x86_64-minimal.iso",
"filename": "AlmaLinux-8.10-x86_64-minimal.iso",
"size": 2140143616,
"isuseriso": 0,
"distro": "almalinux"
},
"5O2zA6m5pEh7BeiX": {
"uuid": "5O2zA6m5pEh7BeiX",
"iso": "debian-9.13.0-amd64-netinst.iso",
"mg": [
1,
5,
6
],
"name": "debian-9.13.0-amd64-netinst.iso",
"filename": "debian-9.13.0-amd64-netinst.iso",
"size": 306184192,
"isuseriso": 0,
"distro": "debian"
},
},
"vncpasslen": {
"kvm": 8
},
"done": {
"msg": "The Virtual Server has been successfully edited",
"goto": "act=listvs"
},
"editvm_vps": {
"vpsid": "9999",
"vps_name": "v9999",
"uuid": "6686o0Uc5qMYYMmD",
"serid": "25",
"time": "1783180370",
"edittime": "1783181915",
"virt": "kvm",
"uid": "5",
"plid": "9",
"hostname": "test.us.servername.us",
"osid": "1188",
"os_name": "debian-13.0-x86_64",
"iso": "",
"sec_iso": "",
"boot": "cda",
"space": "40",
"inodes": "0",
"ram": "2048",
"burst": "0",
"swap": "1024",
"cpu": "256",
"cores": "2",
"cpupin": "-1",
"cpu_percent": "100.00",
"bandwidth": "1000",
"network_speed": "0",
"upload_speed": "0",
"io": "0",
"ubc": false,
"acpi": "1",
"apic": "1",
"pae": "0",
"shadow": "0",
"vnc": "1",
"vncport": "5972",
"vnc_passwd": "",
"hvm": "0",
"suspended": "0",
"suspend_reason": null,
"nw_suspended": null,
"rescue": "0",
"band_suspend": "1",
"tuntap": "0",
"ppp": "0",
"ploop": "0",
"dns_nameserver": "a:2:{i:0;s:7:\"8.8.8.8\";i:1;s:7:\"8.8.4.4\";}",
"osreinstall_limit": "10",
"preferences": null,
"nic_type": "virtio",
"vif_type": "",
"virtio": "0",
"pv_on_hvm": "0",
"disks": [
{
"did": "5089",
"disk_uuid": "dfnv38Tuwo8heav4",
"st_uuid": "hdeyku4hngJqGmN7",
"vps_uuid": "6686o0Uc5qMYYMmD",
"path": "/dev/vg0/vsv9999-dfnv38Tuwo8heav4-6686o0Uc5qMYYMmD",
"primary": "1",
"size": "40.000",
"size_unit": "",
"type": "block",
"format": "raw",
"num": "0",
"rescue": "0",
"extra": "",
"bus_driver": "",
"bus_driver_num": "0",
"user_uid": "0",
"disk_name": "",
"mnt_point": "",
"project_name": null,
"stid": "59",
"vpsid": "9999"
}
],
"kvm_cache": "",
"io_mode": "0",
"cpu_mode": "host-model",
"total_iops_sec": "0",
"read_bytes_sec": "5000",
"write_bytes_sec": "5000",
"kvm_vga": "1",
"acceleration": "0",
"vnc_keymap": "en-us",
"routing": "0",
"mg": [
1
],
"used_bandwidth": "0.10",
"cached_disk": {
"disk": {
"VirtualMachine": "v9999",
"Filesystem": "/dev/sda1",
"1K-blocks": "30852116",
"Used": "2208108",
"Available": "27055384",
"Use%": "7.2"
},
"inode": {
"VirtualMachine": "v9999",
"Filesystem": "/dev/sda1",
"Inodes": "1966080",
"IUsed": "39805",
"IFree": "1926275",
"IUse%": "2.0"
}
},
"webuzo": "0",
"disable_ebtables": "0",
"disable_anti_spoofing_rules": "0",
"install_xentools": "0",
"admin_managed": "0",
"rdp": "0",
"topology_sockets": "0",
"topology_cores": "0",
"topology_threads": "0",
"mac": "4A:7F:2C:91:B8:6D",
"notes": null,
"disable_nw_config": "0",
"locked": {
"time": 1783181916,
"reason": "VPS is being updated, please wait.",
"manual": 0
},
"openvz_features": "",
"speed_cap": "",
"numa": "0",
"bpid": "0",
"bserid": "0",
"timezone": null,
"ha": "0",
"load_balancer": "0",
"data": {
"os_type": "0",
"rtc": "0",
"unprivileged": 0,
"vnc_auto_port": "0",
"nested_virt": "0",
"vga_vram": 0,
"discard": "0",
"vlan_tag": "0",
"enable_guest_agent": 1,
"ssd_emulation": 0,
"machine_type": "0",
"bios": "seabios",
"enable_tpm": "0",
"disable_password": "",
"ssh_options": "No",
"added_keys": [],
"io_uring": 0,
"min_ram": "0",
"vga": "0",
"vga_memory": "0",
"cpu_flags": "0",
"scsi_controller": "0",
"demo": null,
"enable_cpu_threshold": "0",
"cpu_threshold": 0,
"cpu_threshold_time": 0,
"cpu_threshold_alert": 0,
"cpu_threshold_suspend": 0,
"disable_guest_agent": "0",
"disable_autostart": 0,
"iothread": "0",
"nesting": "0",
"keyctl": "0",
"lxc_nfs": "0",
"smb_cifs": "0",
"lxc_fuse": "0",
"mknod_devices": "0",
"suspended_time": 0,
"multiqueue": "0",
"freeze_fs_on_backup": "0",
"hide_virtualization": 0,
"enable_ver_scaling": "0",
"ver_max_ram": "0",
"ver_ram_threshold": "0",
"ver_ram_inc_by": "0",
"ver_max_cpu": "0",
"ver_cpu_threshold": "0",
"ver_cpu_inc_by": "0",
"crypted_pass": "*********************",
"crypted_salt": "********",
"random_ipv6": "0",
"encrypted_pass": 1,
"vm_admin_name": "root",
"custom_ipv6_on_edit": 0
},
"fwid": "0",
"admin_fwid": "0",
"current_resource": null,
"plan_expiry": "0",
"machine_status": "0",
"tags": null,
"pid": "0",
"inhouse_billing": "0",
"ips": [
"172.1.1.4"
],
"ips6": null,
"ips6_subnet": null,
"ips_int": null,
"ips_vpc": []
},
"done_msg": "The Virtual Server has been successfully edited",
"res_limit": {
"num_vs": "0",
"num_users": "0",
"space": "40000",
"ram": "819200",
"bandwidth": "2147483647",
"num_ipv4": "400",
"num_ip_int": "0",
"num_ipv6_subnet": "400",
"num_ipv6": "400",
"num_cores": "400",
"cores": "32"
},
"vps": {
"vpsid": "9999",
"vps_name": "v9999",
"uuid": "6686o0Uc5qMYYMmD",
"serid": "25",
"time": "1783180370",
"edittime": "0",
"virt": "kvm",
"uid": "5",
"plid": "9",
"hostname": "test.us.servername.us",
"osid": "1188",
"os_name": "debian-13.0-x86_64",
"iso": "",
"sec_iso": "",
"boot": "a:1:{i:0;s:5:\"disk1\";}",
"space": "30",
"inodes": "0",
"ram": "4096",
"burst": "0",
"swap": "1024",
"cpu": "256",
"cores": "2",
"cpupin": "-1",
"cpu_percent": "100.00",
"bandwidth": "3300000",
"network_speed": "1280000",
"upload_speed": "12800",
"io": "0",
"ubc": false,
"acpi": "1",
"apic": "1",
"pae": "0",
"shadow": "0",
"vnc": "1",
"vncport": "5972",
"vnc_passwd": "",
"hvm": "0",
"suspended": "0",
"suspend_reason": null,
"nw_suspended": null,
"rescue": "0",
"band_suspend": "1",
"tuntap": "0",
"ppp": "0",
"ploop": "0",
"dns_nameserver": "a:2:{i:0;s:7:\"8.8.8.8\";i:1;s:7:\"8.8.4.4\";}",
"osreinstall_limit": "10",
"preferences": null,
"nic_type": "virtio",
"vif_type": "",
"virtio": "1",
"pv_on_hvm": "0",
"kvm_cache": "0",
"io_mode": "0",
"cpu_mode": "host-model",
"total_iops_sec": "0",
"read_bytes_sec": "5",
"write_bytes_sec": "5",
"kvm_vga": "1",
"acceleration": "0",
"vnc_keymap": "en-us",
"routing": "0",
"mg": [
1
],
"used_bandwidth": "0.10",
"webuzo": "0",
"disable_ebtables": "0",
"disable_anti_spoofing_rules": "0",
"install_xentools": "0",
"admin_managed": "0",
"rdp": "1",
"topology_sockets": "0",
"topology_cores": "0",
"topology_threads": "0",
"mac": "00:16:3e:ea:55:b3",
"notes": null,
"disable_nw_config": "0",
"locked": "",
"openvz_features": "",
"speed_cap": "",
"numa": "0",
"bpid": "0",
"bserid": "0",
"timezone": null,
"ha": "0",
"load_balancer": "0",
"data": {
"os_type": 0,
"rtc": 0,
"unprivileged": 0,
"vnc_auto_port": 0,
"nested_virt": 0,
"vga_vram": 0,
"discard": 0,
"vlan_tag": 0,
"enable_guest_agent": 1,
"ssd_emulation": 0,
"machine_type": 0,
"bios": "seabios",
"enable_tpm": 0,
"disable_password": "",
"ssh_options": "No",
"added_keys": [],
"io_uring": 0,
"min_ram": 0,
"vga": 0,
"vga_memory": 0,
"cpu_flags": 0,
"scsi_controller": 0,
"demo": 0,
"enable_cpu_threshold": 0,
"cpu_threshold": 0,
"cpu_threshold_time": 0,
"cpu_threshold_alert": 0,
"cpu_threshold_suspend": 0,
"disable_guest_agent": 0,
"disable_autostart": 0,
"iothread": 0,
"nesting": 0,
"keyctl": 0,
"lxc_nfs": 0,
"smb_cifs": 0,
"lxc_fuse": 0,
"mknod_devices": 0,
"suspended_time": 0,
"multiqueue": 0,
"freeze_fs_on_backup": 0,
"hide_virtualization": 0,
"enable_ver_scaling": 0,
"ver_max_ram": 0,
"ver_ram_threshold": 0,
"ver_ram_inc_by": 0,
"ver_max_cpu": 0,
"ver_cpu_threshold": 0,
"ver_cpu_inc_by": 0,
"crypted_pass": "***********************",
"crypted_salt": "********",
"random_ipv6": 0,
"encrypted_pass": 1
},
"fwid": "0",
"admin_fwid": "0",
"current_resource": null,
"plan_expiry": "0",
"machine_status": "0",
"tags": null,
"pid": "0",
"inhouse_billing": "0",
"ips": {
"18010": "172.1.1.4"
},
"ips6": {
"14663": "fd7a:4c2b:91e6:8f3d:6b21:9a44:c018:72d5"
},
"ips6_subnet": {
"14464": "fd3e:8b12:44c9:7a6f:0000:0000:0000:0001/64"
},
"distro": "debian"
},
"enable_nic": 0,
"time_taken": "6.435"
}

👀 Choose SSD-powered VPS servers for increased speed, power, and security! Now 50% off- starting from only $3.19/mo.