Jump to content

Virtual Machine Manager (VMM)


Hedon James

Recommended Posts

3 minutes ago, Bookmem said:

I've got that installed already along with Qemu/kvm.  But when I run it I get an error message saying the libvertd daemon isn't running. If I try to install libvirtd via apt, it can't locate the package.

 

look at the Debian link I posted for the libvirt packages needed.  And you also need to enable the service through systemd.  Easiest & quickest way is just to restart OS, but if you wanna go through the cli process to enable without restarting, this link should help:

https://linuxhint.com/install_kvm_debian_10/

Link to comment
Share on other sites

9 minutes ago, Bookmem said:

Tried that.  "service not found"

you tried to install libvirtd, but that's not the package you need.  you need the libvirt packages referenced in my Debian link.  With the appropriate packages installed, libvirtd should be enabled and started on its own.  If it does not, simply reboot or follow my link on 2nd post of this page for CLI incantations to enable & start libvirtd.

Edited by Hedon James
  • Like 1
Link to comment
Share on other sites

58 minutes ago, securitybreach said:

 

Wow, that is an impressive list

 

As in "a lot"?  I know....I have a problem, and need to cut back.  But I'm a kinetic learner who learns by doing and I like to keep up with the goings-on in different distros.  I also like to steal the best ideas from others and implement them in MY desktop/workflows.  But I still need to cut back....it's a real bear keeping that many rolling distro VMs up to date!  And now that I've got my newest "home-brew distro" hammered into something that's ideal for me, I'll probably cool my jets for awhile....until I hear about some cool new feature or implementation in Distro-X...causing me to fire up a VM and figure it out!  LOL!!!!

Link to comment
Share on other sites

securitybreach
Just now, Hedon James said:

 

As in "a lot"?  I know....I have a problem, and need to cut back.  But I'm a kinetic learner who learns by doing and I like to keep up with the goings-on in different distros.  I also like to steal the best ideas from others and implement them in MY desktop/workflows.  But I still need to cut back....it's a real bear keeping that many rolling distro VMs up to date!  And now that I've got my newest "home-brew distro" hammered into something that's ideal for me, I'll probably cool my jets for awhile....until I hear about some cool new feature or implementation in Distro-X...causing me to fire up a VM and figure it out!  LOL!!!!

 

Yup, as in a lot. I could do something like that as my server has 192gb ram but I just do not have a real reason to do so.

Link to comment
Share on other sites

14 minutes ago, Hedon James said:

look at the Debian link I posted for the libvirt packages needed.  And you also need to enable the service through systemd.  Easiest & quickest way is just to restart OS, but if you wanna go through the cli process to enable without restarting, this link should help:

https://linuxhint.com/install_kvm_debian_10/

Ok.  That showed me what I was missing.

sudo apt install libvirt-clients libvirt-daemon-system virtinst

It is running now.  Thanks

  • Agree 1
Link to comment
Share on other sites

securitybreach
Just now, Bookmem said:

Ok.  That showed me what I was missing.


sudo apt install libvirt-clients libvirt-daemon-system virtinst

It is running now.  Thanks

 

Excellent :thumbsup:

Link to comment
Share on other sites

I seldom run more than 1 VM at a time, as I'm limited to 16GB RAM.  Plus I have no need to run multiples simultaneously, although occasionally I've been known to work in Win7 while Win10 updates.  But that's rare.  Several of those VMs are rolling release distros and I've been tracking all of them for a little over a year to determine how smooth and bug-free those rolling updates are.  And as much as rolling releases intrigue me, I just can't risk it on my production machine in my self-employed 1-man business.  A significant computer issue that puts me out of commission for a day will FORCE me to drop EVERYTHING and troubleshoot; possibly missing a contracted deadline, which could further cascade backwards for the next month or so.  Rock steady & predictable is the ticket for me, no matter how attractive rolling release is.  But the only way I know that is because I've tracked several rolling distros in VMs for over a year....

Link to comment
Share on other sites

securitybreach

Well rolling release does not automatically mean instability. I have not had an update break my arch systems in many years and it is very simple to roll back to a previous version of application if it happens. Arch keeps previous versions of applications in /var/cache/pacman/pkg/ to roll back to if needed. You can change how many versions it keeps and I set it to two versions as that directory can get very large otherwise.

 

