Install the KVM Virtual Machine in centos 6.3

Source: Internet
Author: User
Tags tightvnc

When I decided to install the KVM Virtual Machine by myself, I first went to the official website to find the installation steps and found the article getting KVM to run on your machine without much effort, follow the steps above to start installation. According to this article, you only need to perform the following three steps to install and run the KVM virtual machine:

 

     1. /usr/local/kvm/bin/qemu-img create -f qcow2 vdisk.img 10G      2./usr/local/kvm/bin/qemu-system-x86_64 -hda vdisk.img -cdrom /path/to/boot-media.iso -boot d  -m 384     3./usr/local/kvm/bin/qemu-system-x86_64 vdisk.img -m 384

Many people perform the 1st steps smoothly without any problems. In most cases, it is stuck in step 1. The first problem encountered while executing Step 1 was that the qemu-system-x86_64 command could not be found; the second problem was that the prompt "VNC server running on ': 1: 100'" was displayed, google does not work after half a day.
First of all, the first problem is that the qemu-system-x86_64 is the command generated when installing qemu (note not qemu-KVM), and The qemu-KVM package is installed by default in centos, the corresponding command is qemu-KVM. This information is also described in the above article, but the problem is that the qemu-KVM command cannot be found. The command qemu-KVM is in the/usr/libexec/directory. If you are familiar with the Red Hat system, you can easily find the directory where the qemu-KVM command is located. You only need to check the output of rpm-QL qemu-KVM. In the future, you will encounter similar problems, you can also use the rpm-QL command.

If you are in a desktop environment, run the "vncviewer: 5900" command directly to continue the installation process. If you execute the vncviewer command in the shell connected to remote SSH, the following error is reported:

 

 

TigerVNC Viewer for X version 1.1.0 - built Apr 29 2013 11:33:36Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)See http://www.tigervnc.org for information on TigerVNC.vncviewer: unable to open display ""

Because vncviewer needs to be executed in the desktop environment.
Another way is to add "-VNC: 0" when executing the qemu-KVM command, you can use tools such as TightVNC to connect to port 5900 to continue the installation process. In this case, the system does not need a graphical interface.

Of course, some people may need to configure vncserver in the server segment. In this case, the RPM package to be installed in centos is tigervnc and tigervnc-server, the vncviewer command is located in the tigervnc package. For details about the installation process, see the following two articles:

Http://wiki.centos.org/HowTos/VNC-Server#head-76401321dae4d80916a7fd7e710272a9b85c9485

Http://blog.csdn.net/gg296231363/article/details/6899655

When starting the vncserver service, you may encounter the following problems:

 

 

WARNING: The first attempt to start Xvnc failed, possibly because the fontcatalog is not properly configured.  Attempting to determine an appropriatefont path for this system and restart Xvnc using that font path ...Could not start Xvnc./usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids/usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids

To solve this problem, you only need to execute the following command:

 

 

yum install pixman pixman-devel libXfont

I use TightVNC to remotely connect to vncserver. This tool is free of charge and is very useful.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.