Install KVM and Create Virtual Machines on Ubuntu

Refer to:
https://www.howtogeek.com/117635/how-to-install-kvm-and-create-virtual-machines-on-ubuntu/
Summary:

Determine whether your CPU support hardware virtualization

egrep -c '(svm|vmx)' /proc/cpuinfo 
A 0 indicates that your CPU doesn't support hardware virtualization, while a 1 or more indicates that it does. You still have to enable hardware virtualization support in your computer's BIOS, even if this command returns a 1 or more.
Otherwise you will get a warning later on:
KVM is not available. This may mean the KVM package is not installed, 
or the KVM kernel modules are not loaded. 
Your virtual machines may perform poorly. 

Install KVM

sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager 

Add user to libvirtd group

sudo adduser name libvirtd 

Create Virtual Machines via virt-manager

virt-manager 
kvm
Click the Create New Virtual Machine button on the toolbar and the Virtual Machine Manager will walk you through selecting an installation method, configuring your virtual machine's virtual hardware, and installing your guest operating system of choice.

By the way:
You can creae raw image via qemu-img.
qemu-img create -f raw ubuntu_desktop_14.04.5.img 100G
$ ls *.img -all
-rw-r--r-- 1 libvirt-qemu kvm 107374182400  4 18:06 
ubuntu_desktop_14.04.5.img

No comments:

Post a Comment

fixed: embedded-redis: Unable to run on macOS Sonoma

Issue you might see below error while trying to run embedded-redis for your testing on your macOS after you upgrade to Sonoma. java.la...