Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
virtualizartion discussion - input please
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1305
Location: Tri-Cities, WA USA

PostPosted: Sat Apr 27, 2024 8:47 pm    Post subject: virtualizartion discussion - input please Reply with quote

I've used virtualbox, vmware, (KVM / QEMU with virt-manager) on Debian.

I would like to do some virtualization with Gentoo for testing other Linux distros.
I'm considering QEMU with Virt-manager.
I'm reading these pages: https://wiki.gentoo.org/wiki/Virtualization
https://yidhra.farm/tech/gentoo/2021/02/14/kvm-on-gentoo.html
https://wiki.gentoo.org/wiki/QEMU

I'd appreciate any input from Gentoo users who have run virtual machines using Gentoo.
_________________
Without diversity there can be no evolution:)


Last edited by cwc on Sat Apr 27, 2024 9:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sat Apr 27, 2024 9:02 pm    Post subject: Reply with quote

cwc,

I use KVM / QEMU with virt-manager for linux on linux unless it a quick throw away VM, then its VBox.
Windows guests count as quick throwaways :)

In practice, I never throw anything away. so I have to keep getting bigger HDDs every time I get a new PC :)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1305
Location: Tri-Cities, WA USA

PostPosted: Sat Apr 27, 2024 9:14 pm    Post subject: Reply with quote

NeddySeagoon wrote:
cwc,

I use KVM / QEMU with virt-manager for linux on linux unless it a quick throw away VM, then its VBox.
Windows guests count as quick throwaways :)

In practice, I never throw anything away. so I have to keep getting bigger HDDs every time I get a new PC :)


thanks for the input Neddy
excellent
"KVM / QEMU with virt-manager"

The following should get me started:
https://wiki.gentoo.org/wiki/QEMU
Enable KVM Support (CONFIG_KVM)

[*] Virtualization --->
<*> Kernel-based Virtual Machine (KVM) support
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sun Apr 28, 2024 10:02 am    Post subject: Reply with quote

cwc,

If you want to use virtio devices, both the host and guest kernels need to be able to support virtio.

To run unmodified guests, QEMU will offer the guests some emulated hardware.
virtio is preferred as is does away with the emulated hardware overhead.

I use KVM / QEMU with virt-manager on both arm64 and amd64
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1305
Location: Tri-Cities, WA USA

PostPosted: Sun Apr 28, 2024 1:44 pm    Post subject: Reply with quote

Neddy,

Why a module rather than a kernel build in?
KERNEL Enable KVM support for Intel processors (CONFIG_KVM_INTEL)

[*] Virtualization --->
<M> KVM for Intel processors support

I'm using an intel i7
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sun Apr 28, 2024 2:12 pm    Post subject: Reply with quote

cwc,

Nobody told me :)
Code:
CONFIG_KVM_INTEL=y

Has been on my server bare metal for a long time now.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1305
Location: Tri-Cities, WA USA

PostPosted: Sun Apr 28, 2024 2:46 pm    Post subject: Reply with quote

Thanks Neddy
"CONFIG_KVM_INTEL=y"

this is mine
more .config | grep CONFIG_KVM_INTEL
CONFIG_KVM_INTEL=m

I'll update and recompile.
I can not find <*> Mediated device driver framework


Last edited by cwc on Sun Apr 28, 2024 4:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21706

PostPosted: Sun Apr 28, 2024 3:38 pm    Post subject: Reply with quote

As I read the git log for the kernel, that option ceased to be user-manageable in v6.2-rc5-4-g8bf8c5ee1f38: vfio-mdev: turn VFIO_MDEV into a selectable symbol.
Back to top
View user's profile Send private message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1305
Location: Tri-Cities, WA USA

PostPosted: Sun Apr 28, 2024 4:53 pm    Post subject: Reply with quote

Hu wrote:
As I read the git log for the kernel, that option ceased to be user-manageable in v6.2-rc5-4-g8bf8c5ee1f38: vfio-mdev: turn VFIO_MDEV into a selectable symbol.


thanks
this is my .config

more .config | grep VFIO_MDEV
CONFIG_VFIO_MDEV=m
yoda /usr/src/linux #
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1305
Location: Tri-Cities, WA USA

PostPosted: Mon Apr 29, 2024 1:48 pm    Post subject: kernel notification Reply with quote

I instilled QEMU after following the the kernel guide.
https://wiki.gentoo.org/wiki/QEMU

These are the libvirt notifications I recieved:

Code:
 
 * Messages for package app-emulation/libvirt-9.8.0-r2:

 *   CONFIG_BRIDGE_EBT_MARK_T:    is not set when it should be.
 *   CONFIG_BRIDGE_NF_EBTABLES:    is not set when it should be.
 *   CONFIG_NETFILTER_ADVANCED:    is not set when it should be.
 *   CONFIG_NETFILTER_XT_CONNMARK:    is not set when it should be.
 *   CONFIG_NETFILTER_XT_TARGET_CHECKSUM:    is not set when it should be.
 *   CONFIG_IP6_NF_NAT:    is not set when it should be.
 *   CONFIG_BRIDGE_EBT_T_NAT:    is not set when it should be.
 *   CONFIG_NET_ACT_POLICE:    is not set when it should be.
 *   CONFIG_NET_CLS_FW:    is not set when it should be.
 *   CONFIG_NET_CLS_U32:    is not set when it should be.
 *   CONFIG_NET_SCH_HTB:    is not set when it should be.
 *   CONFIG_NET_SCH_INGRESS:    is not set when it should be.
 *   CONFIG_NET_SCH_SFQ:    is not set when it should be.

