Trivial management of 64 bit virtual machines with qemu
This repository has been archived on 2021-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Franco Masotti 2c102aa085 Fixed typo. 2016-11-06 22:15:31 +01:00
.gitignore Added decent functions and options. Cleanup. Updated readme. 2016-11-06 22:08:59 +01:00
LICENSE Added files. 2016-10-08 18:30:05 +02:00
README.md Fixed format. 2016-11-06 22:14:36 +01:00
configvmrc Added decent functions and options. Cleanup. Updated readme. 2016-11-06 22:08:59 +01:00
qvm Fixed typo. 2016-11-06 22:15:31 +01:00

README.md

qvm

Trivial management of 64 bit virtual machines with qemu.

What this script will do

It can handle:

  • Virtual hard disk creation, backup and deletion.
  • Basic network management: two ports are exposed to the host machine (but you can add as many as you want). One of these two ports is SSH (so admin gets simpler).
  • Shared directory between host and guest.
  • Last, but not least, running the virtual machine with all these options.

Setup information and usage

  • You need a 64 bit machine.

  • Modify configvmrc based on your needs. Variables are self-explanatory and I have kept mine as an example.

      # pacman -S qemu
      $ . ./configvmrc
      $ mkdir -p "$shared_data_path"
      $ ./qvm -i
      $ ./qvm -b
    
  • Now you can run the virtual machine:

      $ ./qvm -r
    
  • On your guest machine add the following in /etc/fstab:

      host_share   /home/vm/shared    9p      trans=virtio,version=9p2000.L   0 0
    

This will enable the shared directory automatically (no mount commands of any sort).

  • You can connect to your virtual machine via SSH, using the default values:

      ssh -p 2222 <guest_user_name>@127.0.0.1
    

License

CC0.