Skip to main content
Version: 0.4.0-beta

Wizard-Client (CLI) Usage

Standard user Usage:

wizard-client -c [command] [options]

options:
-v [vm name] vm name
-g [vm group name] vm group name
-snap [snapshot name] shapshot name
-key [key name] key
-s [server address] GRPC server address (default: cluster-wizard)
-p [server port] GRPC server port (default: 50001)
-cert [filename] certificate filename
-ca [CA filename] CA cert filename
-pkey [private key] private key filename
-out-type [json] output type - text(default) or json

command (default: list) :
All user
vm management
list list vm(s)
vm-start -v [vm name] start vm
vm-shutdown -v [vm name] shutdown vm
vm-destroy -v [vm name] destroy vm
dumpxml -v [vm name] dump vm's XML configuration
vncdisplay -v [vm name] show IP address and port number of the VNC display for vm
vm-info -v [vm name] show vm information
vm-domain-info -v [vm name] -key [ipaddr/os/bridge/hostdev/disk]
show ip address/os of running vm or bridge/hostdev/disk of vm
snapshot
snapshots list vm(s) and snapshots
take-snap -v [vm name] -snap [snapshot name] create rbd snapshot of vm
delete-snap -v [vm name] -snap [snapshot name] delete snapshot of vm
rollback -v [vm name] -snap [snapshot name] [optional:-key [domainxml key]]
vm rollback to snapshot, (optional define)using saved domain xml by xml key
dumpxml-snap -v [vm name] -snap [snapshot name] vm's XML configuration when snapshot was created
local-snapshots -v [vm name] list vm's local snapshots
take-local-snap -v [vm name] -snap [snapshot name] create local snapshot of vm
domainxml-list -v [vm name] list vm's saved XML informations
domainxml-get -v [vm name] -key [user-defined key] get vm's saved XML string by key
group
groups list user's groups
group-add -g [group name] create group
group-delete -g [group name] delete group
group-add-vm -g [group name] -v [vm name] add vm to group
group-remove-vm -g [group name] -v [vm name] remove vm from group

Help
-h|--help print general help
--help-admin|-c help-admin print help for admin
--version print wizard-client version
--autocompletion print autocompletion script
usage)$ source <(wizard-client --autocompletion)
-c version print software version of all servers
-c get-commands print authorized commands for current user

Certificate
-c cert-gen-keys generate private/public key pair to create CSR
-c cert-create-csr create CSR file to get certificate
-c cert-set -cert [cert] [optional:-ca [CA cert]] set certificate and CA(optional)
-c cert-info print current certificate info
-c [command] -cert [cert] -ca [ca] -pkey [private key] using cert/ca/private key files instead of installed certificate

Cluster Wizard Connection
- default server=cluster-wizard, port=50001
- command line
$ wizard-client -s [server address] -p [port]
- environment variables on linux
$ export CLUSTER_WIZARD_SERVER=[server address]
$ export CLUSTER_WIZARD_PORT=[port]

notes:
Please make sure that a target vm is shut-off during take-snap, rollback and vm-template.

Admin Usage:

wizard-client -c [command] [options]

options:
-v [vm name] vm name
-g [vm group name] vm group name
-f [filename] file name
-t [template name] template name
-snap [snapshot name] shapshot name
-uu [target username] target username
-host [host name] hostname
-ip [ip addr] ip address
-s [server address] GRPC server address (default: cluster-wizard)
-p [server port] GRPC server port (default: 50001)
-pci [pci address] pci address of format xx:xx.x
-mac [mac address] mac address
-target [name] target of disk device
-br [bridge name] bridge network interface name
-suffix [bridge name suffix] bridge name suffix
-key [key name] key
-value [value ] value of key
-role [role ] role (admin or poweruser)
-cert [filename] certificate filename
-ca [CA filename] CA cert filename
-pkey [private key] private key filename
-vxlan [vxlan name] vxlan name
-dev [device name]] device name
-vlan [vlan name] vlan name
-id [id] id
-new [new value] new value
-o [option] option
-days [days] days
-deleted
-detail
-out-type [json] output type - text(default) or json

command (default: list) :
All user
vm management
list list vm(s)
vm-start -v [vm name] start vm
vm-shutdown -v [vm name] shutdown vm
vm-destroy -v [vm name] destroy vm
dumpxml -v [vm name] dump vm's XML configuration
vncdisplay -v [vm name] show IP address and port number of the VNC display for vm
vm-info -v [vm name] show vm information
vm-domain-info -v [vm name] -key [ipaddr/os/bridge/hostdev/disk]
show ip address/os of running vm or bridge/hostdev/disk of vm
snapshot
snapshots list vm(s) and snapshots
take-snap -v [vm name] -snap [snapshot name] create rbd snapshot of vm
delete-snap -v [vm name] -snap [snapshot name] delete snapshot of vm
rollback -v [vm name] -snap [snapshot name] [optional:-key [domainxml key]]
vm rollback to snapshot, (optional define)using saved domain xml by xml key
dumpxml-snap -v [vm name] -snap [snapshot name] vm's XML configuration when snapshot was created
local-snapshots -v [vm name] list vm's local snapshots
take-local-snap -v [vm name] -snap [snapshot name] create local snapshot of vm
domainxml-list -v [vm name] list vm's saved XML informations
domainxml-get -v [vm name] -key [user-defined key] get vm's saved XML string by key
group
groups list user's groups
group-add -g [group name] create group
group-delete -g [group name] delete group
group-add-vm -g [group name] -v [vm name] add vm to group
group-remove-vm -g [group name] -v [vm name] remove vm from group

