Differences

This shows you the differences between two versions of the page.

Link to this comparison view

scgc:laboratoare:05 [2020/11/11 17:20]
darius.mihai [Lab Setup]
scgc:laboratoare:05 [2021/10/27 19:18] (current)
maria.mihailescu [9. [5p] Running KVMs as an unprivileged user]
Line 1: Line 1:
-===== Laboratory 05. Native virtualization =====+===== Native virtualization =====
  
 ===== Lab Setup ===== ===== Lab Setup =====
  
-  * We will be using a virtual machine in the [[http://​cloud.curs.pub.ro/​|faculty'​s cloud]].+  * We will be using a virtual machine in the [[http://​cloud.grid.pub.ro/​|faculty'​s cloud]].
   * When creating a virtual machine follow the steps in this [[https://​cloud.curs.pub.ro/​about/​tutorial-for-students/​|tutorial]].   * When creating a virtual machine follow the steps in this [[https://​cloud.curs.pub.ro/​about/​tutorial-for-students/​|tutorial]].
   * When creating a virtual machine in the Launch Instance window:   * When creating a virtual machine in the Launch Instance window:
Line 143: Line 143:
 ==== 3. [10p] Add new resources to a KVM ==== ==== 3. [10p] Add new resources to a KVM ====
  
-usual configuration of a VM consists of 2 virtual disks: one main disk that hosts the OS and a second one that hosts the actual user data.+usual configuration of a VM consists of 2 virtual disks: one main disk that hosts the OS and a second one that hosts the actual user data.
  
 Create a new virtual disk in the ''​qcow2''​ format, with a 1G maximum size and attach it to a VM that has as a main disk the ''​base.qcow2''​ image. The virtual machine should have 256MB and 2 cpus. **Hint : -hdb**. Create a new virtual disk in the ''​qcow2''​ format, with a 1G maximum size and attach it to a VM that has as a main disk the ''​base.qcow2''​ image. The virtual machine should have 256MB and 2 cpus. **Hint : -hdb**.
Line 304: Line 304:
 For system administrators,​ a command line interface was developed called ''​virsh''​ as a front-end for libvirt. ​ For system administrators,​ a command line interface was developed called ''​virsh''​ as a front-end for libvirt. ​
  
-In order to use the facilities offered by ''​libvirt''​ we must instal ​first the following packets: ''​libvirt-bin'',​ ''​virtinst'',​ ''​virt-viewer''​ and ''​virt-top''​. Also, if we do not intend to use libvirt as ''​root'',​ the user should be added to the ''​libvirtd''​ group.+<​note>​ 
 +In order to use the facilities offered by ''​libvirt''​ we must first install ​the following packets: ''​libvirt-bin'',​ ''​virtinst'',​ ''​virt-viewer''​ and ''​virt-top''​. Also, if we do not intend to use libvirt as ''​root'',​ the user should be added to the ''​libvirtd''​ group. 
 +</​note>​
  
 As a first step, we must enable the networking service provided by ''​libvirt'':​ As a first step, we must enable the networking service provided by ''​libvirt'':​
Line 346: Line 348:
 Notice the state of the virtual machines and its ID (in this case 3). The following operations will be issued using this ID. Notice the state of the virtual machines and its ID (in this case 3). The following operations will be issued using this ID.
  
-Display the VNC port of the ''​VM1''​ guest using the ''​vncdisplay''​ command followed ​bu the VM ID:+Display the VNC port of the ''​VM1''​ guest using the ''​vncdisplay''​ command followed ​by the VM ID:
 <code bash> <code bash>
 virsh # vncdisplay 3 virsh # vncdisplay 3
Line 425: Line 427:
 ==== 9. [5p] Running KVMs as an unprivileged user ==== ==== 9. [5p] Running KVMs as an unprivileged user ====
  
-Create a new system group ''​kvm-users''​ and add the user ''​student''​ to this newly created group. Configure the system so that all the users that are in this group can start and manage KVM machines.+Create a new system group ''​kvm''​ and add the user ''​student''​ to this newly created group. Configure the system so that all the users that are in this group can start and manage KVM machines.
  
scgc/laboratoare/05.1605108049.txt.gz · Last modified: 2020/11/11 17:20 by darius.mihai
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0