xterm.js on KVM VMs

Yes, you need a serial interface (type socket) in the VM, and the VM must listen on it, e.g., for Linux spawn a getty and for GRUB add something like:
Code:
console=tty0 console=ttyS0,115200n8

to the GRUB_CMDLINE_LINUX variable in /etc/default/grub and rerun `update-grub`.
 
Yes, you need a serial interface (type socket) in the VM, and the VM must listen on it, e.g., for Linux spawn a getty and for GRUB add something like:
Code:
console=tty0 console=ttyS0,115200n8

to the GRUB_CMDLINE_LINUX variable in /etc/default/grub and rerun `update-grub`.

Depending on your guest operating system, there could be more steps required, but that depends on your guest os and please have a look at the guest os documentation for this.