Virtualization related notes

Guest vs Host:

  • Host – usually runs on physical hardware, lower level.
  • Guest – runs on the virtual/virtualized environment, upper level.

Virtualization types:

  • Full virtualization –  virtualize all the devices!
    • Can run almost all the operating systems without any modifications.
    • Emulate all the devicesn.
    • Slower than Paravirtualization and Operating-system-level virtualization.
    • Software Emulation (Without Hardware-Assisted-Virtualization)
      • Very Slow.
      • Need to do some jobs like binary translation or software instruction decode, will have a heavy overhead, is very inefficiet.
    • Paravirtualization on HVM
      • Full virtualization with paravirtualization drivers.
  • Paravirtualization(PV) – use modified kernel to interact with the special interface
    • Guest knows it’s a guest on the host, the guest will communicate with hypervisor.
    • Use hypercall (call to hypervisor) as its system call.
    • Hard(almost impossible) to modify the kernel of closed-source operating systems like Windows to use this method.
    • Faster than full virtualization but slower than operating-system-level virtualization.
  • Hardware-Assisted-Virtualization (HVM, HAV)
    • Using help from hardware capabilities.
    • Faster than Software Emulation.
    • Technic examples
  • Operating-system-level virtualization – don’t really virtualize the devices
    • Fastest – SUPER FAST!!!
    • Isolate different user space instances.
    • Don’t need hardware support.
    • Must run on the same kernel
      • Means bad compatibility.
    • Examples:
  • Partial virtualization – need be confirmed, not a usual type

Type-1 vs type-2 hypervisor:

Wikipedia also use Application/Environment and OS level to distinguish different types of virtualization:

  • Application-level
    • Sandbox
  • Environment-level
    • Containers
  • OS-level
    • Hypervisors

Common integrated virtualization solutions:

Resources and references:

The paravirtualization spectrum

source : https://blog.xenproject.org/2012/10/31/the-paravirtualization-spectrum-part-2-from-poles-to-a-spectrum/

Still learning, hope that there are not too many wrong things here … comments to point out mistakes/weak points are welcome!

Use Xen Orchestra to manage XenServer from WebUI

Proxmox VE supports Web UI by default, but XenServer
does not, fortunately, there is Xen Orchestra(XOA) to help us manage XenServer via Web UI and support https by default, you can download Xen Orchestra from https://xen-orchestra.com/, they also put the projects on https://github.com/vatesfr.

I just tried the free version of Xen Orchestra, the media is also a template for XenServer, so import it to a XenServer via OpenXenManager or XenCenter, if you wanna use static IP but not dhcp, login and setup its network interface, its default login id/password(for XOA v3.6/3.7) is root/xoa(root/root for XOA v3.5)

OpenXenCenter

after that, you can now visit its panel via your browser, and login, it supports both http and https, the default login id/password is [email protected]/admin

Login screenshot:
Xen Orchestra

More screenshots:

XenServer and user setting:
XOASetting

Tree View:
XOATreeView

Overview of XenServer Host:
XOAHostView

Overview of one of my VM:
XOAVMVIew

Console of VM:
XOAVMConsole

I think Xen Orchestra really makes XenServer more convenient, but it’s not full functional as XenCenter or OpenXenManager.

Install additional packages on XenServer 6.5

XenServer is a popular and reliable virtualization solution. as a system admin, I’ll like to install some useful packages to help me manage my servers, on XenServer 6.5, which is based on CentOS and using yum as its package manger.

All the CentOS repos were disabled by default, so I need to re-enable them, otherwise, I’ll keep getting some message like this, because they are not included in citrix’s repo:

No package vim-enhanced.x86_64 available.
Nothing to do

Workaround:
$sudo yum --enablerepo base,centosplus,contrib,debug,extras,updates install vim

So yum will use repo base, centosplus, contrib, debug, extras and updates during this process, but this is very inconvenience, so I want to enable them forever, try this:
$ sudo sed -i -e "s/enabled=0/enabled=1/" /etc/yum.repos.d/CentOS-Base.repo

Now it works fine now!

Hot to use share clipboard when using freerdp to connect to Windows?

Though I use GNU/Linux distros on most of my computers, I’ll still need to use Microsoft Windows sometimes, so I install Windows on an old PC, and work remotely.

Microsoft’s RDP(Remote Desktop Protocol) is a good method to work remotely with Windows if you have a real ip address(or work in LAN), I always use this method with FreeRDP and work happily, here is a usage example:

xfreerdp -u Peter 192.168.21.53

But FreeRDP didn’t share the clipboard like the default RDP client on Windows, so I just try to find a method to enable this feature, fortunately it’s very easy, just add parameters the enable cliprdr plugin like this:

xfreerdp --plugin cliprdr -u Peter 192.168.21.53

Now I can copy from my local computer and paste on a remote computer and vice versa!

PS: You may need to install package libfreerdp-plugins-standard first, and this syntax works on freerdp v1.0.2, in the newer versions, you may need to use +clipboard instead of --plugin cliprdr