Xen-API corresponding to xm create
Vcpu-list:
Server. xenapi. VM. get_all ()
Server. xenapi. VM. get_record
Server. xenapi. vm_metrics.get_record
Server. xend. domains_with_state (false, 'all', false)
Server. xend. domain. getvcpuinfo
Filter power_state to obtain the final B ---- state.
Console:
Lele.exe cconsole (domid)
Xen.util.auxbin.exe cute ("xenconsole", [STR (domid)])
Run the/usr/lib64/xen/bin/xenconsole domid command.
VNC:
Console. runvncviewer (domid, vncviewer_autopass, true)
Read from xenstore:/local/domain/domid/device/vfb/0/backend/vnclisten
/Local/domain/domid/console/VNC-Port
Run vncviewer localhost: 58
Start:
Server. xenapi. VM. Start (domid, paused)
Or server. xend. domain (DOM)
Delete:
Server. xenapi. VM. Destroy (domid)
Or server. xend. domain. Delete (DOM)
Suspend:
Server. xenapi. VM. Suspend (get_single_vm (DOM ))
Resume:
Server. xenapi. VM. Resume (get_single_vm (DOM), paused)
Rest:
Server. xenapi. VM. hard_reboot (get_single_vm (DOM ))
Pause:
Server. xenapi. VM. Pause (get_single_vm (DOM ))
Shutdown:
Server. xenapi. VM. clean_shutdown (d)
Reboot:
Server. xenapi. VM. clean_reboot (d)
Destroy:
Server. xenapi. VM. hard_shutdown (get_single_vm (DOM ))
Rename:
Server. xenapi. VM. set_name_label (get_single_vm (ARGs [0]), argS [1])
Domid:
Server. xenapi. VM. get_domid (get_single_vm (name ))
Domname:
Server. xenapi. VM. get_name_label (get_single_vm (name ))
Vcpu-pin:
Server. xenapi. VM. add_to_vcpus_params_live (
Get_single_vm (DOM), "cpumap % I" % int (vcpu), cpumap)
Mem-MAX:
Server. xenapi. VM. set_memory_static_max (get_single_vm (DOM), Mem)
Mem-set:
Server. xenapi. VM. set_memory_dynamic_max_live (get_single_vm (DOM ),
Mem_target)
Server. xenapi. VM. set_memory_dynamic_min_live (get_single_vm (DOM ),
Mem_target)
USB-add :( USB-del)
Server. xend. domain. usb_add (ARGs [0], argS [1])
Vcpu-set:
Server. xenapi. VM. set_vcpus_number_live (get_single_vm (DOM), vcpus)
XM info:
Host_record = server. xenapi. Host. get_record (
Server. xenapi. session. get_this_host (server. getsession ()))
Host_cpu_records = map (server. xenapi. host_cpu.get_record, host_record ["host_cpus"])
Host_metrics_record = server. xenapi. host_metrics.get_record (host_record ["metrics"])
XM uptime:
Dom_recs = server. xenapi. VM. get_all_records ()
Dom_metrics_recs = server. xenapi. vm_metrics.get_all_records ()
Sieve out up_time
XM sysrq:
Server. xenapi. VM. send_sysrq (get_single_vm (DOM), req)
XM trigger:
Server. xenapi. VM. send_trigger (get_single_vm (DOM), trigger, vcpu)
XM debug-keys:
Server. xenapi. Host. send_debug_keys (
Server. xenapi. session. get_this_host (server. getsession ()),
Keys)
XM top:
Xentop
XM dmesg:
Server.xend.node.dmesg.info ()
XM log:
Server. xenapi. Host. get_log (
Server. xenapi. session. get_this_host (server. getsession ()))
XM serve:
Some commands can be sent to xend, but the specific parameters are unclear.
XM network-list:
Server. xenapi. VM. get_vifs (get_single_vm (DOM ))
XM block-list:
Server. xenapi. VM. get_vbds (get_single_vm (DOM ))
XM vtpm-list:
Server. xenapi. VM. get_vtpms (get_single_vm (DOM ))
Xm pci-list:
Server. xenapi. VM. get_dpcis (get_single_vm (DOM)
Xm pci-list-assignable-devices:
Server. xend. Nod. pciinfo ()
Xm scsi-list:
Server. xenapi. VM. get_dscsis (get_single_vm (DOM ))
XM block-Attach:
Server. xenapi. VDI. Create (vdi_record)
Server. xenapi. vbd. Create (vbd_record)
Or server. xend. domain. device_create (DOM, vbd)
XM block-configure:
Server. xend. domain. device_configure (DOM, vbd)
XM network-Attach:
Server. xenapi. VIF. Create (vif_record)
Xm pci-Attach:
Server. xenapi. dpci. Create (dpci_record)
Xm scsi-Attach:
Server. xenapi. dscsi. Create (dscsi_record)
XM vnet-list:
Server. xend_vnets ()
XM network-show: Only xen-API is supported.
Networks = server. xenapi. Network. get_all_records ()
PIFS = server. xenapi. pif. get_all_records ()
Vifs = server. xenapi. VIF. get_all_records ()