Mahyar Samani has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/51615 )

Change subject: misc: Adding documentation on how to setup KVM.
......................................................................

misc: Adding documentation on how to setup KVM.

This change adds doumentation on how to setup KVM.

Change-Id: Ie3bb47b0f9c00e040ba9425018b5659a421fb1a0
---
A INSTALLING-KVM.md
1 file changed, 66 insertions(+), 0 deletions(-)



diff --git a/INSTALLING-KVM.md b/INSTALLING-KVM.md
new file mode 100644
index 0000000..3520e19
--- /dev/null
+++ b/INSTALLING-KVM.md
@@ -0,0 +1,55 @@
+## Installing KVM
+
+In order to be able to use gem5's KVMCPU or use packer, you need to have KVM
+and QEMU installed on your host system. First, you need a processor that
+supports hardware virtualization. In order to see if your processor supports
+hardware virtualization, run the command below:
+
+```console
+$ egrep -c '(vmx|svm)' /proc/cpuinfo
+```
+
+If it returns 0, it means that your processor does not support hardware
+virtualization.
+
+If it returns 1 or more, it does. Note: You still have to make sure it is
+enabled in your bios.
+
+I tried this with my GigaByte Aorus X570 Elite motherboard (AMD AM4 socket) and
+this is how I enabled hardware virtualization for my motherboard.
+
+```console
+Tweaker->Advanced CPU Settings->SVM Mode->Enabled
+```
+
+Note: It is also recommended that you use a 64-bit kernel on your host machine. +The limitations of using a 32-bit kernel on your host machine are as follows:
+
+* You can only allocate 2GB of memory for your VMs
+* You can only create 32-bit VMs.
+
+After, in order to install kvm run the following command on terminal (tested
+with Ubuntu 20.04 but should work for 18.10 or later):
+
+```console
+$ sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
+```
+
+Note: You might also want to install virt-viewer, for viewing instances.
+
+Now add your user to the kvm and libvirt (libvirtd depending on the version of
+your Ubuntu). Run the two commands below to do this (it's been tested with
+Ubuntu 20.04 but should work for 18.04 or higher).
+
+```console
+$ sudo adduser `id -un` libvirt
+$ sudo adduser `id -un` kvm
+```
+
+After this, you need to relogin to your account. If you are using SSH,
+disconnect all your session and relogin again. Now if you run the command below
+you should see kvm and libvirt (libvirtd).
+
+```console
+$ groups
+```
\ No newline at end of file

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51615
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ie3bb47b0f9c00e040ba9425018b5659a421fb1a0
Gerrit-Change-Number: 51615
Gerrit-PatchSet: 1
Gerrit-Owner: Mahyar Samani <msam...@ucdavis.edu>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to