KVM or VMware? This was a choice I had to make when I want to install Cloudera VM and start to play with tools for big data.
——– VMWARE ———
It turns out vmware is a far more mature and user friendly product. The VMware player GUI is better looking and easy to use. The cmd based tool “vmrun” allows users to start, stop and restart client w/o GUI.
The followings are shamelessly copied from How to launch VMware Player VMs without GUI
$ chmod 755 ./VMware-VIX-1.11.0-471780.x86_64 $ sudo ./VMware-VIX-1.11.0-471780.x86_64 $ vmrun -T player start /path/to/vm/my.vmx nogui $ vmrun -T player reset /path/to/vm/my.vmx soft $ vmrun -T player stop /path/to/vm/my.vmx soft
VMware Player does not support VM snapshot operations. So you cannot take a snapshot of VMware Player VMs using vmrun. But if your VM was created using VMware Workstation or VMware Fusion, you can take a snapshot of a running VM as follows.
$ vmrun -T ws (or fusion) snapshot /path/to/vm/my.vmx my_snapshot
——– KVM ———
For KVM, virsh is a very handy tool, which allows you to “virsh start vm; virsh destroy vm; virsh list; virsh console vm; etc”. Of course one needs to create a vm using virt-manager (GUI!) or virtinstall and alike.
The tricky part is virsh console will hang there without getting me to the guest vm. It seems some extra work on the guest OS is needed before the guest OS’s console can be bridged to the terminal. KVM virsh: Redirecting Tty Console to a Serial Port is a very helpful article on this.
Another challenge is to make network bridge works. KVM/Networking – Ubuntu provides good info on this subject in here.
— what if I want to use browser of a headless server ? —
Socks proxy is your answer. I wrote about how to create and use a simple socks proxy from AWS EMR.
This is a more generic approach for normal Linux guest.