LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-22-2019, 12:12 PM   #1
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Rep: Reputation: 51
Question Virtual machines: kvm or VirtualBox, in this computer?


Hello, I am unsure of which virtualization tool i should use in this computer.

To start, i ran these 2 commands:

Code:
# check-bios-nx --verbose
ok: the NX bit is operational on this CPU.

# kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
I have asked about it in VirtualBox users mailing list, but the answers are not clear enough for me.

So, which option should i use? Or what benefits i have with each, if any, to decide?

VirtualBox has a package to be installed. But if kvm is the chosen option, i am not sure of what package i should choose in Debian. I searched with aptitude, and found: kvmtool, qemu-kvm (same description as qemu-kvm:i386), kvm (which is a virtual package provided by (!!) qemu-kvm). So, it seems there are only 2 options? kvmtool and qemu-kvm?
 
Old 09-22-2019, 03:09 PM   #2
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Code:
apt show kvmtool 
Package: kvmtool
Version: 0.20170904-1
Priority: optional
Section: kernel
Maintainer: Riku Voipio <riku.voipio@linaro.org>
Installed-Size: 238 kB
Depends: libaio1 (>= 0.3.93), libc6 (>= 2.15), libsdl1.2debian (>= 1.2.11), libvncserver1 (>= 0.9.10), zlib1g (>= 1:1.1.4)
Homepage: https://git.kernel.org/cgit/linux/kernel/git/will/kvmtool.git/
Tag: uitoolkit::sdl
Download-Size: 86.9 kB
APT-Sources: http://ftp.uk.debian.org/debian sid/main amd64 Packages
Description: Native Linux KVM TOOL
 kvmtool is a lightweight tool for hosting KVM guests. As a pure virtualization
 tool it only supports guests using the same architecture, though it supports
 running 32-bit guests on those 64-bit architectures that allow this.
Code:
apt show qemu-kvm 
Package: qemu-kvm
Version: 1:4.1-1+b1
Priority: optional
Section: oldlibs
Source: qemu (1:4.1-1)
Maintainer: Debian QEMU Team <pkg-qemu-devel@lists.alioth.debian.org>
Installed-Size: 110 kB
Depends: qemu-system-x86
Homepage: http://www.qemu.org/
Tag: role::shared-lib
Download-Size: 71.7 kB
APT-Manual-Installed: no
APT-Sources: http://ftp.uk.debian.org/debian sid/main amd64 Packages
Description: QEMU Full virtualization on x86 hardware
 QEMU is a fast processor emulator.  This package provides just a wrapper
 script /usr/bin/kvm which run qemu-system-x86 in kvm mode for backwards
 compatibility.
what kind of VM do you need?

virt-manager , may suit you ( this is what I tend to use )
VirtualBox , is a bit more hand holding, but would be fine

depending on what you need
lxc may be an option
akin to a BSD Chroot Jail

it is much lighter on memory..
good for setting up compiler toolchains

for instance, I have a Pure 32bit and a Pure 64bit for compiling "wine WoW64"
 
1 members found this post helpful.
Old 09-22-2019, 03:43 PM   #3
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
I do not want to create any fancy machine. A fairly old hardware, with little RAM, compared to the several GiBs we have today. I do not want to use swap for my daily activities just because the VM is open. Unless, which is rare, my memory is full. The VM will mostly run graphical OSes.

virt-manager manager features (!) are not really useful to me. If i can guarantee they will be limited, i do not care much about the distance this point is from the VM at some time.

lxc seems to need mastering a command toolset. Is this right? Thank you for showing the "apt show [package" command, i had never seen it (probably due never having read fully its manpage, or did not give much attention to some parts).

But all you said does not point me to something: with this computer, and the output of those 2 commands, should i choose a VM tool that uses one of them, or that let me choose which to use?

Last edited by dedec0; 09-23-2019 at 06:50 AM.
 
Old 09-22-2019, 04:23 PM   #4
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
I don't know what you want the vm for.
 
Old 09-22-2019, 04:57 PM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
with this computer, and the output of those 2 commands, should i choose a VM tool that uses one of them, or that let me choose which to use?
We don't know your computer, and the two commands don't provide a clue whether VirtualBox or KVM is better. I doubt that there are commands that help you make that decision; you need to look at your needs, not the computer's properties.

lxc doesn't create or manage virtual machines. It's for container management. If your needs can be fulfilled with containers, they have the advantage of putting orders of magnitude less load on your system than virtual machines. I don't know if containers are good for graphics, though.

