About-virtualization-simple: Difference between revisions
(create page) |
m (add verified) |
||
| (8 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Verified|1}} | |||
== What is virtualization == | |||
[https://en.wikipedia.org/wiki/Virtualization Virtualization] is software/emulated or shared version of running hardware. | |||
One can emulate various hardware combination, boot it from within your running OS, | |||
and install supported guest OS and software on it. | |||
Above is a short description, this is a vast area to explore, see some resource links below. | |||
This page and some more in [[#Using_virtualization_(simple) | '''section simple''']] should get you started. | |||
== Types of virtualization == | |||
* Aside from providing general virtualization tools/utilities packages, Alpine Linux supports virtualization extensively. See its download area exclusively for different platform it supports, [https://cdn.alpinelinux.org/v3.22/releases/cloud/ i.e. Cloud Images] | |||
* Scope of this page is to get you started with basic virtualization, using general available hardware(see, [[#Test_bed | ''Test Bed'']]), for more see some [[#Resources | resource]] links below. | |||
== Does my system/device support virtualization? == | |||
* Meaning, if your system/device provides some features to accelerate/enhance virtualization at hardware level. | |||
{{Pill||TODO|goldenrod|yellow}} | |||
* Add here bios screen-shots of some different brands. | |||
{{Tip|Making changes to your bios should be considered '''advanced''', | |||
approach it with '''CAUTION''' or ask your hardware vendor to enable it first for you.}} | |||
<pre> | |||
# cat /proc/cpuinfo | grep -io vmx | head -n1 | |||
vmx | |||
</pre> | |||
== Setup walkthrough == | == Setup walkthrough == | ||
Basic check/setup to prep your system for virtualization usage. | |||
=== Objective === | |||
# Install Alpine Linux. | |||
# Verify if virtualization is enabled in bios. | |||
# Enable/verify availability of <code>/dev/kvm</code>. | |||
# Enable/verify correctly loading of ''kernel virtualization modules'' for usage. | |||
=== Test bed === | |||
{{Pill||WIP|goldenrod|yellow}} | {{Pill||WIP|goldenrod|yellow}} | ||
* Describe here the test bed/setup used to run the scripts/commands below. | |||
# MODEL: Dell Laptop. | |||
# CPU: Intel i5 3rd/4th generation with virtualization enabled. | |||
# RAM: 8GB | |||
==== Install Alpine Linux ==== | |||
# Diskless installs (Ram based) | |||
# SYS installs | |||
{{tip| - For further setup to work correctly, its assumed that Alpine Linux installed in, done for version between ''v3.21.x and v3.22.x''}} | |||
{{Pill||v3.21.x-v3.22.x|cadetblue|lightblue}} | {{Pill||v3.21.x-v3.22.x|cadetblue|lightblue}} | ||
==== Manually fixing/ | ==== Manually fixing/enabling system level kvm modules (as root) ==== | ||
<pre> | <pre> | ||
# ls -l /dev/kvm | # ls -l /dev/kvm | ||
crw-rw- | |||
crw-rw---- 1 root kvm 10, 232 Sep 21 03:47 /dev/kvm | |||
</pre> | </pre> | ||
This means your devices' virtualization feature is enabled in bios. | This means your devices' virtualization feature is enabled in bios. | ||
* Does this mean if <code>/dev/kvm</code> is not available running ''virtual machines'' is not possible? | |||
** No, most likely you can still run ''virtual machines'', but may have some reduced performance or features. | |||
Now, lets find your CPU brand/type. | |||
<pre> | <pre> | ||
# cat /proc/cpuinfo | grep -E 'model name|Processor' | # cat /proc/cpuinfo | grep -E 'model name|Processor' | ||
| Line 50: | Line 98: | ||
</pre> | </pre> | ||
CPU specific kernel modules | CPU specific kernel modules are now loaded. | ||
== See also == | |||
=== Using virtualization (simple) === | |||
{{Pill|New:|Walkthroughs|goldenrod|beige}} | |||
* [[Simple_Walkthrough]] | |||
** [[LXC_Alpinelinux_Simple]] | |||
** [[Qemu-simple]] | |||
=== Using virtualization (advanced) === | |||
* QEMU | * QEMU | ||
** [[ | ** [[QEMU]] | ||
== Resources == | |||
# https://cdn.alpinelinux.org/v3.22/releases/cloud/ | |||
# https://wiki.alpinelinux.org/wiki/KVM | |||
# https://www.linux-kvm.org/page/Main_Page | |||
# https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine | |||
# https://en.wikipedia.org/wiki/Libvirt | |||
# https://en.wikipedia.org/wiki/X86_virtualization#Intel_virtualization_(VT-x) | |||
# https://en.wikipedia.org/wiki/Virtualization | |||
Latest revision as of 08:36, 21 October 2025
What is virtualization
Virtualization is software/emulated or shared version of running hardware. One can emulate various hardware combination, boot it from within your running OS, and install supported guest OS and software on it.
Above is a short description, this is a vast area to explore, see some resource links below.
This page and some more in section simple should get you started.
Types of virtualization
- Aside from providing general virtualization tools/utilities packages, Alpine Linux supports virtualization extensively. See its download area exclusively for different platform it supports, i.e. Cloud Images
- Scope of this page is to get you started with basic virtualization, using general available hardware(see, Test Bed), for more see some resource links below.
Does my system/device support virtualization?
- Meaning, if your system/device provides some features to accelerate/enhance virtualization at hardware level.
TODO
- Add here bios screen-shots of some different brands.
# cat /proc/cpuinfo | grep -io vmx | head -n1 vmx
Setup walkthrough
Basic check/setup to prep your system for virtualization usage.
Objective
- Install Alpine Linux.
- Verify if virtualization is enabled in bios.
- Enable/verify availability of
/dev/kvm. - Enable/verify correctly loading of kernel virtualization modules for usage.
Test bed
WIP
- Describe here the test bed/setup used to run the scripts/commands below.
- MODEL: Dell Laptop.
- CPU: Intel i5 3rd/4th generation with virtualization enabled.
- RAM: 8GB
Install Alpine Linux
- Diskless installs (Ram based)
- SYS installs
v3.21.x-v3.22.x
Manually fixing/enabling system level kvm modules (as root)
# ls -l /dev/kvm crw-rw---- 1 root kvm 10, 232 Sep 21 03:47 /dev/kvm
This means your devices' virtualization feature is enabled in bios.
- Does this mean if
/dev/kvmis not available running virtual machines is not possible?- No, most likely you can still run virtual machines, but may have some reduced performance or features.
Now, lets find your CPU brand/type.
# cat /proc/cpuinfo | grep -E 'model name|Processor' model name : Intel(R) Core(TM) i5-3340M CPU @ 2.70GHz ...
Cpu is INTEL.
Lets load kvm module.
# modprobe kvm
Lets check current kvm modules already loaded.
# lsmod | grep kvm kvm 1392640 0 irqbypass 12288 1 kvm
If this does not show/load CPU specific kernel modules yet.
Lets load it.
# modprobe kvm_intel # for INTEL cpu
# modprobe kvm_amd # for AMD cpu
# lsmod | grep kvm kvm_intel 409600 3 kvm 1392640 2 kvm_intel irqbypass 12288 1 kvm
CPU specific kernel modules are now loaded.
See also
Using virtualization (simple)
New: Walkthroughs
Using virtualization (advanced)
- QEMU
Resources
- https://cdn.alpinelinux.org/v3.22/releases/cloud/
- https://wiki.alpinelinux.org/wiki/KVM
- https://www.linux-kvm.org/page/Main_Page
- https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine
- https://en.wikipedia.org/wiki/Libvirt
- https://en.wikipedia.org/wiki/X86_virtualization#Intel_virtualization_(VT-x)
- https://en.wikipedia.org/wiki/Virtualization
