ha proxmox
DESCRIPTION
Setting an HA environment with ProxmoxTRANSCRIPT
-
wo
rksh
op
21.0
5.2
014
/ 1
3.4
0h
/ C
lass
roo
mS07
CENTRE INTEGRAT PBLICDE FORMACI PROFESSIONAL
Departamento de
Informtica y Comunicaciones
CIPFP AUSIS MARCH
Bare-Metal
Hypervisors and
High AvailabilitySystems
J o s R a m n R u i z
-
Ind
ex
Workshop goals
Type I (bare-metal) hypervisors
An example: Proxmox
Beyond virtualization
Maintenance tasks: MV migration
Setting up a HA environment
Bare-metal Hypervisors & High Availability Systems 2
-
Wo
rksh
op
go
als
To know how the productionsystems (really) work
Bare-metal Hypervisors & High Availability Systems 3
-
Wo
rksh
op
go
als
To know how the productionsystems (really) work
To know and implement theproduction virtualization: type I (or
bare-metal)
Bare-metal Hypervisors & High Availability Systems 4
-
Wo
rksh
op
go
als
To know how the productionsystems (really) work
To know and implement theproduction virtualization: type I (or
bare-metal)
To know a good (and free) virtualization platform: Proxmox
Bare-metal Hypervisors & High Availability Systems 5
-
Wo
rksh
op
go
als
To know how the productionsystems (really) work
To know and implement theproduction virtualization: type I (or
bare-metal)
To know a good (and free) virtualization platform: Proxmox
To test this platform setting up anapproach to a production
environment
Bare-metal Hypervisors & High Availability Systems 6
-
Wo
rksh
op
go
als
Why?
Bare-metal Hypervisors & High Availability Systems 7
-
Wo
rksh
op
go
als
Why? In my opinion most of us have
never worked with this kind of
systems
Bare-metal Hypervisors & High Availability Systems 8
-
Wo
rksh
op
go
als
Why? In my opinion most of us have
never worked with this kind of
systems
It is important to know how they work in order to provide a valid
systems view to our pupils
Bare-metal Hypervisors & High Availability Systems 9
-
Wo
rksh
op
go
als
Why? In my opinion most of us have
never worked with this kind of
systems
It is important to know how they work in order to provide a valid
systems view to our pupils
It would be an interesting end-of-year project shared between
different subjects
Bare-metal Hypervisors & High Availability Systems 10
-
Type I (bare-metal) hypervisors
Bare-metal Hypervisors & High Availability Systems 11
-
Typ
eI (b
are
-me
tal)
hyp
erv
iso
rs Type I hypervisors structure
Bare-metal Hypervisors & High Availability Systems 12
HARDWARE
HYPERVISOR (really OS+hypervisor)
OS 1 OS 2 OS N
-
Typ
eI (b
are
-me
tal)
hyp
erv
iso
rs Advantages
Performance
Behaviour (less points of failure)
Production structures allowed
Weak points
Non-obvious configuration
Dedicated server (of course)
Bare-metal Hypervisors & High Availability Systems 13
-
Typ
eI (b
are
-me
tal)
hyp
erv
iso
rs Main examples
VMWare ESXi Difficult to configure
Expensive licenses
Proxmox Good balance performance/effort
Free
Microsoft Hyper-V Poor performance
Easy configuration
Parallels Server Bare Metal
Xen Server
Bare-metal Hypervisors & High Availability Systems 14
-
Proxmox
Bare-metal Hypervisors & High Availability Systems 15
-
Pro
xm
ox OS:
Debian
Virtualization platform:
KVM+Containers
Graphical remote access:
Java required
Bare-metal Hypervisors & High Availability Systems 16
-
Pro
xm
ox.
In
sta
llatio
n Downloaded from www.proxmox.org
Bare-metal Hypervisors & High Availability Systems 17
-
Inst
alla
tio
n.
Ke
y s
cre
en
s
Bare-metal Hypervisors & High Availability Systems 18
e.g. ausiasHA
-
Inst
alla
tio
n.
Ke
y s
cre
en
s
Bare-metal Hypervisors & High Availability Systems 19
-
Aft
er
Inst
alla
tio
n.
We
b A
cc
ess
Bare-metal Hypervisors & High Availability Systems 20
-
No
de
1
Bare-metal Hypervisors & High Availability Systems 21
-
Our first VM
Bare-metal Hypervisors & High Availability Systems 22
-
Ou
rFirst
VM
Structure
Bare-metal Hypervisors & High Availability Systems 23
VM1 VM2 VMn
-
Ou
rfirs
tV
M. U
plo
ad
an
ISO
Bare-metal Hypervisors & High Availability Systems 24
-
Ou
rfirs
tV
M. Se
ttin
gs
Bare-metal Hypervisors & High Availability Systems 25
-
Ou
rfirs
tV
M. Se
ttin
gs
Bare-metal Hypervisors & High Availability Systems 26
-
Ou
rfirs
tV
M. Se
ttin
gs
Bare-metal Hypervisors & High Availability Systems 27
-
Bare-metal Hypervisors & High Availability Systems 28Ou
rfirs
tV
M. Se
ttin
gs
-
Ou
rfirs
tV
M. Se
ttin
gs
Bare-metal Hypervisors & High Availability Systems 29
-
Ou
rfirs
tV
M
Bare-metal Hypervisors & High Availability Systems 30
-
Ou
rfirs
tV
M. C
on
sole
Bare-metal Hypervisors & High Availability Systems 31
-
Our first CT
Bare-metal Hypervisors & High Availability Systems 32
-
Ou
rfirs
tC
T What is a CT?
OpenVZ Container
Instead of trying to run an entire guest OS, container
virtualization isolates the guests,
It doesn't try to virtualize the hardware.
Recommended for running GNU/Linux
Fastest approach
Bare-metal Hypervisors & High Availability Systems 33
-
Ou
rfirs
tC
T
Bare-metal Hypervisors & High Availability Systems 34
-
Ou
rfirs
tC
T
Bare-metal Hypervisors & High Availability Systems 35
-
Ou
rfirs
tV
M. D
ow
nlo
ad
Bare-metal Hypervisors & High Availability Systems 36
-
Ou
rFrist
CT.
Se
ttin
gs
Bare-metal Hypervisors & High Availability Systems 37
-
Ou
rFrist
CT.
Se
ttin
gs
Bare-metal Hypervisors & High Availability Systems 38
-
Ou
rFrist
CT.
Se
ttin
gs
Bare-metal Hypervisors & High Availability Systems 39
-
Ou
rFrist
CT.
Se
ttin
gs
Bare-metal Hypervisors & High Availability Systems 40
-
Ou
rFrist
CT
Bare-metal Hypervisors & High Availability Systems 41
-
Sta
tist
ics
Bare-metal Hypervisors & High Availability Systems 42
-
Ou
rfirs
tC
T. W
ork
ing
Bare-metal Hypervisors & High Availability Systems 43
-
Our first cluster
Bare-metal Hypervisors & High Availability Systems 44
-
Let
sc
rea
tea
clu
ste
r Update packages
In each node:
aptitude update && aptitude full-upgrade
Create a cluster
Master node: pvecm create NameCluster
Node2: pvecm add IPMaster
Node3: pvecm add IPMaster
Bare-metal Hypervisors & High Availability Systems 45
-
Ou
rfirs
tc
lust
er
Structure
Bare-metal Hypervisors & High Availability Systems 46
-
Ou
rfirs
tc
lust
er
Bare-metal Hypervisors & High Availability Systems 47
-
CT
Mig
ratio
n
Bare-metal Hypervisors & High Availability Systems 48
-
CT
Mig
ratio
np
roc
ess
Bare-metal Hypervisors & High Availability Systems 49
-
CT
Mig
ratio
n
Bare-metal Hypervisors & High Availability Systems 50
Hot migration: it keeps working
-
CT
Mig
ratio
n This is not HA
Too much meatware
HA automates the process
Bare-metal Hypervisors & High Availability Systems 51
-
Our first HA cluster
Bare-metal Hypervisors & High Availability Systems 52
-
Ou
rfirs
tH
A c
lust
er
Structure
Bare-metal Hypervisors & High Availability Systems 53
HA cluster
Network Shared storage
Management device
-
Ou
rfirs
tH
A c
lust
er
Structure
Bare-metal Hypervisors & High Availability Systems 54
HA cluster
Network Shared storage
Management device
There are several critical points
-
Imp
lem
en
tin
gH
A Before starting
Remove any previous VM
Add the NAS to the cluster
Bare-metal Hypervisors & High Availability Systems 55
-
Ad
din
gth
eN
AS
Bare-metal Hypervisors & High Availability Systems 56
-
Ad
din
gth
eN
AS
Bare-metal Hypervisors & High Availability Systems 57
-
Fe
nc
ing Fencing?
Bare-metal Hypervisors & High Availability Systems 58
-
Fe
nc
ing Fencing
Bare-metal Hypervisors & High Availability Systems 59
-
Fe
nc
ing If a node does not respond
after a given time-threshold
non-operational
Two types of fencing
Disabling a node itself,
Disallowing access to resources such as shared disks
Bare-metal Hypervisors & High Availability Systems 60
-
Fe
nc
ing If a node does not respond
after a given time-threshold
non-operational
Two types of fencing
Disabling a node itself
Disallowing access to resources such as shared disks
Bare-metal Hypervisors & High Availability Systems 61
STONITH
Resource Fencing
-
Fe
nc
ing In every node:
nano /etc/default/redhat-cluster-pve
Uncomment the lineFENCE_JOIN="yes"
Join the fencing domainfence_tool join
Bare-metal Hypervisors & High Availability Systems 62
-
Fe
nc
ing
. O
nly
in t
he
Ma
ste
rcp /etc/pve/cluster.conf /etc/pve/cluster.conf.new
nano /etc/pve/cluster.conf.new
Increase the version number
Validate the configurationccs_config_validate -v -f /etc/pve/cluster.conf.new
Bare-metal Hypervisors & High Availability Systems 63
-
Fe
nc
ing
. A
ctiva
te
Bare-metal Hypervisors & High Availability Systems 64
-
HA
ma
na
ge
dC
T
Bare-metal Hypervisors & High Availability Systems 65
-
HA
ma
na
ge
dC
T
Bare-metal Hypervisors & High Availability Systems 66
-
HA
ma
na
ge
dC
T
Bare-metal Hypervisors & High Availability Systems 67
-
HA
ma
na
ge
dC
T
Bare-metal Hypervisors & High Availability Systems 68
-
HA
ma
na
ge
dC
T In each node:
/etc/init.d/rgmanager start
Bare-metal Hypervisors & High Availability Systems 69
-
HA
ma
na
ge
dC
T Fencing devices
Managed switches
PS switches
Manual fencing
Scripting+pseudo manual fencing
Bare-metal Hypervisors & High Availability Systems 70
-
HA
ma
na
ge
dC
T Fencing devices
Managed switches
PS switches
Manual fencing
Scripting+pseudo manual fencing
Bare-metal Hypervisors & High Availability Systems 71
-
/etc
/pve
/clu
ste
r.c
on
f.n
ew
-
/etc
/pve
/clu
ste
r.c
on
f.n
ew
-
Do
es
itw
ork
? Start VM 100 in node1
Poweroff node 1 (or disablethe network)
Go to node2 or node3
Manual fencing: fence_ack_manual node1
Confirm with: absolutely
Bare-metal Hypervisors & High Availability Systems 74
-
Do
es
itw
ork
?
Bare-metal Hypervisors & High Availability Systems 75
-
Thanks for your attendance
Questions?
Slides available on:
http://bit.ly/JRRuiz-HA
Bare-metal Hypervisors & High Availability Systems 76