_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21706

PostPosted: Mon Apr 29, 2024 2:57 pm    Post subject: Reply with quote

You do not need libvirt to use qemu. I do not have libvirt on the system where I run qemu.

The notifications are telling you about kernel configuration options that are required for certain aspects of the hypervisor to work properly. Depending on what you want to do with the guest, you may or may not need to resolve any or all of these. If you encounter any networking problems with the guest, I would suspect these absences first. If you do not encounter problems, you could choose to ignore these warnings.
Back to top
View user's profile Send private message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1305
Location: Tri-Cities, WA USA

PostPosted: Mon Apr 29, 2024 3:05 pm    Post subject: Reply with quote

Hu wrote:
You do not need libvirt to use qemu. I do not have libvirt on the system where I run qemu.
.


equery d libvirt
* These packages depend on libvirt:
app-emulation/libvirt-9.8.0-r2 (policykit ? acct-group/libvirt)
app-emulation/libvirt-glib-4.0.0 (>=app-emulation/libvirt-1.2.8)
dev-python/libvirt-python-9.8.0 (app-emulation/libvirt:0/9.8.0)
(test ? app-emulation/libvirt:0/9.8.0)


virt-manager pulled libvirt (I think)
Code:


emerge virt-manager
The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by app-emulation/virt-manager-4.1.0-r1::gentoo[-test,gui]
# required by app-emulation/virt-manager (argument)
>=net-misc/spice-gtk-0.42-r3 usbredir
# required by app-emulation/libvirt-9.8.0-r2::gentoo[virt-network]
# required by app-emulation/libvirt-glib-4.0.0::gentoo
# required by app-emulation/virt-manager-4.1.0-r1::gentoo[-test]
# required by app-emulation/virt-manager (argument)
>=net-dns/dnsmasq-2.90 script
# required by app-crypt/swtpm-0.8.1-r2::gentoo
# required by app-emulation/libvirt-9.8.0-r2::gentoo[qemu]
# required by app-emulation/libvirt-glib-4.0.0::gentoo
# required by app-emulation/virt-manager-4.1.0-r1::gentoo[-test]
# required by app-emulation/virt-manager (argument)
>=net-libs/gnutls-3.8.0 pkcs11 tools

I need to look what pulled it.


thank you!
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1305
Location: Tri-Cities, WA USA

PostPosted: Wed May 01, 2024 6:56 pm    Post subject: Reply with quote

Hu wrote:
You do not need libvirt to use qemu. I do not have libvirt on the system where I run qemu.


Hu,

How to you launch VMS?
I am trying to use a gui? I a little NOOB with command line VMS.

Thanks CWC
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21706

PostPosted: Wed May 01, 2024 8:37 pm    Post subject: Reply with quote

I start qemu from the command line. Usually, I have a helper script that memorizes my standard options for a VM, so I don't need to retype them all every time.
Back to top
View user's profile Send private message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1305
Location: Tri-Cities, WA USA

PostPosted: Wed May 01, 2024 10:17 pm    Post subject: Reply with quote

Hu wrote:
I start qemu from the command line. Usually, I have a helper script that memorizes my standard options for a VM, so I don't need to retype them all every time.


thank you Hu. I'll try to work on that :)
https://www.qemu.org/docs/master/system/qemu-manpage.html


Code:

qemu-
qemu-edid            qemu-io              qemu-pr-helper       qemu-system-arm      qemu-system-x86_64   
qemu-img             qemu-nbd             qemu-storage-daemon  qemu-system-sparc    qemu-x86_64 



_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6102
Location: Dallas area

PostPosted: Wed May 01, 2024 11:00 pm    Post subject: Reply with quote

I've always used cmdline qemu, libvirt is probably easier for a newbie.
But anything done in libvirt can be done from the cmd line.

I made a little dialog script, that allows me to choose which vm to start.

Code:
$DIALOG --title "Qemu Virtual Machines" --clear \
        --radiolist "Select?" 45 65 8 \
    "0" "Choose ISO" off \
    "1" "Choose Linux Distro" off \
    "2" "W98se" off \
    "3" "XP" off \
    "4" "W7" on \
    "5" "W8.1" off \
    "6" "W11" off 2> $tempfile


I use taskset to pin certain core/threads for the vm, something libvirt does also.

You learn more about virtual machines using qemu from the cmdlilne, but it's up to you.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1305
Location: Tri-Cities, WA USA

PostPosted: Fri May 03, 2024 2:24 pm    Post subject: Reply with quote

I am going to start over from scratch.
I'll use my old kernel .config and start from scratch.
Thank you for all the input.
I've learned a lot!

This is such a wonderful forum . I'm a retired Comp Sci instructor and my gentoo machines are so much fun and challenging at the same time.
Thank again!
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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