Configurando container no OpenVZ 7 como Servidor de Aplicação do LTSP-Cluster


# Configurando container no OpenVZ 7 como
# Servidor de Aplicação do LTSP-Cluster

# Listando Templates OS EZ para Containers
vzpkg list -O

# Criando Container:
prlctl create CT2 --vmtype ct --ostemplate ubuntu-14.04-x86_64

# Listing Virtual Machines and Containers 
prlctl list -a

# Configuring Main VSwap Parameters
prlctl set CT2 --memsize 12G --swappages 6G

# Increasing Disk Capacity
prl_disk_tool resize --hdd \
/vz/private/d9068bc5-085f-47b0-87d3-f82574575eaa/root.hdd --size 30G

# Listing Virtual Networks
prlsrvctl net list

# Creating Virtual Networks
prlsrvctl net add Bridged

# Configuring Virtual Network Parameters
prlsrvctl net set Bridged -t bridged --ifname eno1 \
-d "This is now a bridged virtual network"

# Connecting Virtual Networks to Adapters
prlsrvctl net set Bridged -i eno1

# Creating and Deleting veth Network Adapters
prlctl set CT2 --netif_add netif2

# Configuring veth Adapter Parameters
prlctl set CT2 --ifname netif2 --ipadd 10.6.0.219/22
prlctl set CT2 --ifname netif2 --dhcp no
prlctl set CT2 --ifname netif2 --nameserver 10.6.0.98,192.168.1.4
prlctl set CT2 --ifname netif2 --gw 10.6.0.1

# Connecting Containers to Virtual Networks
prlctl set CT2 --ifname netif2 --network Bridged

# Container tunig
# You need to make a character device named /dev/fuse 
# and grant your container permissions to it 
vzctl set CT2 --devnodes fuse:rw --save

# Configurando servidor de aplicação do LTSP-Cluster no
# container CT2 previamente criado
prlctl enter CT2
apt-get update
apt-get upgrade
apt-get install ubuntu-gnome-desktop ltsp-server \
ltsp-cluster-lbagent ltsp-cluster-accountmanager
apt-get install gnome-session-flashback ltspfs
apt-get remove --purge gnome-screensaver compiz
apt-get autoremove && apt-get autoclean
update-rc.d -f nbd-server remove
update-rc.d -f gdm remove
update-rc.d -f bluetooth remove
update-rc.d -f pulseaudio remove
chown root.fuse /dev/fuse
chmod 660 /dev/fuse
mkdir -p /home/ltsp-cluster-accountmanager

vim /etc/ltsp/accountmanager.conf
# Início d conteúdo do arquivo
# /etc/ltsp/accountmanager.conf
port=8001
autologin_root=/home/ltsp-cluster-accountmanager/
autologin_uidmin=1003000
autologin_uidmax=1003100
autologin_groups=autologin,fuse,audio,video
key=PUT-A-KEY-HERE
# Final do conteúdo do arquivo
# /etc/xdg/autostart/pulseaudio-module-suspend-on-idle.desktop

service ltsp-cluster-accountmanager restart

vim /etc/xdg/autostart/pulseaudio-module-suspend-on-idle.desktop
# Início do conteúdo do arquivo
# /etc/xdg/autostart/pulseaudio-module-suspend-on-idle.desktop
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=PulseAudio Session Management
Comment=Load module-suspend-on-idle into PulseAudio
Exec=pactl load-module module-suspend-on-idle
Terminal=false
Type=Application
Categories=
GenericName=
# Final do conteúdo do arquivo
# /etc/xdg/autostart/pulseaudio-module-suspend-on-idle.desktop

Leave a Reply

Your email address will not be published.