Provide the hyper module for kvm hypervisors. This is the interface used to interact with kvm on behalf of the salt-virt interface
depends: |
|
---|
Return an int representing the number of unallocated cpus on this hypervisor
CLI Example:
salt '*' hyper.freecpu
Return an int representing the amount of memory that has not been given to virtual machines on this node
CLI Example:
salt '*' hyper.freemem
Returns the XML for a given vm
CLI Example:
salt '*' hyper.get_conf <vm name>
Return the disks of a named virt
CLI Example:
salt '*' hyper.get_disks <vm name>
Hard power down a virtual machine
CLI Example:
salt '*' hyper.halt webserver
Return a dict with information about this hypervisor
CLI Example:
salt '*' hyper.hyper_info
Return that type of hypervisor this is
CLI Example:
salt '*' hyper.hyper_type
Create a KVM virtual machine based on these passed options, the virtual machine will be started upon creation
CLI Example:
salt '*' hyper.init webserver 2 2048 salt://fedora/f16.img:virt /srv/vm/images
Return a list of virtual machine names on the minion
CLI Example:
salt '*' hyper.list_virts
Pause the named virtual machine
CLI Example:
salt '*' hyper.pause webserver
Hard power down and purge a virtual machine, this will destroy a vm and all associated vm data
CLI Example:
salt '*' hyper.purge webserver
Resume the named virtual machine
CLI Example:
salt '*' hyper.resume webserver
Set the named virtual machine to autostart when the hypervisor boots
CLI Example:
salt '*' hyper.set_autostart webserver
Start an already defined virtual machine that has been shut down
CLI Example:
salt '*' hyper.start webserver
Return detailed information about the vms on this hyper in a dict:
{'cpu': <int>,
'maxMem': <int>,
'mem': <int>,
'state': '<state>',
'cputime' <int>}
CLI Example:
salt '*' hyper.virt_info