Skip to content

Latest commit

 

History

History
52 lines (28 loc) · 1.68 KB

README.md

File metadata and controls

52 lines (28 loc) · 1.68 KB

Introduction

This project explores using libvirt based tools to create Virtual Machines (VMs).

Intention is to create VMs from cloud disk image provided by GNU/Linux distributions and for basic initialization use cloud-init.

Note

The project is developed on Debian 12 if you use another distribution have that in mind if something doesn't work as expected.

🦈

Requirements

  • GNU/Linux OS capable of running QEMU/KVM based VMs.

Installation and setup

QEMU and Virtual Machine Manager

Check compatibility:

grep -o 'vmx\|svm' /proc/cpuinfo # If nothing comes back check BIOS to make sure virtualization is enabled

Install and setup on Debian/Ubuntu:

sudo apt-get install virt-manager
sudo adduser <USER_NAME> libvirt # Add user to `libvirt` group
sudo adduser <USER_NAME> libvirt-qemu

Video instructions. 📽️

Cloud disk image

Download genericcloud image for Debian version you wish to use in VMs. You can also use cloud image for another distribution if you wish.

🦈 installation

Copy ./shark to your echo $PATH and set execute permission on it with:

chmod +x shark

Usage

To create VM config files, most notably Sharkfile which defines VM, in empty directory execute:

shark init

./example_vm_configuration_generated_with_init_action directory contains example of VM configuration generated with shark init command.

You must edit Sharkfile before creating VM with command:

shark up