Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Specify the trouble you have :
- you can not connect to KVM machine
- you can not ping / reach it
- you can not 'browse' something you have installed in KVM ?
what
what
what ...
Define your problem, provide / write the steps or link what have you done (you followed a how to or something)
then write where is your problem for which you want help.
My guest OS has static IP address and I can ping it with no issue. However when I ping the host IP address, I get the unreachable message stating that the IP address cannot be reached. I get the same error when I ping the gateway.
When I ping www.yahoo.com, I get the unknown host name.
I have seup a bridge and my guest os has a static IP address assigned to it.
I ended up reinstalling the KVM and the guest OS again. I went to virt-manager (I am using kvm and cents as host os), deleted the guest OS (my guest OS is Centos 6.2), remove the KVM, libvirt and then reinstall it the whole thing again.
Once I installed everything again and installed my guest OS (Centos 6.2.), everything worked fine.
In summary, here are the issue that I run into and this how I solved.
My goal was to install KVM on top of Centos 6.0 and I wanted to install multiple Centos 6.0 guest OS. My configuration for host OS is Centos 6.0 and the guest OSs are Centos 6.0.
I am running KVM under root.
Do the following on the host machine
a) You need to have a later model processor, with virtualization support, for KVM to work properly. This can be checked by examining the /proc/cpuinfo file:
egrep '(vmx|svm)' --color=always /proc/cpuinfo
If you get back results with vmx, then you have an Intel processor. If you get back results with svm, then you have an AMD processor. If you receive a null return, then your processor is not built for hardware supported full virtualization. The xen approach, used in the CentOS 5 series, supports para virtualization.
b) The KVM package for CentOS is available in the extras repository for versions prior to CentOS 5.4. You may install KVM with:
yum install kvm kmod-kvm
c) You probably want to also install QEMU, which is available in the base CentOS repositories, because many of its provided commands can be useful in managing a VM.
yum install qemu
d) The next step is to modprobe the kvm module for your architecture. If it's an Intel processor:
modprobe kvm-intel
If it's an AMD processor:
modprobe kvm-amd
If all goes well, you should have a kvm module loaded on your system by now. You can verify this by running:
/sbin/lsmod | grep kvm
e) If you want the guest to appear as another host on the LAN, visible to the rest of the network, you will have to use bridged networking. There are many QEMU howtos around, but most are out of date, as it has changed since the 2.6.18 kernel.
Here we describe a simple method that works. Many howtos talk of making a qemu-ifup script that lives in /etc. Unfortunately, most of the howtos seem to be outdated, as none of the suggested scripts found in there worked. Below we will present a script that creates the bridge and tap interfaces with appropriate commands.
First you will need bridge-utils, available from the base repo:
yum install bridge-utils
You'll also need tunctl.
This is now available from the RPMForge repository, so, once the repo is enabled, can easily be installed with
yum install tunctl
You will also want to edit your /etc/udev/rules.d/90-kvm-rules. When you installed the rpm, the created file reads:
KERNEL=="kvm", NAME="%k", GROUP="kvm", MODE="0660" In theory, adding the line:
KERNEL=="tun", NAME="net/%k", GROUP="kvm", MODE="0660" should give /dev/net/tun proper permissions. In practice, this doesn't seem to be the case, and though it is a kludge, one can simply add lines like
make usre you logged on as root and issue the following command
brctl addbr br0
copy ifcfg-etho in (/etc/sysconfig/network-scripts) to br0-eth0 in (/etc/sysconfig/network-scripts)
this is a sample ifcfg-br0 file (this is just a sample, make sure that the setting matches your network configuration
Now you are ready to install the guest OS. Start virt-manager & from the host OS. You will find instruction on how to use virt-manager. I am repeating the steps for the virt-manager.
However I will give some pointers.
-- When selecting the ISO image, make sure you point to the ISO file that you down load.
--- The network should be the bridge network
--- When you get to the time zone screen, just leave it as default
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.