Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Experience with kvm - Gentoo host and RedHat guest
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3526

PostPosted: Tue Nov 30, 2010 6:27 pm    Post subject: Experience with kvm - Gentoo host and RedHat guest Reply with quote

Can anyone here share experience with running Gentoo as a KVM host with a RedHat 5 guest?

My work requirements are pretty heavily tied to RHEL5, but I'd prefer to keep most of the machine native Gentoo. I've begun some basic searches against this stuff, found the Gentoo KVM guide, etc. However I presume that there are tips, techniques, etc that are only found by trial and error, and would like to start with someone else's experience as a reference. For a couple more gotchas...

We have pretty heavy MAC management here, so guests would likely have to NAT through the host, if I understand the networking options correctly.
The guests don't really need 3D graphics, though 2D performance will be important.
The hardware is a Thinkpad W510. (Core I7 quad)
The RHEL 5 install will likely be a bare (and barely usable, considering the ages of hardware and OS) install onto a partition as multiboot.

Thanks,
Dale
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
AngelKnight
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2003
Posts: 127

PostPosted: Wed Dec 01, 2010 5:14 am    Post subject: Gentoo host, Redhat guest within KVM Reply with quote

Not sure what "heavy MAC management" means. If it means that the Powers That Be refuse to allow an unrecognized MAC to pass ethernet frames, then indeed you may be stuck with NATting through the host. Otherwise, you could just set up a bridge and your RedHat VM and your Gentoo host will appear to the far end as if they're attached to a switch and then into the wall/floor/etc.

You're not obligated to partition off space right on the host's disk to make space for the RHEL5 guest. If you do, I recommend that you put it into an LVM (so a 1-partition LVM PV, with 1 VG inside, with the 1 LV inside which the RHEL5 guest will believe is an entire physical disk).

I haven't installed RHEL lately so I don't know if the boot image enables support for the "virtio block" device driver. You may be stuck with the performance penalty from KVM having to emulate an IDE or SCSI adapter until you can compile a kernel inside the RHEL guest with virtio support. Similar may go for network.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3526

PostPosted: Wed Dec 01, 2010 2:48 pm    Post subject: Reply with quote

Heavy MAC management means all of the bad things you suggest, so I guess that means I'm stuck with NAT. I remember several years back someone complaining about this with respect to running Windows inside VMWare, and I don't believe they offered anything better. However the "new strategy" is to get rid of multiboot in favor of virtualization, so maybe they've relaxed the MAC requirements. But there's another strategic move to "endpoint registration", meaning only registered MACs can connect. So it's anyone's guess what the long-term prospects are going to be.

Which leads to another question... If I set up bridging, can I specify the MACs for the VMs, or are they somehow deterministic, so I can properly register them, if/when it becomes necessary? (I guess this can probably be gleaned from the Wiki, but it may also be something most people don't need to do, and therefore not documented.)

This also jogged my memory - the company is making VM images of several OS installs available internally. But those VM images are of course meant to run under RHEL6. Is KVM = KVM = KVM, so that I can set up Gentoo as a KVM host, and with a little care it'll run these VM images intended for RHEL6?
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Wed Dec 01, 2010 11:28 pm    Post subject: Reply with quote

depontius wrote:
Heavy MAC management means all of the bad things you suggest, so I guess that means I'm stuck with NAT. I remember several years back someone complaining about this with respect to running Windows inside VMWare, and I don't believe they offered anything better. However the "new strategy" is to get rid of multiboot in favor of virtualization, so maybe they've relaxed the MAC requirements. But there's another strategic move to "endpoint registration", meaning only registered MACs can connect. So it's anyone's guess what the long-term prospects are going to be.

Which leads to another question... If I set up bridging, can I specify the MACs for the VMs, or are they somehow deterministic, so I can properly register them, if/when it becomes necessary? (I guess this can probably be gleaned from the Wiki, but it may also be something most people don't need to do, and therefore not documented.)

This also jogged my memory - the company is making VM images of several OS installs available internally. But those VM images are of course meant to run under RHEL6. Is KVM = KVM = KVM, so that I can set up Gentoo as a KVM host, and with a little care it'll run these VM images intended for RHEL6?


I cant comment on RHEL atop Gentoo, but I do run a load of Gentoo guests (my servers) atop Arch, and with regards to setting the MAC address for the VM's NIC, yes, you can do this as needed. This applies to both Arch and Gentoo, as the command-line parameters are the same on both

It does create its own on startup, but it can be specified as well. With KVM I found that when I tried to launch a second guest, the second guest tried having the same MAC as the first, that's what brought all of this up

So the parameter for my KVM NIC looks like so:

Code:

-net nic,model=virtio,macaddr=52:54:00:12:34:56 -net tap,ifname=tap0
-net nic,model=virtio,macaddr=52:54:00:12:34:57 -net tap,ifname=tap1


for the first and second KVM instances respectively

As far as the third question, to my knowledge yes, KVM is KVM is KVM. Though, depending on the HDD driver within the guest, you may have to add something like this if it's a virtio device

Code:

-drive file=/path/to/some/disk.img,if=virtio,boot=on

_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum