Overview
Virtualizor has a CLI utility using which you can perform certain operations from the command line. (Since Virtualizor 3.2.0.8)
We have added a few operations and will add more in the coming versions.
Note
Resource update
To update the resources of a single node or All slaves in the cluster you can use this command.
To update resources of all nodes:
To update resources of any particular server (3 is a slave server id in below command)
Update Virtualizor
You can update Virtualizor from the command line for all nodes using the following command.
You can logs in /var/virtualizor/log/upgrade_bg file.
After Virtualizor version 3.2.9, these new options are added to the Virtualizor CLI.
Welcome to Virtualizor Command-line Interface.
Available Commands :
-h, --help Display this help message
-v, --version Show program version
-l or --license For Virtualizor License information
--update To update current server
--update-license To update the license file
--cron Execute the daily cron (cron.php)
--cronh Execute the hourly cron (cronh.php)
--cronm Execute the minutely cron (cronm.php)
--migrate-to-sqlite Migrate MySQL data to SQLite DB files
--migrate-to-mysql Migrate SQLite DB files back to MySQL
--rebuild-sqlite-from-jsonRebuild SQLite from JSON files (disaster recovery)
--verify-migration Compare MySQL vs SQLite row counts (post-migration check)
--rebuild_ovs Re-apply VPC OVS gateway IPs and bring up subnet ports (safe to run on live node)
--install-podman Install Podman on specified server(s). Use serid=1,2,3 for multiple servers.
--repair-peering Repair VPC peering state (WireGuard, gateway IPs, host routes, VM routes). Use peerid=N for a specific peering, or omit to repair all active peerings.
--update-all To update all slave servers (will work only on Master server)
--generate_apikey To generate API key to send in API call
--update-resources Update the resources of all the nodes
--sync Synchronize the data with slave server (sync_config.php)
--sso Generate the Single Sign On URL (SSO)
--change_vm_pass Change the password of VM/CT
--change_vnc_pass Change the VNC password of VM/CT
--change_user_pass Change the password of users
--save_haproxy Save the haproxy rule again from DB
--backup Initiate the backup from Command line
--apply-vps-firewall Apply firewall plan to VM(s)
--remove-vps-firewall Remove firewall plan for VM(s)
--apply-server-firewall Apply firewall plan to Node(s)
--remove-server-firewall Remove firewall plan for Node(s)
--sync-backups Synchronize Backup Table backups with the backups server
--fix_solus_imported_vms To fix the Internal NIC for already imported VPS
--admin_test=<act> Run admin SDK tests (e.g. adduser, vs, listusers, create_vm_test)
--enduser_test=<act> Run enduser SDK tests (e.g. adduser)