Re: [gentoo-user] installing virtual machine under gentoo

2022-01-01 Thread John Covici
On Sun, 02 Jan 2022 01:31:12 -0500,
Grant Taylor wrote:
> 
> On 1/1/22 11:05 PM, John Covici wrote:
> > Well, I foujnd out something.  If I go to the file menu, I can
> > add the connection manually and it works,
> 
> That sounds familiar.
> 
> > but I wonder why I have to do that?
> 
> Because the KVM Virtual Manager is designed such that it can
> administer KVM / libvirt / qemu on multiple systems.  It's really
> client-server infrastructure.  You're just needing to point the
> client at your local server one time.
> 
> > Also, before I do anything, it asks me for the root password
> > and says system policy prevents local management of virtual
> > machines. Do you know why this is so?
> 
> This also seems familiar.
> 
> Try re-starting the libvirt / kvm daemons.  They may not be aware
> that your user is now a member of the proper group.  --  Aside:
> This is why a reboot is ... convenient, but not required.
> 
> This /should/ be taken care of proper group administration for
> your normal user.
> 
> I ran into this a long time ago when I set up KVM on my last
> Gentoo system.  I don't remember exactly what I had to do to
> resolve it.  I do know that it was less than five minutes of
> searching the web to find the answer, cussing at what needed to
> be done, and doing it.  That system has been running perfectly
> fine for many years.
> 
> 
> 

OK, I fixed it, the group name was wrong when I tried the last time, I
had libvirtd and its only libvirt and that seems to have fixed things.

Thanks.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici wb2una
 cov...@ccs.covici.com



Re: [gentoo-user] installing virtual machine under gentoo

2022-01-01 Thread Grant Taylor

On 1/1/22 11:05 PM, John Covici wrote:
Well, I foujnd out something.  If I go to the file menu, I can add the 
connection manually and it works,


That sounds familiar.


but I wonder why I have to do that?


Because the KVM Virtual Manager is designed such that it can administer 
KVM / libvirt / qemu on multiple systems.  It's really client-server 
infrastructure.  You're just needing to point the client at your local 
server one time.


Also, before I do anything, it asks me for the root password and 
says system policy prevents local management of virtual machines. 
Do you know why this is so?


This also seems familiar.

Try re-starting the libvirt / kvm daemons.  They may not be aware that 
your user is now a member of the proper group.  --  Aside:  This is why 
a reboot is ... convenient, but not required.


This /should/ be taken care of proper group administration for your 
normal user.


I ran into this a long time ago when I set up KVM on my last Gentoo 
system.  I don't remember exactly what I had to do to resolve it.  I do 
know that it was less than five minutes of searching the web to find the 
answer, cussing at what needed to be done, and doing it.  That system 
has been running perfectly fine for many years.




--
Grant. . . .
unix || die



Re: [gentoo-user] installing virtual machine under gentoo

2022-01-01 Thread John Covici
On Sat, 01 Jan 2022 23:55:45 -0500,
Grant Taylor wrote:
> 
> On 1/1/22 1:19 PM, Mark Knecht wrote:
> > In my experience it often takes either a logout/in or a reboot
> 
> Ya
> 
> Depending on what you actually /need/ to use the new group for
> you can probably ssh to localhost or possibly use the `newgrp`
> command go switch your primary group to the group that you've
> been added to which hasn't been loaded (?) instantiated (?)
> ... in the current session.

Well, I foujnd out something.  If I go to the file menu, I can add the
connection manually and it works, but I wonder why I have to do that?

Also, before I do anything, it asks me for the root password and says
system policy prevents local management of virtual machines.  Do you
know why this is so?

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici wb2una
 cov...@ccs.covici.com



Re: [gentoo-user] genkernel's new configs not used?

2022-01-01 Thread William Kenworthy



On 2/1/22 13:44, Dale wrote:

Dale wrote:

Neil Bothwick wrote:

On Sat, 1 Jan 2022 15:44:51 +, Wols Lists wrote:


Compiling the kernel and modules? Replace 1 with

make all modules_install install

There's also the matter of the initramfs, one of the main reasons
people use genkernel, although I prefer dracut for this.

   

until you trip over genkernel's "features" ... like AUTOMOUNT_BOOT,
which doesn't work, by design. Or NO_INSTALL, which does rather more
than just not installing ...

I'm investigating source_mage, and ought to investigate dracut.

Once you have a working kernel, there's very little to do on updates. A
script that runs

