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
prlctl set CT2 --ifname netif2 --dhcp no
prlctl set CT2 --ifname netif2 --nameserver,
prlctl set CT2 --ifname netif2 --gw

# 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
# 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]
Name=PulseAudio Session Management
Comment=Load module-suspend-on-idle into PulseAudio
Exec=pactl load-module module-suspend-on-idle
# 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. Required fields are marked *