Like I said, I have not had to do it in many years but a simple pacman -U /var/cache/pacman/pkg/PACKAGE-Version.tar.xz  will downgrade the package to whatever version you need.

Link to comment
Share on other sites

securitybreach
5 minutes ago, Bookmem said:

How do I change the default storage location? 

 

You do that as you are setting up the vm. Watch my video that I posted above that shows creating a vm step by step.

Link to comment
Share on other sites

I finally got a Win 7 vm installed but it is so slow as to be unuseable.  Have 4 cpu and 4gb RAM assigned.  Also, when it freezes, none of the power off or reboot options work.  Virtualbox works fine on the same computer.

Link to comment
Share on other sites

13 minutes ago, Bookmem said:

I finally got a Win 7 vm installed but it is so slow as to be unuseable.  Have 4 cpu and 4gb RAM assigned.  Also, when it freezes, none of the power off or reboot options work.  Virtualbox works fine on the same computer.

 

Fresh install?  You have plenty of cores and RAM assigned, so my guess would be video driver.  You accept default values when creating VM?  And how much RAM you have on your host?  The old rules still apply with VMs...the host requires AT LEAST 50% of RAM to operate.  If you have 8GB RAM on your system, and you're allocating 4GB to the guest (leaving only 4GB for the host), that's not a good config; 5GB Host and 3GB guest would be better, FWIW.

 

I fresh installed Win7 with 2 cpu and 4GB RAM, and it runs wonderfully.  All default values, including QXL video.  SB suggested he changes his video to VGA.  I'd try different video settings before you scrap it.

Edited by Hedon James
Link to comment
Share on other sites

18 minutes ago, Hedon James said:

 

Fresh install?  You have plenty of cores and RAM assigned, so my guess would be video driver.  You accept default values when creating VM?  And how much RAM you have on your host?  The old rules still apply with VMs...the host requires AT LEAST 50% of RAM to operate.  If you have 8GB RAM on your system, and you're allocating 4GB to the guest, that's not a good config; 5GB Host and 3GB guest would be better, FWIW.

 

I fresh installed Win7 with 2 cpu and 4GB RAM, and it runs wonderfully.  All default values, including QXL video.  SB suggested he changes his video to VGA.  I'd try different video settings before you scrap it.

It defaulted to Spice server for display but that didn't work.  Had to switch to VNC server.  Also, how to I access USB flash?

 

edit: I changed to 3 cpu and 3gb ram.  Got Spice to work.  Still need to access USB.

Edited by Bookmem
Link to comment
Share on other sites

10 minutes ago, Bookmem said:

It defaulted to Spice server for display but that didn't work.  Had to switch to VNC server.  Also, how to I access USB flash?

 

I wish I knew what the different choices meant.  But I don't, so I just change variables until it works.  For instance, originally didn't have sound in my Win7 or Win10 VMs.  My WinXP uses the ac97 sound device, which matches the VirtualBox device.  Not for Win7 and Win10 though; they use Intel HD audio in VB.  Through trial & error, I found that ic6 produces sound in VMM.  I don't know if that's the "correct" selection, but it works so I'm good with that.

 

You can access USB flash from the top menu of your running VM.  At the top menu "File-Virtual Machine-View-Send Key" choose Virtual Machine and from that menu choose "redirect USB device" and select the device you want to connect to the VM.  It will auto release upon suspend or shut down, just like VB.

  • Like 2
Link to comment
Share on other sites

I found the problem.  Didn't realize I'd never turned on AMD-V in the bios of my new MB.  But it turns out that, at least for the time being, Mint still supports Vbox and I'm familiar with it.

Link to comment
Share on other sites

securitybreach
1 minute ago, Bookmem said:

I found the problem.  Didn't realize I'd never turned on AMD-V in the bios of my new MB.  But it turns out that, at least for the time being, Mint still supports Vbox and I'm familiar with it.

Oh, yeah, that would make a huge difference as KVM uses kernel level virtualization.

Link to comment
Share on other sites

Hey SB, still looking for a way to sort VMs in a manner of my choosing.  Found out that they're not sorted in chronological order, newest first, they're sorted by name; either A-Z or Z-A.  Chronological order was a coincidence.  I'm not seeing any way to custom sort, and I sure don't see any ability for virt-manager to "group" the VMs like I want.  Maybe that feature doesn't exist yet....sure hope the devs will add it soon!

 