cd /usr/src/linux
zcate /proc/config.gz >.config
make oldconfig
make all modules_install install
dracut --kver=$(cat include/config/kernel.release) --xz
update the bootloader

mostly does it all, with a few frills thrown in to cover things like
rebuilding modules.



Can you explain this part a bit?  How it knows what version for example
to build against?  Does it follow the link in /usr/src/linux, eselect
info or something else?



dracut --kver=$(cat include/config/kernel.release) --xz

The one thing that stumps me is figuring out how to tell dracut what
version I want built.  I keep 2, 3 and sometimes 4 kernels of different
versions lurking about in /boot.

Thanks.

Dale

:-)  :-)


I got it figured out.  That's a little like cheating.  LOL

Dale

:-)  :-)

rattus ~ # (cd /usr/src/linux && make kernelversion)
5.10.76-gentoo-r1
rattus ~ #



Re: [gentoo-user] genkernel's new configs not used?

2022-01-01 Thread Dale
Dale wrote:
> Neil Bothwick wrote:
>> On Sat, 1 Jan 2022 15:44:51 +, Wols Lists wrote:
>>
 Compiling the kernel and modules? Replace 1 with

 make all modules_install install

 There's also the matter of the initramfs, one of the main reasons
 people use genkernel, although I prefer dracut for this.

   
>>> until you trip over genkernel's "features" ... like AUTOMOUNT_BOOT, 
>>> which doesn't work, by design. Or NO_INSTALL, which does rather more 
>>> than just not installing ...
>>>
>>> I'm investigating source_mage, and ought to investigate dracut.
>> Once you have a working kernel, there's very little to do on updates. A
>> script that runs
>>
>> cd /usr/src/linux
>> zcate /proc/config.gz >.config
>> make oldconfig
>> make all modules_install install
>> dracut --kver=$(cat include/config/kernel.release) --xz
>> update the bootloader
>>
>> mostly does it all, with a few frills thrown in to cover things like 
>> rebuilding modules.
>>
>>
>
> Can you explain this part a bit?  How it knows what version for example
> to build against?  Does it follow the link in /usr/src/linux, eselect
> info or something else?
>
>
>> dracut --kver=$(cat include/config/kernel.release) --xz
>
> The one thing that stumps me is figuring out how to tell dracut what
> version I want built.  I keep 2, 3 and sometimes 4 kernels of different
> versions lurking about in /boot. 
>
> Thanks.
>
> Dale
>
> :-)  :-) 


I got it figured out.  That's a little like cheating.  LOL 

Dale

:-)  :-) 



Re: [gentoo-user] installing virtual machine under gentoo

2022-01-01 Thread John Covici
On Sat, 01 Jan 2022 23:55:45 -0500,
Grant Taylor wrote:
> 
> On 1/1/22 1:19 PM, Mark Knecht wrote:
> > In my experience it often takes either a logout/in or a reboot
> 
> Ya
> 
> Depending on what you actually /need/ to use the new group for
> you can probably ssh to localhost or possibly use the `newgrp`
> command go switch your primary group to the group that you've
> been added to which hasn't been loaded (?) instantiated (?)
> ... in the current session.
> 
> 

Well, for a normal tty session, it was OK to log out and back and then
the kvm group was seen, but to get the gnome session to see the kvm
group, I had to log out of all my sessions and then the kvm group was
seen, but the message still says qem/kvm not commected.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici wb2una
 cov...@ccs.covici.com



Re: [gentoo-user] installing virtual machine under gentoo

2022-01-01 Thread Grant Taylor

On 1/1/22 10:07 PM, John Covici wrote:

Maybe I have to log out of everything with my user name even though
most of the logins are to virtual consoles?


You typically need to log out of X11 sessions and log back in for them 
to see the new groups.


