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

55 lines
1.3 KiB

6 years ago
# qvm
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:
- 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.
6 years ago
## Setup information and usage
6 years ago
- 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
6 years ago
```
- 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
```
6 years ago
### Optional step
6 years ago
- If you are not interested in using the GUI, but you only need textual interface
(i.e: SSH), you can simply add the following, along with the other options present
under `-r`:
```
-display none \
```
## License
6 years ago
CC0.