Of bigger concern right now, having problems with LuckyBackup of my VMM disks.  Discovered that the files (previously owned by username jim) are now owned by root?  And luckybackup doesn't like that, even though I have the checkbox "attempt super user activities" ticked.  Manually changed ownership and group back to username jim and was able to backup images, so that was definitely the issue.  But as soon as I fired up VMM again, the disks changed back to root ownership.  Some googling suggested that my user didn't have appropriate sudo permissions.  I am a member of root and sudo groups, but wasn't a member of libvirtd group, so added myself to that.  Changed the disk permissions back to jim, but they immediately reverted back to root on the next use of VMM.

 

Further googling suggests this is expected behavior:

https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1784001

 

I tinkered with the virt-manager GUI and found the section for "add new connection" and saw a pulldown for qemu/kvm user session that invokes the "qemu:///session" referenced in the link above.  It appears that qemu/kvm is the default session, and defaults to root.  But when I choose the user session, I get the following warning:

 

image.png.febf508041f42fd4ec1afc1f30d3911c.png

 

WTH is going on here?  I just want to be able to backup my VMM disk images without error, and without flipping ownership back & forth between jim and root.  Do you have this issue with your VMMs?  How to solve?  Your thoughts?

Link to comment
Share on other sites

securitybreach

Did you log off and back on after adding yourself to the group? I know it works fine as I have never launched it as root. I connect to virt-manager remotely using ssh to my server.

Link to comment
Share on other sites

I did not.  Good thought.  Or maybe I can restart libvirtd service with systemd sysctl service commands?  If you're correct, I should probably shut down each (currently suspended) VM and close VMM so that VMM starts with the restarted permissions of group libvirtd.

 

Deadlines breathing fire at me now...I'll be back to report to the class how it turned out!  😉

Link to comment
Share on other sites

  • 2 weeks later...

Hey SB (or Sunrat?),

 

Running into a problem with VMM on my new Debian installation.  With "proof of concept" on my old system, I thought I was good to go.  But I can't create a VM on my new system.  VMM throws an error:

Unable to complete install: 'internal error: cannot load AppArmor profile 'libvirt-04e95526-692b-4409-88fe-b5b756ac5c17''

I've never dealt with AppArmor before, so I thought I'd disable it with systemd.  But googling seems to suggest that's not a good idea.  I found this Ubuntu page:

https://help.ubuntu.com/community/AppArmor

which seems to indicate this might be my problem:

 

How do I make AppArmor work with a non-standard HOME directory?

The location of home directories can be tuned in /etc/apparmor.d/tunables/home.

With Ubuntu 10.04 LTS and above, you can set home directory locations using sudo dpkg-reconfigure apparmor.

My VM disks are on a separate Data Drive (/media/jim/sdc1) on my new Debian system; they were on a separate /home partition on old Lubuntu.  So this may or may not be my problem, but the symptoms fit.  Once again, I'm dealing with something I've never crossed paths with before.  Any thoughts on this issue?

This is literally the LAST item to setup in order to completely replicate functionality of my old system (in this case, replacing VBox on Lubuntu with VMM on Debian).  Help?!

Link to comment
Share on other sites

securitybreach

To disable apparmor for libvirt, run this as root:

 aa-complain /etc/apparmor.d/libvirt/libvirt-04e95526-692b-4409-88fe-b5b756ac5c17

 

Link to comment
Share on other sites

It would appear that the security_driver solution is targeted more towards qemu in general, while the 1st solution is targeted to a specific VM, with a specific virtual UUID, correct?  If so, I think the security_driver solution is the better one for me.

 

On a related note, I attempted to set up VMs with a user session (qemu:///session) rather than root (qemu:///system), as I'd like my username to maintain ownership of the disk images, making my LuckyBackups smooth and error free.  I note the warning about reduced network ability.  How reduced?

 

I'd like to be able for VMs to have internet access for updates and downloads, and I'd like them to be able to "locate" printers on my LAN and WLAN for use in those VMs.  Will I have that in a qemu:///session?  IF I can have those 2 functions (what else is there?), I'm wondering how to set that up?  Is it as simple as choosing "specify shared device name" in the VM creation page, and specifying "virbr0"?  Right now, I get the apparmor message for the libvirtd UUID, but once I address that issue, I'm leery and weary of whatever fresh surprise(s) may await...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...