What is the correct combination of packages to configure and manage VMs via virt-manager undet CentOS-5.4? If I use qemu then while virt-manager works I obtain SELinux alerts with respect to the real-time clock. If instead of qemu I use kvm-qemu-img then virt-manager simply does not work. It starts but it does not find any form of qemu and the selection boxes are all greyed out.
Further, do I need tun/tap to host VMs that themselves support virtual ips? The module for tun I found as part of the base install. But I cannot locate the module for ethertap and yum does not tell me where it is found.
Lastly, why is qemu 4.5M but kvm-qemu-img is only 125K?
Regards,
James B. Byrne wrote on Mon, 9 Nov 2009 16:23:55 -0500 (EST):
Lastly, why is qemu 4.5M but kvm-qemu-img is only 125K?
I would assume it's just the module that works on image files. AFAIK, you don't need qemu if you have KVM. The same way you don't need KVM if you use Xen ...
Kai
On Mon, November 9, 2009 20:31, Kai Schaetzl wrote:
James B. Byrne wrote on Mon, 9 Nov 2009 16:23:55 -0500 (EST):
Lastly, why is qemu 4.5M but kvm-qemu-img is only 125K?
I would assume it's just the module that works on image files. AFAIK, you don't need qemu if you have KVM. The same way you don't need KVM if you use Xen ...
This is not the sense I gather from the various kvm websites. For example, http://www.linux-kvm.org/page/Main_Page states this:
"KVM also requires a modified QEMU although work is underway to get the required changes upstream."
Now, I am not sure what this means as I lack any context. Does it mean that one needs a specialized qemu now and expresses hope that the standard qemu will incorporate the necessary changes sometime later? Or does it mean that qemu is needed now but that no qemu will be needed when "upstream" incorporates the recommended changes? As the date of this text is not later than 2008 July 21 is it out of date? Have the necessary changes been incorporated by upstream by now?
Since upstream is not defined it may mean the qemu project or it might refer to the Linux kernel team. I suspect that the former is the case and that qemu will be required to support kvm in the foreseeable future, if not forever.
On Mon, November 9, 2009 20:31, Kai Schaetzl wrote:
I would assume it's just the module that works on image files. AFAIK, you don't need qemu if you have KVM. The same way you don't need KVM if you use Xen ...
The rpm package note for kvm-qemu-img says this:
Summary : Qemu disk image utility Description : This package contains qemu-img, the qemu command line tool for manipulating disk images, built from the qemu source code included on the KVM source.
This package should be useful for systems that don't have a qemu package but need qemu-img.
So, it would appear as if kvm-qemu-img is intended as a lightweight replacement for the full qemu package where all the functionality of the latter is not required. However, as I wish to use virt-manager clearly the full qemu package is required.
2009/11/10 James B. Byrne byrnejb@harte-lyne.ca:
So, it would appear as if kvm-qemu-img is intended as a lightweight replacement for the full qemu package where all the functionality of the latter is not required. However, as I wish to use virt-manager clearly the full qemu package is required.
No, it's not a replacement, it's a utility for handling image files, eg. create and convert harddisk images for QEMU/KVM.
If you just install kvm libvirt virt-manager
and all their dependencies, then you should be fine.
Best Regards Kenni
James B. Byrne wrote on Mon, 9 Nov 2009 20:58:18 -0500 (EST):
So, it would appear as if kvm-qemu-img is intended as a lightweight replacement for the full qemu package where all the functionality of the latter is not required. However, as I wish to use virt-manager clearly the full qemu package is required.
http://wiki.centos.org/HowTos/KVM
Did you read this? As I told elsewhere I'm not using KVM. This article is outdated but it says that qemu is not needed. I would be surprised if it was needed now. I have used virt-manager for Xen and didn't need qemu. If I attempt to install virt-manager and kvm it doesn't pull in qemu for me. So, my conclusion would be that qemu isn't needed. The qemu-kvm/qemu-kvm- img is only necessary if you want to use an image file. It is just able to create the image file, it's only a small tool from the whole qemu package. You certainly don't need the whole package. qemu is on lose terms "the same" as KVM - e.g. it is another hypervisor/emulator. You just need one. Until you get better help from someone running kvm on 5.4, have you temporarily disabled SElinux to see if that makes it work? If it still doesn't work I guess there's something wrong with your setup.
There's also a Virtualization Guide for RHEL and I expect it to include KVM instructions now that KVM is part of RHEL. The 5.4 documents are not yet on the CentOS site, so you have to check on the RH site for it.
Kai
2009/11/9 James B. Byrne byrnejb@harte-lyne.ca:
Further, do I need tun/tap to host VMs that themselves support virtual ips? The module for tun I found as part of the base install. But I cannot locate the module for ethertap and yum does not tell me where it is found.
Yep, you do want tun/tap. But if you create a regular bridge and tells virt-manager or libvirt to use this for your virtual machines, virt-manager/libvirt will take care of the tun/tap setup.
From your virtual machines point of view, tun/tap will get you the
same connectivity as if you plugged a ethernet cable from your network into it, without any restrictions.
Best Regards Kenni
On Tue, November 10, 2009 05:34, Kenni Lund wrote:
Yep, you do want tun/tap. But if you create a regular bridge and tells virt-manager or libvirt to use this for your virtual machines, virt-manager/libvirt will take care of the tun/tap setup.
This is what I have done. One of difficulties I still have is discovering where I set the IP addresses for the virtual machines. It seems that I get some variant of 192.168.122.x where I need an actual routable address in the 216.185.71.0/24 space.
ifcfg-br0
# kvm virtual host bridged network connection DEVICE=br0 TYPE=Bridge BOOTPROTO=static BROADCAST=216.185.71.255 #HWADDR=xx:xx:xx:xx:xx:xx IPADDR=216.185.71.22 #IPV6INIT=yes #IPV6_AUTOCONF=yes NETMASK=255.255.255.0 NETWORK=216.185.71.0 ONBOOT=yes
ifcfg-eth0
# Bridged ethernet for KVM virtual hosts # Intel Corporation 82566DC Gigabit Network Connection DEVICE=eth0 #BOOTPROTO=static #BROADCAST=216.185.71.255 HWADDR=xx:xx:xx:xx:xx:xx #IPADDR=216.185.71.22 #IPV6INIT=yes #IPV6_AUTOCONF=yes #NETMASK=255.255.255.0 #NETWORK=216.185.71.0 ONBOOT=yes BRIDGE=br0
2009/11/10 James B. Byrne byrnejb@harte-lyne.ca:
On Tue, November 10, 2009 05:34, Kenni Lund wrote:
Yep, you do want tun/tap. But if you create a regular bridge and tells virt-manager or libvirt to use this for your virtual machines, virt-manager/libvirt will take care of the tun/tap setup.
This is what I have done. One of difficulties I still have is discovering where I set the IP addresses for the virtual machines. It seems that I get some variant of 192.168.122.x where I need an actual routable address in the 216.185.71.0/24 space.
You need to configure your virtual machine to use a shared device, eg. your bridge. If your client gets a 192.168.122.x address, you've setup your virtual machine to use usermode networking.
The link which Kai pasted also explains this...
Best Regards Kenni
On Tue, November 10, 2009 09:16, Kenni Lund wrote:
You need to configure your virtual machine to use a shared device, eg. your bridge. If your client gets a 192.168.122.x address, you've setup your virtual machine to use usermode networking.
I have obtained the RedHat Virtualization Guide dated September 2009 and will go through that today and tonight. I know that eventually I will get this to work, but at the moment things appear very frustrating.
Regards,
2009/11/10 James B. Byrne byrnejb@harte-lyne.ca:
On Tue, November 10, 2009 09:16, Kenni Lund wrote:
You need to configure your virtual machine to use a shared device, eg. your bridge. If your client gets a 192.168.122.x address, you've setup your virtual machine to use usermode networking.
I have obtained the RedHat Virtualization Guide dated September 2009 and will go through that today and tonight. I know that eventually I will get this to work, but at the moment things appear very frustrating.
Ok, once you get a grasp of it, I'm sure you'll find it pretty simple :) Install kvm + virt-manager + libvirt, setup a bridge, use virt-manager to create a new virtual machine which uses the bridge. Now you're done, nothing more needed.
Best Regards Kenni
On Tue, November 10, 2009 10:12, Kenni Lund wrote:
Ok, once you get a grasp of it, I'm sure you'll find it pretty simple :) Install kvm + virt-manager + libvirt, setup a bridge, use virt-manager to create a new virtual machine which uses the bridge. Now you're done, nothing more needed.
The problem being is that I have already done all that and it simply does not work as expected. So I infer that there a few important details that everyone is leaving out of their descriptions, possibly because they assume them as preconditions.
Regards,
Ok, once you get a grasp of it, I'm sure you'll find it pretty simple :) Install kvm + virt-manager + libvirt, setup a bridge, use virt-manager to create a new virtual machine which uses the bridge. Now you're done, nothing more needed.
The problem being is that I have already done all that and it simply does not work as expected. So I infer that there a few important details that everyone is leaving out of their descriptions, possibly because they assume them as preconditions.
Hmm, try to have a look at this: http://www.linux-kvm.com/content/using-bridged-networking-virt-manager
Like shown in the screenshot in section 4, you should select "Shared physical device" and then select your bridge in the drop-down menu. This should NOT give you usermode network (a 192.168.122.x address), this should instead connect the virtual machine to your network, meaning you can request a DHCP address if you have a DHCP server or assign a static IP inside the virtual machine.
Best Regards Kenni Lund
On Tue, November 10, 2009 11:55, Kenni Lund wrote:
Hmm, try to have a look at this: http://www.linux-kvm.com/content/using-bridged-networking-virt-manager
Got it. Thanks. I will give this a read tonight while I am relaxing with the "Red Hat Virtualization" guide.
Regards,
On Tue, 2009-11-10 at 15:07 -0500, James B. Byrne wrote:
On Tue, November 10, 2009 11:55, Kenni Lund wrote:
Hmm, try to have a look at this: http://www.linux-kvm.com/content/using-bridged-networking-virt-manager
Got it. Thanks. I will give this a read tonight while I am relaxing with the "Red Hat Virtualization" guide.
James,
Sometimes it helps to read an explanation from two sources.
At libvirt.org, the bridged networking (shared physical device) writeup gives similar info to the above link and can be found here:
http://wiki.libvirt.org/page/Networking#Creating_network_initscripts
Once you define the bridge in /etc/sysconfig/network-scripts/, modify the host ifcfg-eth0 to include the BRIDGE= statement (and remove the normal BOOTPROTO= statement) and either disable netfilter on the bridge or add the physdev --physdev-is-bridged iptables rule, then you are basically done.
Restart the network/iptables/libvirtd and you are good to go. Takes maybe 5 min. to set up and does not require any knowledge of brctl.
Steve
James B. Byrne wrote on Tue, 10 Nov 2009 09:06:40 -0500 (EST):
It seems that I get some variant of 192.168.122.x where I need an
you are getting this from dnsmasq. libvirt sets the dnsmasq service to on because it relies on it for DHCP.
actual routable address in the 216.185.71.0/24 space.
Static? Then simply set it. DHCP? Then shut off dnsmasq. At least with Xen that's all what is needed.
Kai