master
Andrew Wang 1 year ago
parent 68cce1fd3a
commit 993f10e635
  1. 0
      .gitignore
  2. 49
      README.md
  3. 60
      libvirt/README.md
  4. 30
      libvirt/ubuntu/README.md
  5. 7
      roles/README.md

@ -53,54 +53,7 @@ password: ubuntu
```
## VM Install Option 2 (libvirt)
### Install Packages (debian)
Install QEMU and KVM
```
$ apt install --no-install-recommends qemu-system libvirt-clients libvirt-daemon-system virtinst
```
Install other packages for the playbook
```
$ apt install ansible cloud-image-utils dnsmasq ovmf
```
Other packages that you probably don't need
```
virtinst
virt-viewer
virt-manager
bridge-utils
```
Also will need python
### Install Packages (archlinux)
**needs update**
```
$ pacman -S qemu libvirt virt-install virt-viewer ansible
```
### Run Playbook
```
ansible-playbook libvirt/main.yml
```
First, install ansible and sshpass. Perform all the following commands in the `post-install/` directory.
Also install the extra roles
```
$ ansible-galaxy install -r requirements.yml
```
Check that ansible can talk to the vm:
```
$ ansible -m ping all
```
We can now complete the rest of the post-install with
```
$ ansible-playbook -K playbook.yml
```
## VM Install Option 3 (manual)
Follow instructions in the README.md of the libvirt directory
## System Details
Further system information for those that are interested.

@ -1,4 +1,30 @@
## Installation
### Prerequisites (debian)
Install QEMU and KVM
```
$ apt install --no-install-recommends qemu-system libvirt-clients libvirt-daemon-system
```
Install other packages for the playbook
```
$ apt install ansible cloud-image-utils dnsmasq ovmf python3
```
Packages I can't tell if you need or not
```
virtinst
virt-manager
bridge-utils
```
Then install virt-viewer to interact run through the install with
```
virt-viewer
```
### Prerequisites (archlinux)
**needs update**
```
$ pacman -S qemu libvirt virt-install virt-viewer ansible
```
### Running the Playbook
Run the playbook from one directory down
```
ansible-playbook libvirt/main.yml
```
@ -10,7 +36,7 @@ If vm is on a remote machine
```
virt-viewer --connect qemu+ssh://user@X.X.X.X/system mirror
```
## Troubleshooting
### Troubleshooting
```
net.ipv4.ip_forward = 1
```
@ -24,3 +50,35 @@ user = "root"
group = "root"
$ service restart libvirtd
```
### Installing Ubuntu
user: local
password: password
TODO: add the rest of the images
<img src="ubuntu/01-networking.png" width="200" height="150">
can just press enter for can't remove cdrom
container may stop so will need to start with
```
virsh start mirror
```
after starting check the ip address of the vm with
```
virsh net-dhcp-leases mirbr0
```
and ssh
```
ssh local@192.168.123.XXX
```
in the machine switch to root and update before installing some packages and cloning the repo
```
$ sudo su
$ cd
$ apt update && apt upgrade
$ apt install git ansible
$ git clone https://git.csclub.uwaterloo.ca/public/mirror-env.git
```
then enter `mirror-env/mirror` and use the instructions listed there

@ -1,30 +0,0 @@
user: local
password: password
TODO: add images
<img src="./01-networking.png" width="200" height="150">
can just press enter for can't remove cdrom
container may stop so will need to start with
```
virsh start mirror
```
after starting check the ip address of the vm with
```
virsh net-dhcp-leases mirbr0
```
and ssh
```
ssh local@192.168.123.XXX
```
in the machine switch to root and update before installing some packages and cloning the repo
```
$ sudo su
$ cd
$ apt update && apt upgrade
$ apt install git ansible
$ git clone https://git.csclub.uwaterloo.ca/public/mirror-env.git
```
then enter `mirror-env/mirror` and use the instructions listed there

@ -1,7 +0,0 @@
## to update
- hosts + ansible.cfg
- group_vars
- quote the file mode (0777 -> '0777')
- add directory_mode to set directory permission
- double check src and dest behaviour with trailing /
- could check that copy works like rsync
Loading…
Cancel
Save