I consider VirtualBox very "GUI-centric". It's GUI is much nicer and has more features than VMM. That's its main appeal, apart from the fact that it is also availble on Windows. If you don't need VMM, by extension you need VirtualBox even less.

VirtualBox still doesn't offer nested virtualization on Intel CPUs, although they are working on it. KVM has this feature.

Therefore, I recommend KVM. I am, however, concerned by the small RAM size of your computer.

Last edited by berndbausch; 09-22-2019 at 05:07 PM.
 
Old 09-22-2019, 07:19 PM   #6
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by berndbausch View Post
We don't know your computer, and the two commands don't provide a clue whether VirtualBox or KVM is better. I doubt that there are commands that help you make that decision; you need to look at your needs, not the computer's properties.

lxc doesn't create or manage virtual machines. It's for container management. If your needs can be fulfilled with containers, they have the advantage of putting orders of magnitude less load on your system than virtual machines. I don't know if containers are good for graphics, though.

I consider VirtualBox very "GUI-centric". It's GUI is much nicer and has more features than VMM. That's its main appeal, apart from the fact that it is also availble on Windows. If you don't need VMM, by extension you need VirtualBox even less.

VirtualBox still doesn't offer nested virtualization on Intel CPUs, although they are working on it. KVM has this feature.

Therefore, I recommend KVM. I am, however, concerned by the small RAM size of your computer.
What you shortened as "VMM"? "virt-manager manager" ?

My computer does not have little RAM. It has 16G, which is enough for me, although sometimes i need to reopen all firefox windows (i usually have 2 profiles opened, and each of them with possibly more than one window opened, and also private windows, and all of them with several tabs; but FF does not load the ones i do not look at, so it is not much trouble); thunderbird is also a memory hogger, sometimes, and i am trying to exchange it for something else - i even opened a thread here for that-; what is left in use does not matter much, terms of memory use. But i still do not want to use swap, since it is possible. I do not use much more resources than when i used when computers with 128MB RAM, and top notch ones had 256MB.

Yes, i do not know much about my computer. If those two commands does not say much about it, how about 'lscpu'? Here:

Code:
21:13:35 [  0] root@debian: /
#  LLLL=$LANG; LANG=C; lscpu; LANG=$LLLL
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 142
Model name:            Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Stepping:              9
CPU MHz:               1277.160
CPU max MHz:           3100.0000
CPU min MHz:           400.0000
BogoMIPS:              5424.00
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              3072K
NUMA node0 CPU(s):     0-3
Flags:              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr \
		    pge mca cmov pat pse36 clflush dts acpi mmx fxsr \
		    sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm \
		    constant_tsc art arch_perfmon pebs bts rep_good \
		    nopl xtopology nonstop_tsc aperfmperf eagerfpu pni \
		    pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 \
		    sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic \
		    movbe popcnt tsc_deadline_timer aes xsave avx f16c \
		    rdrand lahf_lm abm 3dnowprefetch epb intel_pt \
		    tpr_shadow vnmi flexpriority ept vpid fsgsbase \
		    tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx \
		    rdseed adx smap clflushopt xsaveopt xsavec \
		    xgetbv1 xsaves dtherm ida arat pln pts hwp \
		    hwp_notify hwp_act_window hwp_epp
21:04:20 [  0] root@debian: /
#
You recommend kvm, but will it be hard to use? Even if it is not as fancy and gui friendly as VB, i may not mind it. I will want to use virtual machines for nothing specific. But surely for things i do not want to do on my daily setup, at least in the first try.

Last edited by dedec0; 09-22-2019 at 11:28 PM.
 
Old 09-22-2019, 07:39 PM   #7
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
VMM is the virtual machine manager, the GUI used as a graphical frontend to KVM. You said that its features are not really useful for you.

If you have never used virtualization, you will have a learning curve, and a steeper one with KVM and VMM than with Virtualbox. So I guess you do need the features of VMM, and Virtualbox's features may provide you with an easier start.

16GB is a comfortable memory size, but it contradicts what you said earlier about not having gigabytes and having old hardware with little RAM.

Apart from memory, the other big requirement is a modern CPU with virtualization extensions. Your CPU has the VMX flag, which enables you to run virtual machines at almost physical speed. Your computer is powerful enough for running virtual machines, be it KVM or Virtualbox or another hypervisor.
 
Old 09-22-2019, 07:46 PM   #8
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
virt-manager full title is "Virtual Machine Manager"

it is my fault for using just the package name

its a gui for kvm/qemu-kvm ( as well as others, including lxc )

