Another method to find out if the OS is running in virtual environment

Fedora, Red Hat Enterprise Linux, and CentOS have a tool called 'virt-what' that detects if the operating system is running in a virtual environment.

It can detect the following environments:


hyperv: Microsoft Hyper-V hypervisor
ibm_systemz: IBM SystemZ (or other S/390)
ibm_systemz-direct: IBM SystemZ hardware partitioning system
ibm_systemz-lpar: LPAR on an IBM SystemZ hardware partitioning system
ibm_systemz-zvm: z/VM guest running in an LPAR on an IBM SystemZ hardware partitioning system
linux_vserver: Linux VServer container
kvm: KVM hypervisor using hardware acceleration
openvz: OpenVZ or Virtuozzo container
parallels: Parallels Virtual Platform (Parallels Desktop, Parallels Server)
powervm_lx86: IBM PowerVM Lx86 Linux/x86 emulator
qemu: QEMU hypervisor using software emulation
uml: User-Mode Linux (UML) guest
virt: Some sort of generic virtualization
virtage: Hitachi Virtualization Manager (HVM) Virtage hardware partitioning system
virtualbox: VirtualBox guest
virtualpc: Microsoft VirtualPC
vmware: VMware hypervisor
xen: Xen hypervisor
xen-dom0: Xen domU (paravirtualized guest domain)
xen-hvm: Xen guest fully virtualized (HVM)


To install it run:

yum install virt-what

Usage is as simple as running it without any options.



Did you find this article useful and interesting? If so, please consider subscribing to email updates and RSS feed for more articles like this.
Man Versus Technology

Ron Paul: Preserve the Free and Open Internet! Down with SOPA and PIPA!



Did you find this article useful and interesting? If so, please consider subscribing to email updates and RSS feed for more articles like this.
Man Versus Technology

How to find out at command line if a system is a virtual guest.

There will be times when it will be necessary to check if the system that you are currently SSH'd into is a hardware or virtual based guest. Before it was easy, just issue an 'eject' command and go check yourself which machine has the CD tray open. Before there were no mixed environments, so things were easier. 


There are couple of ways to figure it out.


1. Use the 'dmidecode' utility. The following command will show basic hardware information for the machine:


dmidecode | grep -A 10 "Handle 0x0001"

Output:

Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: VMware, Inc.
Product Name: VMware Virtual Platform
Version: None
Serial Number: VMware-XX XX XX XX XX XX XX XX XX XX XX
UUID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Not Specified

The key to the answer is the 'Manufacturer' line. Normally, on a physical hardware it should show the name of the manufacturer: Dell, HP, IBM etc. If the system is virtualized, it will display the hypervizor name. 


2. If the system is hosted on VMware server, then an easy but not foolproof method to find out if the guest system is or 'may be' hosted in virtualized environment is to look for guest support tools that may be installed. In case of VMware one should look for vmware-tools:

rpm -qa | grep -i "vm"

Output:

VMwareTools-7300-82663
xorg-x11-drv-vmmouse-12.4.0-2.1
xorg-x11-drv-vmware-10.13.0-2.1


This doesn't necessarily mean that the system is virtualized but can at least hive a hint about that. 







Did you find this article useful and interesting? If so, please consider subscribing to email updates and RSS feed for more articles like this.
Man Versus Technology

Fedora 16 x86_64 and Picasa Segmentation Fault

If you run into this error while trying to start Picasa on Fedora 16 64 bit system:

/usr/bin/picasa: line 189: 5216 Segmentation fault (core dumped) "$PIC_BINDIR"/wrapper check_dir.exe.so /usr/bin/picasa: line 248: 5325 Segmentation fault (core dumped) "$PIC_BINDIR"/wrapper set_lang.exe.so

 then, what fixed it is doing the following:

 - install the 'wine' package:

 yum install wine

 - copy the 'wine-preloader':

cp /usr/bin/wine-preloader /opt/google/picasa/3.0/wine/bin/wine-preloader

 Picasa should start now.

 Did you find this article useful and interesting? If so, please consider subscribing to email updates and RSS feed for more articles like this.
Man Versus Technology

less Syntax Highlighting in Fedora

If you look at a variety of text, configuration, and source files on the command line using 'less' then you will appreciate this trick which will make viewing syntax much easier by highlighting it.

In Fedora, install source-highlight:

yum -y install source-highlight

Then, edit the ~/.bashrc file and add the following 2 lines:

export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
export LESS=' -R '

Next, exit the terminal (ctrl-d) and re-login for the changes to take effect.

Finally, unless you work with a monochrome display, enjoy the colors.



Did you find this article useful and interesting? If so, please consider subscribing to email updates and RSS feed for more articles like this.
Man Versus Technology

Fix Picasa Segmentation Fault in Fedora 14

Without going into too many details, if you are running Fedora 14 and Picasa fails to start, try running it from the command line. If you get the following output:


/usr/bin/picasa: line 189: 14526 Segmentation fault      (core dumped) "$PIC_BINDIR"/wrapper check_dir.exe.so
/usr/bin/picasa: line 248: 14642 Segmentation fault      (core dumped) "$PIC_BINDIR"/wrapper set_lang.exe.so

Then there's a good chance the following fix will help:
(on the command line as root)

cp /usr/bin/wine-preloader /opt/google/picasa/3.0/wine/bin/wine-preloader


BOOM! Picasa works again.



Did you find this article useful and interesting? If so, please consider subscribing to email updates and RSS feed for more articles like this.
Man Versus Technology

Install Android Eclipse Plugin in Fedora Linux

Update: 
Thanks to a reader Kris who pointed out that this fix also works for Eclipse in Windows 7 64bit. 


If you get this error in a fresh installation of Eclipse in Linux (Fedora 14 i686 in this case) then there's a good chance some additional plugins are missing:


Cannot complete the install because one or more required items could not be found.
  Software being installed: Android Development Tools 8.0.1.v201012062107-82219 (com.android.ide.eclipse.adt.feature.group 8.0.1.v201012062107-82219)
  Missing requirement: Android Development Tools 8.0.1.v201012062107-82219 (com.android.ide.eclipse.adt.feature.group 8.0.1.v201012062107-82219) requires 'org.eclipse.gef 0.0.0' but it could not be found


It's very easy to fix it. In Eclipse go to Help->Install New Software and add a new software source appropriate to your Eclipse version. As of January 2011, I'm running Eclipse Helios (3.6.1) and its source is:  http://download.eclipse.org/releases/helios. Type that into the 'Work with:' text field and let the list auto-update. Once it's updated check the "WST Server Adapters" from the list and finish the wizard. 
After it installs, the Android plugin for Eclipse should finish installing without a problem. 



























Did you find this article useful and interesting? If so, please consider subscribing to email updates and RSS feed for more articles like this.
Man Versus Technology