Admin
vm info
vm-list [optional:-host [host name]] list all vm, by host using -host(optional)
vm-list-host list all vms on assigned hosts
update-vminfo -v [vm name] update db for a vm
update-vminfo-all update db for all vms
delete-vminfo -v [vm name] delete all data of vm from db
snapshots-list list all vm(s) and snapshots
vm assignment
assignments [optional:-uu [user name]] list vm assignments, optional by user
assignment-add -uu [target user name] -v [vm name] assign vm to user
assignment-delete -uu [target user name] -v [vm name] revoke vm from user
user management
users list users
user-add -uu [user name] add user
user-delete -uu [user name] delete user
user-set -uu [user name] -key [key] -value [val] update user using key [start_date/end_date/disabled/cluster_role/email/fullname]
date format [YYYY-MM-DD HH24:MI], disabled [true/false], cluster_role [admin/revoke]
eg) -key start_date -value "2023-03-01 09:30:00"
eg) -key cluster_role -value admin (to give cluster role to user )
eg) -key cluster_role -value revoke (to revoke cluster role from user)
eg) -key fullname -value "Firstname M Lastname"
host management
hosts [optional:-deleted] list hosts or deleted hosts with [-deleted]
host-add -host [host name] -ip [ip addr] -token [token] add host with ip address and token from node-wizard deployment
host-delete -host [host name] delete host
host-update -host [host name] -key [key] -value [value] [optional:-token [token]]
update host info with key[ipaddr/active] and value[ipaddress ot true/false]
host-renew-lic [optional:-host [host name]] renew host licenses for all host or one host(optional)
host-info -host [host name] print system information of host
get-host-env -host [host name] print env values of host
set-host-env -host [host name] -key [key] -value [value] set env value of host using key [pool/gateway/nameservers/bridge]
host-log -host [host name] print node-wizard recent error log of host
list-allowed -host [host name] list allowed pci addresses on host
list-disallowed -host [host name] list disallowed network device/bridge names on host
host assignment
assignments-host list host assignments
assignment-host-add -uu [target user name] -host [host name] -role [admin or poweruser]
assign host and role to user
assignment-host-delete -uu [target user name] -host [host name] -role [admin or poweruser]
revoke host and role from user
group
group-list list groups for all user
vm management
vm-create -v [vm name] -f [json name] -host [host name] create vm with json file on host
vm-delete -v [vm name] delete vm include snapshots
vm-hostdev-attach -v [vm name] -pci [pci address] attach host device of a given pci address
vm-hostdev-detach -v [vm name] -pci [pci address] detach host device of a given pci address
vm-disk-attach -v [vm name] -target [name] -f [json file] attach a disk
vm-disk-detach -v [vm name] -target [name] detach a disk
vm-bridge-attach -v [vm name] -br [bridge name] attach network bridge
vm-bridge-detach -v [vm name] -mac [mac address] detach network bridge
vm-bridge-update -v [vm name] -mac [mac] -br [new bridge] update bridge of vm
vm-template -v [vm name] -t [template name] create a template from vm
vm-clone -t [template name] -v [vm name] -ip [ip(x.x.x.x/x) or dhcp] -host [host name]
clone a vm from template, on host with ip(x.x.x.x/x or dhcp)
vm-template-list print template list
vm-template-dumpxml -t [template name] dumpxml of template origin vm
vm-disable -v [vm name] disable vm
vm-enable -v [vm name] enable disabled-vm
vm-rename -v [vm name] -new [new vm name] rename vm
vm-migrate -v [vm name] -host [host] -o [live/offline] migrate vm using rbd storage to host with option[live/offline]
domainxml-save -v [vm name] -key [user-defined key] save vm's current XML configuration with key
domainxml-delete -v [vm name] -key [user-defined key] delete XML information by key
host network management
list-vxlan -host [host name] list vxlan(s) on host
register-vxlan -host [host name] -id [vxlan id] -dev [device name] register vxlan
unregister-vxlan -host [host name] -vxlan [vxlan name] unregister vxlan
list-vlan -host [host name] list vlan(s) on host
register-vlan -host [host name] -id [vlan id] -dev [device name] register vlan
unregister-vlan -host [host name] -vlan [vlan name] unregister vlan
list-bridge -host [host name] [optional:-detail] list bridge(s) on host, use -detail(optional) to list bridge/vm info
register-bridge -host [host name] -suffix [bridge name suffix] -dev [device name]
register bridge
unregister-bridge -host [host name] -br [bridge name] unregister bridge
list-network-interface -host [host name] list network interface(s) on host
user certificate management
cert-list-csr -o [option] [optional:-uu [user name]] list csrs with option[all/requested(default)/approved/rejected] and optional username
cert-sign-csr -o [option] -id [id] -days [valid days] sign csr for valid days(default:365) with option[approve(default)/reject]
-o [option] -uu [user name] -days [valid days] re-sign user's latest approved csr
cert-get-csr -id [id] get csr information

