frnmst-archives
/
qvm
Archived
1
0
Fork 0
Trivial management of 64 bit virtual machines with qemu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
qvm/README.md

82 lines
2.4 KiB

6 years ago
# qvm
6 years ago
Trivial management of 64 bit virtual machines with qemu.
6 years ago
6 years ago
## What this script will do
6 years ago
It can handle:
6 years ago
- 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).
- Connection via SSH.
6 years ago
- Shared directory between host and guest.
- Last, but not least, running the virtual machine with all
these options.
6 years ago
## Setup information and usage
- You need a 64 bit machine with virtualization technology and more than 4 GB
of RAM.
6 years ago
- Modify `configvmrc` based on your needs.
Variables are self-explanatory and I have kept mine
as an example.
- Install qemu:
6 years ago
# pacman -S qemu
- Create a new VHD and complete the OS installation:
$ ./qvm -c
6 years ago
$ ./qvm -i
- Optionally enable SSHD on the guest machine.
- Optionally create a new backup VHD:
$ ./qvm -b
6 years ago
- Now you can run the virtual machine either using the original or the backup
VHD. By deault if you run `./qvm` the virtual machine will run in graphics
mode using the backup hard disk.
- Optionally add the following in the gues machine's `/etc/fstab`, to enable
the shared directory automatically (no mount commands of any
sort).
6 years ago
host_share /home/vm/shared 9p trans=virtio,version=9p2000.L 0 0
## Help
Usage: qvm [OPTION]
Trivial management of 64 bit virtual machines with qemu.
Options:
-a, --attach connect via SSH
-b, --backup backup vhd
-c, --create create new vhd
-d, --delete delete vhd backup
--delete-orig delete original vhd
-h, --help print this help
-i, --install install img on vhd
-n, --run-nox run vm without opening a graphical window
(useful for background jobs like SSH)
--run-nox-orig run-orig and run-nox combined
-s, --mkdir-shared create shared directory
-x, --run run vm
--run-orig run from original vhd
Only a single option is accepted.
By default, the backup vhd is run.
CC0
Written in 2016 by Franco Masotti/frnmst <franco.masotti@student.unife.it>
6 years ago
6 years ago
## License
6 years ago
CC0.