But you say "virtual consoles", which tells me (Control)-(Alt)-(F#) 
which means that any given virtual console should be able to see the new 
groups if it logs out and logs back in, even if others stay logged in.




--
Grant. . . .
unix || die



Re: [gentoo-user] installing virtual machine under gentoo

2022-01-01 Thread John Covici
On Sat, 01 Jan 2022 23:52:18 -0500,
Grant Taylor wrote:
> 
> On 1/1/22 6:04 PM, John Covici wrote:
> > It more seems to have to do something with the uri -- libvertd is
> > certainly running,  and I added myself to the kvm group, but still get
> > qem/kvm not connected.
> 
> Run `id` as your current user and make sure that it's showing the
> kvm & libvirt groups.
> 
> 
> I did not do the libvertd group, did not know that.  When I look at
> /etc/group, I see kvm, but even though I had logged out, when I do
> the id command in a terminal frame under gnome, it does not list
> kvm.

Maybe I have to log out of everything with my user name even though
most of the logins are to virtual consoles?


-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici wb2una
 cov...@ccs.covici.com



Re: [gentoo-user] installing virtual machine under gentoo

2022-01-01 Thread Grant Taylor

On 1/1/22 1:19 PM, Mark Knecht wrote:

In my experience it often takes either a logout/in or a reboot


Ya

Depending on what you actually /need/ to use the new group for you can 
probably ssh to localhost or possibly use the `newgrp` command go switch 
your primary group to the group that you've been added to which hasn't 
been loaded (?) instantiated (?) ... in the current session.




--
Grant. . . .
unix || die



Re: [gentoo-user] installing virtual machine under gentoo

2022-01-01 Thread Grant Taylor

On 1/1/22 6:04 PM, John Covici wrote:

It more seems to have to do something with the uri -- libvertd is
certainly running,  and I added myself to the kvm group, but still get
qem/kvm not connected.


Run `id` as your current user and make sure that it's showing the kvm & 
libvirt groups.




--
Grant. . . .
unix || die



Re: [gentoo-user] installing virtual machine under gentoo

2022-01-01 Thread John Covici
It more seems to have to do something with the uri -- libvertd is
certainly running,  and I added myself to the kvm group, but still get
qem/kvm not connected.

On Sat, 01 Jan 2022 15:19:57 -0500,
Mark Knecht wrote:
> 
> On Sat, Jan 1, 2022 at 12:28 PM Grant Taylor
>  wrote:
> >
> > On 1/1/22 12:08 PM, John Covici wrote:
> > > OK, I made some progress -- I emerged qemu/kvm packages including
> > > libvirtd and virt-manager came along.  Now, when I start virt-manager,
> > > it complains the qqemu/kvm  not connected.  I am running virt-manager
> > > as my regular user.
> 
> >
> > You may need to add your user account to -- what I think is -- the "kvm"
> > group.  (Don't forget the usual dance when adding yourself to a new group.)
> >
> 
> kvm and libvirt
> 
> In my experience it often takes either a logout/in or a reboot
> 
> HTH,
> Mark
> 

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici wb2una
 cov...@ccs.covici.com



Re: [gentoo-user] installing virtual machine under gentoo

2022-01-01 Thread Mark Knecht
On Sat, Jan 1, 2022 at 12:28 PM Grant Taylor
 wrote:
>
> On 1/1/22 12:08 PM, John Covici wrote:
> > OK, I made some progress -- I emerged qemu/kvm packages including
> > libvirtd and virt-manager came along.  Now, when I start virt-manager,
> > it complains the qqemu/kvm  not connected.  I am running virt-manager
> > as my regular user.

>
> You may need to add your user account to -- what I think is -- the "kvm"
> group.  (Don't forget the usual dance when adding yourself to a new group.)
>

kvm and libvirt

In my experience it often takes either a logout/in or a reboot

HTH,
Mark



Re: [gentoo-user] genkernel's new configs not used?

2022-01-01 Thread Dale
Neil Bothwick wrote:
> On Sat, 1 Jan 2022 15:44:51 +, Wols Lists wrote:
>
>>> Compiling the kernel and modules? Replace 1 with
>>>
>>> make all modules_install install
>>>
>>> There's also the matter of the initramfs, one of the main reasons
>>> people use genkernel, although I prefer dracut for this.
>>>
>>>   
>> until you trip over genkernel's "features" ... like AUTOMOUNT_BOOT, 
>> which doesn't work, by design. Or NO_INSTALL, which does rather more 
>> than just not installing ...
>>
>> I'm investigating source_mage, and ought to investigate dracut.
> Once you have a working kernel, there's very little to do on updates. A
> script that runs
>
> cd /usr/src/linux
> zcate /proc/config.gz >.config
> make oldconfig
> make all modules_install install
> dracut --kver=$(cat include/config/kernel.release) --xz
> update the bootloader
>
> mostly does it all, with a few frills thrown in to cover things like 
> rebuilding modules.
>
>


Can you explain this part a bit?  How it knows what version for example
to build against?  Does it follow the link in /usr/src/linux, eselect
info or something else?


> dracut --kver=$(cat include/config/kernel.release) --xz


The one thing that stumps me is figuring out how to tell dracut what
version I want built.  I keep 2, 3 and sometimes 4 kernels of different
versions lurking about in /boot. 

Thanks.

Dale

:-)  :-) 




Re: [gentoo-user] installing virtual machine under gentoo

2022-01-01 Thread Grant Taylor

On 1/1/22 12:08 PM, John Covici wrote:
OK, I made some progress -- I emerged qemu/kvm packages including 
libvirtd and virt-manager came along.  Now, when I start virt-manager, 
it complains the qqemu/kvm  not connected.  I am running virt-manager 
as my regular user.


Make sure that libvirtd is running:

   # rc-service libvirtd status

Also:

   # rc-update add libvirtd default

You may need to add your user account to -- what I think is -- the "kvm" 
group.  (Don't forget the usual dance when adding yourself to a new group.)




--
Grant. . . .
unix || die



Re: [gentoo-user] genkernel's new configs not used?

2022-01-01 Thread Neil Bothwick
On Sat, 1 Jan 2022 15:44:51 +, Wols Lists wrote:

> > Compiling the kernel and modules? Replace 1 with
> > 
> > make all modules_install install
> > 
> > There's also the matter of the initramfs, one of the main reasons
> > people use genkernel, although I prefer dracut for this.
> > 
> >   
> until you trip over genkernel's "features" ... like AUTOMOUNT_BOOT, 
> which doesn't work, by design. Or NO_INSTALL, which does rather more 
> than just not installing ...
> 
> I'm investigating source_mage, and ought to investigate dracut.

Once you have a working kernel, there's very little to do on updates. A
script that runs

cd /usr/src/linux
zcate /proc/config.gz >.config
make oldconfig
make all modules_install install
dracut --kver=$(cat include/config/kernel.release) --xz
update the bootloader

mostly does it all, with a few frills thrown in to cover things like 
rebuilding modules.


-- 
Neil Bothwick

Windoze95 Quote: Why is the Pentium 166 so fast? - Its for booting
faster, if Windows crashed again.


pgpcgDpUgCv5Z.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] installing virtual machine under gentoo

2022-01-01 Thread John Covici
On Fri, 31 Dec 2021 12:50:43 -0500,
Grant Taylor wrote:
> 
> On 12/31/21 8:12 AM, Rich Freeman wrote:
> > ++
> 
> +++ to KVM / libvirt / VirtManager (GUI)
> 
> > This is just a front-end to libvirt and kvm, so you're building
> > entirely on solid technologies, and anything you set up with
> > the GUI can be edited or run or otherwise managed from the
> > command line, and vice-versa.
> 
> Close, but not quite.
> 
> Yes, anything that can be done in the GUI can be done at the CLI
> / config files.
> 
> Though I have had some more essoteric things that had to be done
> at the CLI / config files that couldn't be done in the GUI.  This
> usually has to do with more advanced things like iSCSI, Fibre
> Channel, ZFS pools / dataset per guest, etc.
> 
> The vast majority of the things that someone starting with KVM
> will want to do can be done with the Virtual Machine Manager GUI.
> 
> > It ends up resembling something like VirtualBox or the old
> > VMWare Workstation edition, but it is all FOSS and in-kernel so
> > it just is more reliable/etc.
> 
> Yep.  There are only so many ways that you can present a concept;
> inventory of VMs, VM console, VM management.  They start to look
> similar after a while.
> 
> > That said, I only use VMs situationally and at this point just
> > about everything I'm doing is in containers if it can be
> > linux-based. Way lighter all-around, even if I'm running a full
> > OS in the container. I personally prefer to run my containers
> > with nspawn and virtual ethernet, so each container gets its
> > own IP via DHCP.
> 
> The Virtual Machine Manager GUI can also administer / manage some
> aspects of containers.
> 
> I would highly suggest giving Virtual Machine Manager GUI for
> KVM+libvert+qemu a try.  It is probably the quintessential Linux
> virtualization method.
> 
> > Oh, and for kvm if you want to run your guests on your main LAN
> > you'll probably need to set up a bridge interface.
> 
> Yes, bridging is very nice and is my preferred way for most VM
> use cases.  Though it might be a bit more than someone wants to
> tackle while getting their feet wet with virtualization.
> Especially if you're trying to share a single NIC for other
> aspects of the hosting system.  It can all be done, but there is
> a lot of minutia (methods and configurations therein) that are
> easy to get lost in.  I'd probably recommend a second NIC, even
> if it's an inexpensive USB NIC just for the virtualization. Doing
> that will avoid complexities that don't need to be dealt with
> /now/.  --  Reduce the number of variables that you're working
> with at one time.
> 
> 

OK, I made some progress -- I emerged qemu/kvm packages including
libvirtd and virt-manager came along.  Now, when I start virt-manager,
it complains the qqemu/kvm  not connected.  I am running virt-manager
as my regular user.

Is it correct that the command line version of this is virt-install ?


-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici wb2una
 cov...@ccs.covici.com



Re: [gentoo-user] genkernel's new configs not used?

2022-01-01 Thread Wols Lists

On 01/01/2022 08:39, Neil Bothwick wrote:

On Fri, 31 Dec 2021 22:21:53 -0700, the...@sys-concept.com wrote:


On 12/31/21 21:43, caveman رَجُلُ الْكَهْفِ 穴居人 wrote:

On Friday, December 31st, 2021 at 6:52 PM, Jack
 wrote:

 You would still need to run genkernel
again for that new version.


so, no auto-migration for configs?  i thought
configs used to migrate automatically.

basically i'm trying to avoid building some
modules.


When it comes to kernel nothing is fully automatic.

Go though these commands:

cd /usr/src
rm linux


Does that work? Or do you need to use "unlink"? And anyway, the next few 
commands make it redundant.


eselect kernel list
eselect kernel set #

or
ln -sfn linux-new_kernel-gentoo linux

cd linux
cp ../linux-old_kernel/.config .
make oldconfig
[just keep hitting enter]


If you just want to accept the defaults for all new options, use "make
olddefconfig".


make menuconfig

You are not done yet!

1.) At this point you must copy new kernel to your boot directory.
2.) emerge --ask -vq @module-rebuild rebuild
3.) must run to update grub menu entries eg.:
# grub-mkconfig -o /boot/grub/grub.cfg

