Hypervisor Cheatsheet

Operating systems that run other operating systems, lots of commands and reference material to keep track of.

Below is an ever growing list of things I found useful (and had to lookup more than once).

VMware
Installing VMware tools on RedHat/CentOS 7 
# yum install -y open-vm-tools

Increasing web session timeout in ESXi 6.x
Under Host, go to Manage, System, Advanced Settings, UserVars.HostClient.SessionTimeout
Change it to your desired setting from the default 900 seconds to as high as 7200 (a.k.a. 2 hours)

Xcp/Xen
List disks
# xe sr-list

To remove a stuck SR 
# xe sr-list name-label= 
# xe pbd-list sr-uuid= 
# xe pbd-unplug uuid= 
# xe sr-forget uuid= 

Adding new hard disk to Xen 
# fdisk -l (to determine the path, i.e. /dev/sdb
# xe sr-create name-label=<Name of storage> shared=false device-config:device=<Path of storage> type=lvm content-type=user 
I.e. xe sr-create name-label=VMStore shared=false device-config:device=/dev/sdb type=lvm content-type=user 

Global unmounting of ISOs (hung VMs be caused by mounted ISOs) 
# xe vm-cd-eject --multiple 

Installation of Xen Tools on Linux (after right-clicking) 
# mount -o ro,exec /dev/disk/by-label/XenServer\\x20Tools /mnt 

If that doesn't work... 

# mount /dev/cdrom /mnt/ 

# /mnt/Linux/install.sh 
Yes to reboot 

Start Xen Console 
# xsconsole Location of Guest Templates: /usr/share/xapi/vm-templates 

Should Guest Templates be missing 
# /usr/bin/create-guest-templates 

Location of Xen Tools: /opt/xensource/packages/iso 

Adding a local ISO SR 
# mkdir /var/opt/ISO_IMAGES 

Create and label the SR, it'll now be in the Xcp/Xen Mgr list 
# xe sr-create name-label=ISO_IMAGES_LOCAL type=iso device-config:location=/var/opt/ISO_IMAGES device-config:legacy_mode=true content-type=iso 

Copy ISOs to /var/opt/ISO_IMAGES via scp/sftp/wget (or your favorite transfer method) 

No comments:

Post a Comment