Help
-h|--help print general help
--help-admin|-c help-admin print help for admin
--version print wizard-client version
--autocompletion print autocompletion script
usage)$ source <(wizard-client --autocompletion)
-c version print software version of all servers
-c get-commands print authorized commands for current user
-desc [command] print descriptions for vm-create/vm-disk-attach

Certificate
-c cert-gen-keys generate private/public key pair to create CSR
-c cert-create-csr create CSR file to get certificate
-c cert-set -cert [cert] [optional:-ca [CA cert]] set certificate and CA(optional)
-c cert-info print current certificate info
-c [command] -cert [cert] -ca [ca] -pkey [private key] using cert/ca/private key files instead of installed certificate

Cluster Wizard Connection
- default server=cluster-wizard, port=50001
- command line
$ wizard-client -s [server address] -p [port]
- environment variables on linux
$ export CLUSTER_WIZARD_SERVER=[server address]
$ export CLUSTER_WIZARD_PORT=[port]

notes:
Please make sure that a target vm is shut-off during take-snap, rollback and vm-template.

vm-create Description:

note

Some Host OSes are known to have issues with VM names containing an underscore "_"

usage :
-c vm-create -v [vm name] -f [json file name] -host [host name] create vm with json file on host
json file format :
{
"vm_mem" :"vm memory in GiB",
"vm_core" :"vm number of core",
"vm_img_size":"vm image size in GiB",
"os_variant" :"vm os version [ubuntu20.04, ubuntu22.04, ubuntu24.04, rocky9.2, rocky9.5, rhel9.2, rhel9.5, sles15, sles15-sp6 or win2k19]",
"vm_img_type":"vm image type [rbd or local]",
"localpath" :"a path to vm image, required when vm_img_type is local",
"fstype" :"xfs or ext4 (default:xfs), set for linux only",
"ipaddr" :"vm [ip address/subnet] or [dhcp] for using dhcp4",
"username" :"vm username",
"passwd" :"password - plain text for windows vm and hash string for the rest",
"auth_keys" :["ssh keys (optional)"],
"bridge" :"bridge name (optional) - specify instead of using default bridge",
"gateway" :"gateway (optional) - specify ip instead of using default gateway or "none" for not using gateway at all",
"nameservers":"nameservers (optional) - specify ip(s) instead of using default nameservers or "none" for not using nameservers at all",
"repo" :"ubuntu repository (optional) for ubuntu vm (default:"http://us.archive.ubuntu.com/ubuntu")",
"log_partition":"/var/log partition size in GiB (optional) for ubuntu vm (default: 16)"
}
example)
{
"vm_mem" :"12",
"vm_core" :"4",
"vm_img_size":"64",
"os_variant" :"ubuntu20.04",
"vm_img_type":"rbd",
"localpath" :"",
"fstype" :"xfs",
"ipaddr" :"172.25.20.133/17",
"username" :"cluster-admin",
"passwd" :"$6$q4j7WjSYTWHwje1B$o/z1qyy....",
"auth_keys" :["ssh-rsa A#BCW!@#.... "],
"bridge" :"br0External",
"gateway" :"172.25.101.1",
"nameservers":"172.25.100.1,172.25.110.1",
"log_partition":"18"
}
example for windows vm)
{
"vm_mem" :"12",
"vm_core" :"4",
"vm_img_size":"64",
"os_variant" :"win2k19",
"vm_img_type":"local",
"localpath" :"/storage/VM/images/",
"ipaddr" :"172.25.20.133/17",
"username" :"cluster-admin",
"passwd" :"ChangeMe"
}

vm-disk-attach Description:

usage :
-c vm-disk-attach -v [vm name] -target [name] -f [json file] attach a disk to vm with json file
json file format :
{
"img_type" :"image type [rbd or local]",
"img_size" :"image size in GiB",
"img_format" :"image format when img_type is local [raw or qcow2]",
"localpath" :"image path when img_type is local",
}
example)
{
"img_type" :"local",
"img_size" :"128",
"img_format" :"qcow2",
"localpath" :"/lstorage/VM/images",
}