4.) What else did I miss? (somebody correct me).



Compiling the kernel and modules? Replace 1 with

make all modules_install install

There's also the matter of the initramfs, one of the main reasons people
use genkernel, although I prefer dracut for this.


until you trip over genkernel's "features" ... like AUTOMOUNT_BOOT, 
which doesn't work, by design. Or NO_INSTALL, which does rather more 
than just not installing ...


I'm investigating source_mage, and ought to investigate dracut.

Cheers,
Wol



Re: [gentoo-user] genkernel's new configs not used?

2022-01-01 Thread Neil Bothwick
On Fri, 31 Dec 2021 22:21:53 -0700, the...@sys-concept.com wrote:

> On 12/31/21 21:43, caveman رَجُلُ الْكَهْفِ 穴居人 wrote:
> > On Friday, December 31st, 2021 at 6:52 PM, Jack
> >  wrote: 
> >>  You would still need to run genkernel
> >> again for that new version.  
> > 
> > so, no auto-migration for configs?  i thought
> > configs used to migrate automatically.
> > 
> > basically i'm trying to avoid building some
> > modules.  
> 
> When it comes to kernel nothing is fully automatic.
> 
> Go though these commands:
> 
> cd /usr/src
> rm linux
> 
> eselect kernel list
> eselect kernel set #
> 
> or
> ln -sfn linux-new_kernel-gentoo linux
> 
> cd linux
> cp ../linux-old_kernel/.config .
> make oldconfig
> [just keep hitting enter]

If you just want to accept the defaults for all new options, use "make
olddefconfig".

> make menuconfig
> 
> You are not done yet!
> 
> 1.) At this point you must copy new kernel to your boot directory.
> 2.) emerge --ask -vq @module-rebuild rebuild
> 3.) must run to update grub menu entries eg.:
> # grub-mkconfig -o /boot/grub/grub.cfg
> 
> 4.) What else did I miss? (somebody correct me).
> 

Compiling the kernel and modules? Replace 1 with

make all modules_install install

There's also the matter of the initramfs, one of the main reasons people
use genkernel, although I prefer dracut for this.


-- 
Neil Bothwick

"Be strict when sending and tolerant when receiving."
 RFC 1958 - Architectural Principles of the Internet - section 3.9


pgpyFhNS8_Iuw.pgp
Description: OpenPGP digital signature