summaryrefslogtreecommitdiff
path: root/virtual_host_server.mdwn
blob: 4fccfc520fc3c8ac047c5d6d255b840b988427cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
[[!meta title="Virtual Host Server"]]
[[!meta author="Kyllikki"]]
[[!meta date="2017-09-06T11:57:28Z"]]


[[!toc]] The system providing the
virtual host services for the NetSurf project is currently named phoenix.

Access is \*only\* via the NetSurf VPN. For VPN access contact vince@netsurf-browser.org Developers can also use their ssh key access to ci.netsurf-browser.org and on from there

phoenix IP address is currently 192.168.211.50 if the DNS is unavailable

Creating a new VPS
------------------

Become superuser with sudo

### Debian

If you are creating a new Debian box there is a helper script (new-stretch-vps.sh ) which just just need to pass a system name to and you will get a 40G disc/ 512MB RAM system.

for example:

    new-stretch-vps.sh ciworker19

will create a system named ciworker19 with 40G of disc and 512MB of
memory with the Debian stretch boot iso connected to the cdrom drive.

The bridge interface MAC address should be edited to something like 0e:00:00:00:01:xx

    virsh edit ${VDSNAME}


### Fedora

create lvm device for the system

    lvcreate --size 40G -n ${VDSNAME} vg

Ensure the OS install dvd is in /var/lib/libvirt/images/

Create the virtual machine

    virt-install -n ${VDSNAME} -r 1024 \
    --disk path=/dev/mapper/vg-${VDSNAME},bus=virtio \
    --accelerate \
    --network=bridge:br0 \
    --connect=qemu:///system \
    --noautoconsole -v \
    --nographics \
    --os-type=linux \
    --location /var/lib/libvirt/images/Fedora-Server-dvd-x86_64-26-1.5.iso \
    --extra-args='console=tty0 console=ttyS0,115200n8 serial'

The bridge interface MAC address should be edited to something like 0e:00:00:00:01:xx

    virsh edit ${VDSNAME}

Once running the serial console can be used

    virsh console ${VDSNAME}


### Other

The manual setup for other systems is:

create lvm device for the system

    lvcreate --size 40G -n ${VDSNAME} vg

if the OS requires a cdrom install media download and place in
/var/lib/libvirt/images/

use virt install to create the new VM substitutig appropriate values
for volume name, memory, boot disc

    virt-install -n ${VDSNAME} -r 512 \
    --disk path=/dev/mapper/vg-${VDSNAME},bus=virtio \  
    -c /var/lib/libvirt/images/cd54.iso \
    --accelerate --network=bridge:br0 \
    --connect=qemu:///system \
    --vnc --noautoconsole -v

Admin
-----

You can either use virsh on phoenix to directly admin consoles or
alternatively use virt-admin over the VPN which is by far the easier
option.