XenServer: Useful admin/config commands

xsconsole

xe help --all

xe vm-list

xe vm-start vm=<VM>

xl console <VM>

xe vm-destroy uuid=<UUID of the target VM>

xe host-list

xe pool-list

xe-toolstack-restart

xe host-dmesg

tail -f /var/log/xensource.log

cat /etc/xensource-inventory

xen-bugtool --yes

xe-backup-metadata -d -u [UUID of SR]

xentop

list_domains

hdparm -t /dev/sda3

pvs

ll /dev/disks/by-id

lvs

vgs

brctl show

mii-tool

iscsiadm -i discovery --type sendtargets --port <IP-address>

iscsiadm -m session

xe role-list

xe subject-list

xe subject-role-add uuid=<Subject uuid> role-uuid=<Role uuid>
                                               
xe subject-role-add uuid=<Subject uuid> role-name=<Role name>

xe audit-log-get file=/tmp/<Audit file>

xe pool-param-set name-label=<New pool> uuid=<Pool uuid>

xe vm-param-set uuid=<VM uuid> ha-restart-priority=<1> ha-always-run=true

xe pool-ha-enable heartbeat-sr-uuids=<SR uuid> ha-config:timeout=<Timeout in seconds>

xe pool-ha-compute-max-host-failures-to-tolerate

xe pool-param-set ha-host-failures-to-tolerate=<2> uuid=<Pool uuid>

xe host-emergency-ha-disable --force

xe pool-emergency-transition-to-master uuid=<Host uuid>

xe pool-emergency-reset-master master-address=<New master hostname>

xe pool ha-enable heartbeat-sr-uuid=<SR uuid>

Networking

xe host-list params=software-version | grep network_backend

xe network-list

xe-switch-network-backend bridge

xe bond-param-get uuid=<Bond uuid> param-name=links-up

xe pif-param-set uuid=<Uuid of Bond master PIF> other-config:bond-updelay=<Delay in milliseconds>

xe pif-unplug uuid=<Uuid of Bond master PIF>

xe pif-plug uuid=<Uuid of Bond master PIF>

xe network-param-set

xe network-create name-label=<Network name>

xe pif-list

xe vlan-create network-uid=<Network Uuid> pif-uuid=<PIF Uuid> vlan=5

xe bond-create network-uuid=<Network Uuid> pif-uuids=<PIF Uuid1>, <PIF Uuid2>, <PIF Uuid3>, <PIF Uuid4>

xe bond-create network-uuid=<Network Uuid> pif-uuids=<PIF Uuid1>, <PIF Uuid2>, <PIF Uuid3>, <PIF Uuid4>  mode=<balance-slb | active-backup | lacp>

xe bond-list params=all

xe pif-reconfigure-ip mode=<DHCP | Static> uuid=<PIF Uuid>

xe pif-param-set disallow-unplug=true uuid=<PIF Uuid>

xe pif-param-set other-config:management_purpose="Storage" uuid=<PIF Uuid>

xe vm-param-set other-config:pci=0/0000:<Bus:Device.Function> uuid=<VM Uuid>

xe vif-param-set uuid=<VIF Uuid> qos_algorithm_type=ratelimit

xe vif-param-set uuid=<VIF Uuid> qos_algorithm_params:kbps=100








No comments:

Post a Comment