kvmtool will only do VM as same arch. as your cpu
qemu will emulate many different cpu arch. and take advantage of kvm when it can

as detailed in the "show" I provided.

VMM is simple enough to use
it has some nice feature, for instance I can attach to and manage VMs running on my desktop with my laptop over ssh.

VirtualBox's GUI is much nicer than VMM , but for basic needs there is not much difference.

but, you still have not mentioned what you want to do with the VM.
a VM will most likely be able to do what you want.
but if all you want is to have a VM to set up a compiler toolchain then it is overkill.
a bog standard chroot might be enough,
a LinuX Container may be better suited, if for instance you wanted to compile a project for a Ubuntu Target on your Debian system.

if you want to test a desktop environment then a VM is a better ( certainly easier ) solution than lxc
 
1 members found this post helpful.
Old 09-22-2019, 08:13 PM   #9
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Talking

Quote:
Originally Posted by Firerat View Post
[...]
Thank you very much for the explanations, Firerat. The details are something that get me lost many times. I did not say what the VM is for, because i do not have any specific need waiting for it. The troubles i had with Qt3 in the last few days could use it. An eventual host of WinXP/2000/NT could be nice too.

The idea of connecting remotely to a virtual machine is very nice! Would that leave my machine potentially more protected to network attacks? (since it is kept connected 24/7, mostly, anyway)
 
Old 09-22-2019, 09:20 PM   #10
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
well, for winXP/2K/NT
you will need a full VM

security?
larger surface area to attack = less secure
if the outside world can't get to your internal network , more secure

having discontinued windows versions on your network... well I wouldn't

wine would be a better option, easier to control and performance would likely be better.. depends what you wanted to do.... there I go again.. look for a clear goal to come up with a good solution..

without a clear goal it is all just a waste of time.
 
Old 09-23-2019, 06:54 AM   #11
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by dedec0 View Post
I do not want to create any fancy machine. A fairly old hardware, with little RAM, compared to the several GiBs we have today. I do not want to use swap for my daily activities just because the VM is open. Unless, which is rare, my memory is full. The VM will mostly run graphical OSes.

[...]
Edit: I meant to write "A fairly old hardware, with little RAM, [...]" instead of "I fairly old hardware, with little RAM, [...].

At most, i would want to create a VM equal to the computer i have, to use one of its cores, since (all-1) of them are idle 99% of the time.
 
Old 09-23-2019, 07:13 AM   #12
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
xen is what you want
easier with amd gpu ( I think )
I gave up with my Nvidia card

but my laptop worked ok ( AMD video )

but I still see no clear goal with this VM of yours
 
Old 09-23-2019, 07:31 AM   #13
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by Firerat View Post
xen is what you want
Do you mean the package xen-hypervisor? Please, always say the package meant, because what i will do with names i do not know, and are mentioned, is search for it with aptitude (or synaptic, sometimes), and if that fails completely, search the web. But there may be noise results, like happened now, and then i cannot decide what is right, and ask another question to complete the idea of an answer.

Quote:
Originally Posted by Firerat View Post
easier with amd gpu ( I think )
I gave up with my Nvidia card

but my laptop worked ok ( AMD video )
(...)

Quote:
Originally Posted by Firerat View Post
but I still see no clear goal with this VM of yours
That is because there is no clear goal. I just exemplified a few possibilities with i will hardly use; other possibility is to create similar systems to what i use, to test similar setups. With this thread, I only want to know which kind of tool would be best fitted to my computer. If there is no answer for that, unless i have a clear and very specific goal to the VM use, just say that, possibly enumerating the useful cases - that would, for sure, walk toward closing the thread.
 
Old 09-23-2019, 07:40 AM   #14
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
https://en.wikipedia.org/wiki/Xen

can't offer solutions when there is no goal

just play with them all so you know pro and cons of each for when you do have a goal.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "No KVM, No qemu-kvm" Available error while trying to install KVM on CentOS 6.3 sriramdas Linux - Virtualization and Cloud 5 01-01-2013 10:46 AM
KVM on Redhat 5.7: KVM can ping outside network, outside network can't ping KVM svandyk Linux - Networking 1 09-23-2011 06:45 AM
[Debian/Qemu/KVM] Why qemu --enable-kvm works but not kvm directly? gb2312 Linux - Virtualization and Cloud 2 03-21-2011 02:05 PM
LXer: One way to migrate Xen virtual machines to KVM in Debian LXer Syndicated Linux News 0 11-19-2010 10:42 AM
Virtual machines running their own KVM's bill.loney Linux - Newbie 2 05-01-2009 03:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration