small update

autoautoinstall
Andrew Wang 1 year ago
parent ea46afcb00
commit f4f973327c
  1. 22
      libvirt/README.md
  2. 6
      libvirt/main.yml
  3. 26
      roles/README.md
  4. 2
      roles/ftp/tasks/main.yml

@ -1,13 +1,19 @@
then service libvirtd restart
adduser <youruser> libvirt
adduser -aG <youruser> libvirt
To create the vm run the command
## Installation
```
ansible-playbook main.yml
ansible-playbook libvirt/main.yml
```
Then connect to the created vm using virt-viewer
```
virt-viewer --domain-name mirror
```
If vm is on a remote machine
```
virt-viewer --connect qemu+ssh://user@X.X.X.X/system mirror
```
## TODO
for now just have a folder of screenshots
- change name of lvm volume from "lv0-root" to just "root"
troubleshooting: ignore "failed to unmount /cdrom" and just ctrl+c in viewer
## Troubleshooting
```
net.ipv4.ip_forward = 1 ?

@ -23,7 +23,7 @@
- name: create directory for vm
file:
path: "{{ playbook_dir }}/vm/disks"
path: "{{ playbook_dir }}/vm"
state: directory
recurse: yes
@ -66,7 +66,7 @@
- name: create storage pool
command: "virsh {{ item }}"
loop:
- pool-define-as mirror dir --target="{{ playbook_dir }}/vm/disks"
- pool-define-as mirror dir --target="{{ playbook_dir }}/vm"
- pool-build mirror
- pool-autostart mirror
- pool-start mirror
@ -76,7 +76,7 @@
- name: create virtual disks
command:
cmd: "virsh vol-create-as mirror {{ item.name }} {{ item.size }}"
creates: "{{ playbook_dir }}/vm/disks/{{ item.name }}"
creates: "{{ playbook_dir }}/vm/{{ item.name }}"
loop:
- { name: mirror_root1.qcow2, size: 10G }
- { name: mirror_root2.qcow2, size: 10G }

@ -5,29 +5,3 @@
- add directory_mode to set directory permission
- double check src and dest behaviour with trailing /
- could check that copy works like rsync
## other info
troubleshooting: try to load the kvm module with `modprobe kvm_intel`
interface should automatically come up but can also use
$ virt-viewer --domain-name mirror
if vm is on a remote machine
$ virt-viewer --connect qemu+ssh://user@host.example.com/system vmnamehere
for now just have a folder of screenshots
- change name of lvm volume from "lv0-root" to just "root"
troubleshooting: ignore "failed to unmount /cdrom" and just ctrl+c in viewer
login into your created user (from install), change to root, and create password for root
$ sudo su
type in your password
$ passwd
create root password
may already be mounted but just to be sure
$ zfs mount -a
- mirror hosts
- http://mirror.csclub.uwaterloo.ca (the mirror)
- http://ca.releases.ubuntu.com (ubuntu releases)
- http://ca.ceph.com (ceph releases)
- http://debian.csclub.uwaterloo.ca (csclub's debian packages)

@ -30,7 +30,7 @@
mode: "{{ item.mode }}"
loop:
- { src: blacklist.dat, dest: blacklist.dat, mode: "644" }
- { src: dhparams.pem, dest: dhparams.pem, mode: "644" }
# - { src: dhparams.pem, dest: dhparams.pem, mode: "644" }
- { src: ldap.conf, dest: ldap.conf, mode: "600" }
- { src: modules.conf, dest: modules.conf, mode: "644" }
- { src: proftpd.conf, dest: proftpd.conf, mode: "644" }

Loading…
Cancel
Save