SlideShare a Scribd company logo
1 of 36
Download to read offline
Asterisk Xenified
Saúl Ibarra Corretgé <saghul@gmail.com>

              http://www.saghul.net

              http://www.sipdoc.net

              saghul



                    http://www.irontec.com
AstriCon 2009: Asterisk Xenified

                                                                 About me




●   saghul
    –   VoIP enthusiast, playing around with Asterisk since 2k5
    –   GNU/Linux lover likes everything “Software Libre”
    –   Co-founder of http://sipdoc.net
    –   Highly involved in spanish VoIP comunities




                                                                               2
AstriCon 2009: Asterisk Xenified

                                           The presentation




http://www.saghul.net/blog/downloads/astricon2k9/
         http://www.slideshare.net/saghul/




                                                                  3
AstriCon 2009: Asterisk Xenified

                                                                Index

1.   Introduction to virtualization
2.   Xen
3.   Why use virtualization?
4.   Xenifying Asterisk
5.   Tips and tricks




                                                                         4
Introduction to virtualization
AstriCon 2009: Asterisk Xenified

                                          Introduction to virtualization

●   Virtualization
       –   The ability to use a single physical computer to run several
             “simulated” computers


●   Why would we use it?
       –   Testing / production environments
       –   Cost reduction
       –   Different testing scenarios




                                                                               6
AstriCon 2009: Asterisk Xenified

                                               Virtualization types

Performance is virtualization's Achilles Heel and depends
mainly in the type of virtualization used.

Isolation between host and guests its also very important,
usually: +isolation → -performance

●   Emulation
●   Full virtualization
●   Paravirtualization
●   OS level virtualization



                                                                         7
AstriCon 2009: Asterisk Xenified

                                             Virtualization types (I)

Emulation

●   Entire hardware is simulated (no access to real hardware)
●   Guests are unmodified
●   Different architectures can be virtualized
●   Poor performance
●   Ex. Bochs.




                                                                          8
AstriCon 2009: Asterisk Xenified

                                           Virtualization types (II)

Full virtualization

●   Similar to emulation
●   Some instructions are run on the raw hardware (Intel VT or
    AMD V is needed)
●   Host and guests have to be the same architecture
●   Guest OS runs unmodified
●   Often used instead of paravirtualization, when guest OS is
    distributed in binary form (e.g. Windows)
●   Better performance than emulation
●   Ex. KVM, VirtualBox.


                                                                         9
AstriCon 2009: Asterisk Xenified

                                          Virtualization types (III)

Paravirtualization

●   Guest OS is modified so that it communicates whith the
    real hardware
●   Applications run unmodified
●   Host and guests have to be the same architecture
●   Better performance than Full virtualization
●   Ex. Xen.




                                                                     10
AstriCon 2009: Asterisk Xenified

                                        Virtualization types (IV)

OS level virtualization

●   Guests share resources with the host system
●   Weak isolation
●   Host performance can be compromised by guests
●   Guests are not really full-featured systems
●   Ex. OpenVZ.




                                                                   11
AstriCon 2009: Asterisk Xenified

                                                             What is Xen

●   neXt gENeration virtualization.
●   Open Source
●   Supports Paravirtualization AND Full Virtualization.
●   Runs on commodity hardware.
●   Packaged for many distros.
●   Cool features:
      –   PV and Full Virtualization support.
      –   PCI passthrough
      –   Live migration




                                                                          13
AstriCon 2009: Asterisk Xenified

            Xen Architecture




                               14
Why use virtualization?
AstriCon 2009: Asterisk Xenified

                                        Why use virtualization?

●   Exploitation of multiple core CPU systems.
●   Support for multiple OSes including legacy.
●   Rapid deployment and provisioning.
●   Full utilization of hardware resources.




                                                                   16
AstriCon 2009: Asterisk Xenified

                                              Why virtualize Asterisk?

●   #include <Why use virtualization?>
●   Reduce Asterisk servers load
●   Provide 'virtual PBX' solutions to clients
       –   We can even give them the root shell!
●   Different clients → different needs → different
    configuration
       –   Isolated environments
       –   Easier to 'control'




                                                                         17
AstriCon 2009: Asterisk Xenified

Desired virtualization scenario




                                  18
AstriCon 2009: Asterisk Xenified

                                                     Networking

●   Dummy device to keep the network isolated.




                                                                 19
Xenifying Asterisk
AstriCon 2009: Asterisk Xenified

                                                    Installing Xen

●   Debian Lenny as dom0.
●   Debianized Xen Kernel: 2.6.26
●   Custom compiled Xen hypervisor and tools: 3.3.x

apt-get install linux-image-2.6-xen-686
linux-headers-2.6-xen-686 linux-modules-
2.6-xen-686




                                                                  21
AstriCon 2009: Asterisk Xenified

                                                 Intalling Xen (2)
●   Compiling Xen
apt-get install iproute bridge-utils python-twisted
binutils zlib1g-dev python-dev transfig bzip2 screen
libcurl3-dev libncurses5-dev x-dev build-essential
gettext gawk bcc libsdl1.2debian-all libsdl1.2-dev
libx86-dev libvncserver-dev

wget http://bits.xensource.com/oss-
xen/release/3.3.2/xen-3.3.2.tar.gz

tar zxvf xen-3.3.2.tar.gz && cd xen-3.3.2

make xen && make install-xen
make tools && make install-tools

update-rc.d xend defaults 20 21
update-rc.d xendomains defaults 21 20
Update-grub && reboot                                             22
AstriCon 2009: Asterisk Xenified

                                              Compiling Asterisk

●   Nothing special needed!
●   Since DAHDI 2.2 dahdi_dummy uses kernel internal
    timming instead of RTC. (before we needed to patch
    dahdi_dummy.c)
●   Compile Asterisk and DAHDI as usual (I tested latest
    1.6.0.x version)




                                                                   23
Tips and Tricks
AstriCon 2009: Asterisk Xenified

                                                               Hard Drive

●   Performance is significantly higher with partitions than
    with block-files.
●   HDD as fast as possible → 15k SAS
●   Each domU in a separate LVM volume.
       –   2 volumes, / and swap
●   LVM snapshots for fast provisioning.
       –   lvcreate -L 80G -s -n newclient /dev/xenvol/baseclient




                                                                           25
AstriCon 2009: Asterisk Xenified

                                                            Networking

●   The dom0's network card traffic will be REALLY high.
      –   His own traffic + the domUs
●   Little tweak on the network card
      –   On the domU
            ●   ethtool -K eth0 tx off
●
    Choose a good network card!




                                                                        26
AstriCon 2009: Asterisk Xenified

                                        Giving access to the clients
●   Instead of giving the clients SSH access, we can give
    them total control over their Virtual Machine.
      –   They can even shut it down!
●   How? → xen-shell
●   Access to a special shell through the dom0.

# Install necessary tools.
apt-get install xen-shell sudo


# Create groups and users
groupadd xenclients
useradd -d /dev/null -g xenclients -s /usr/bin/xen-
login-shell client1
passwd client1                                   27
AstriCon 2009: Asterisk Xenified

                                   Giving access to the clients (II)

# Allow access the special shell
visudo
→ %xenclients ALL=NOPASSWD: /usr/sbin/xm

●   Username and VM name have to be the same.




                                                                     28
AstriCon 2009: Asterisk Xenified

Giving access to the clients (III)




                                   29
AstriCon 2009: Asterisk Xenified

                                Saving, restoring and migrating a domU

●   Save the state of a domU
      –   Like the hibernate function.
      –   Fast booting.
      –   xm save
●   Restore the status of a domU
      –   xm restore
●   Migration
      –   Static
            ●   Suspend -> Migrate -> Restore
      –   Live
            ●   DomU keeps running!
            ●   xm migrate

                                                                           30
AstriCon 2009: Asterisk Xenified

                                                    Live migration

●   2 Xen servers with xend running and listening for
    relocation requests:

    /etc/xen/xend-config.sxp
    (xend-relocation-server yes)
    (xend-relocation-port 8002)
    (xend-relocation-address '')
    (xend-relocation-hosts-allow '')
●   Shared storage system among the two servers. Both of
    them have to be able to access domU files.
●   Servers need to have the same Xen version.
●   domU configuration file in both hosts.

                                                                    31
AstriCon 2009: Asterisk Xenified

                                                 PCI passthrough

●   Real hardware on our domU!
●   Hide the PCI device to the dom0 and give it to the
    domU → PCI passthrough.
●   Hide a PCI id
      –   lspci
●   GRUB configuration (dom0):
    pciback.permisive pciback.hide=(02:03.0)(0000:02:03.1)
●   DomU configuration file:
    pci=['02:03.0', '02:03.1']




                                                                   32
AstriCon 2009: Asterisk Xenified

                                                           Conclusions

●   Better use of available resources.
●   Scalable Asterisk solutions.
●   Fast-provisioning.
●   Fail-proof system.




                                                                        33
AstriCon 2009: Asterisk Xenified

                                                               Thanks!

BYE sip:astricon@astricon.net SIP/2.0
Via: SIP/2.0/UDP guest.astricon.net:5060;branch=z9hG4bKnashds7
Max-Forwards: 70
From: saghul <sip:saghul@sipdoc.net>;tag=8321234356
To: AstriCon <sip:astricon@astricon.net>;tag=9fxced76sl
Call-ID: 3848276298220188511@astricon.net
CSeq: 1 BYE
Content-Length: 0


    Thanks for watching!


                                                                       34
Any questions?
AstriCon 2009: Asterisk Xenified

                                                           License




 http://creativecommons.org/licenses/by-sa/3.0/




All images are property of their respective authors.
                                                                  36

More Related Content

Viewers also liked

Apresentação asterisk
Apresentação asteriskApresentação asterisk
Apresentação asteriskVicente Nobre
 
Developing rich SIP applications with SIPSIMPLE SDK
Developing rich SIP applications with SIPSIMPLE SDKDeveloping rich SIP applications with SIPSIMPLE SDK
Developing rich SIP applications with SIPSIMPLE SDKSaúl Ibarra Corretgé
 
Presente y futuro de las comunicaciones VoIP
Presente y futuro de las comunicaciones VoIPPresente y futuro de las comunicaciones VoIP
Presente y futuro de las comunicaciones VoIPSaúl Ibarra Corretgé
 
Nevada power condensate pump
Nevada power condensate pumpNevada power condensate pump
Nevada power condensate pumpwebtec
 
Quiero ser Diseñador Gráfico
Quiero ser Diseñador GráficoQuiero ser Diseñador Gráfico
Quiero ser Diseñador Gráficobreakingborders
 
Harbordite Issue #65
Harbordite Issue #65Harbordite Issue #65
Harbordite Issue #65HarbordClub
 
ES.PRO EcoBITS - Efficacité énergétique du système de chauffage
ES.PRO EcoBITS - Efficacité énergétique du système de chauffageES.PRO EcoBITS - Efficacité énergétique du système de chauffage
ES.PRO EcoBITS - Efficacité énergétique du système de chauffageInfoteam Informatique Technique SA
 

Viewers also liked (20)

Kamailio en Elastix 3
Kamailio en Elastix 3Kamailio en Elastix 3
Kamailio en Elastix 3
 
Projeto Asterisk - Empresa
Projeto Asterisk - EmpresaProjeto Asterisk - Empresa
Projeto Asterisk - Empresa
 
Apresentação asterisk
Apresentação asteriskApresentação asterisk
Apresentação asterisk
 
End of the world presentation
End of the world presentationEnd of the world presentation
End of the world presentation
 
Rethinking the PBX
Rethinking the PBXRethinking the PBX
Rethinking the PBX
 
Blink: voice is not enough
Blink: voice is not enoughBlink: voice is not enough
Blink: voice is not enough
 
Developing rich SIP applications with SIPSIMPLE SDK
Developing rich SIP applications with SIPSIMPLE SDKDeveloping rich SIP applications with SIPSIMPLE SDK
Developing rich SIP applications with SIPSIMPLE SDK
 
Blink: SIP conferencing done right
Blink: SIP conferencing done rightBlink: SIP conferencing done right
Blink: SIP conferencing done right
 
Blink: SIP beyond VoIP
Blink: SIP beyond VoIPBlink: SIP beyond VoIP
Blink: SIP beyond VoIP
 
Presente y futuro de las comunicaciones VoIP
Presente y futuro de las comunicaciones VoIPPresente y futuro de las comunicaciones VoIP
Presente y futuro de las comunicaciones VoIP
 
SIP y XMPP: amigos para siempre
SIP y XMPP: amigos para siempreSIP y XMPP: amigos para siempre
SIP y XMPP: amigos para siempre
 
SIP Conferencing Reloaded
SIP Conferencing ReloadedSIP Conferencing Reloaded
SIP Conferencing Reloaded
 
Nevada power condensate pump
Nevada power condensate pumpNevada power condensate pump
Nevada power condensate pump
 
portafolio_Irene
portafolio_Ireneportafolio_Irene
portafolio_Irene
 
Quiero ser Diseñador Gráfico
Quiero ser Diseñador GráficoQuiero ser Diseñador Gráfico
Quiero ser Diseñador Gráfico
 
Harbordite Issue #65
Harbordite Issue #65Harbordite Issue #65
Harbordite Issue #65
 
Nuts and elle
Nuts and elleNuts and elle
Nuts and elle
 
Guía Resumida Proyecto CECC
Guía Resumida Proyecto CECCGuía Resumida Proyecto CECC
Guía Resumida Proyecto CECC
 
Historia de yapatera fernado barrazuela
Historia   de yapatera  fernado barrazuelaHistoria   de yapatera  fernado barrazuela
Historia de yapatera fernado barrazuela
 
ES.PRO EcoBITS - Efficacité énergétique du système de chauffage
ES.PRO EcoBITS - Efficacité énergétique du système de chauffageES.PRO EcoBITS - Efficacité énergétique du système de chauffage
ES.PRO EcoBITS - Efficacité énergétique du système de chauffage
 

Similar to xen-save client1.save● Restore a saved state

Running Asterisk on virtualized environments
Running Asterisk on virtualized environmentsRunning Asterisk on virtualized environments
Running Asterisk on virtualized environmentsSaúl Ibarra Corretgé
 
Automating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with PuppetAutomating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with Puppetbuildacloud
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & dockerejlp12
 
Openstackinsideoutv10 140222065532-phpapp01
Openstackinsideoutv10 140222065532-phpapp01Openstackinsideoutv10 140222065532-phpapp01
Openstackinsideoutv10 140222065532-phpapp01sprdd
 
OpenStack: Inside Out
OpenStack: Inside OutOpenStack: Inside Out
OpenStack: Inside OutEtsuji Nakai
 
Comment automatiser le déploiement de sa plateforme sur des infrastructures ...
Comment automatiser le déploiement de sa plateforme sur des infrastructures ...Comment automatiser le déploiement de sa plateforme sur des infrastructures ...
Comment automatiser le déploiement de sa plateforme sur des infrastructures ...Scaleway
 
Virtualization Everywhere
Virtualization EverywhereVirtualization Everywhere
Virtualization Everywherewebhostingguy
 
Virtualization 101 - DeepDive
Virtualization 101 - DeepDiveVirtualization 101 - DeepDive
Virtualization 101 - DeepDiveAmit Agarwal
 
Virtualization Primer for Java Developers
Virtualization Primer for Java DevelopersVirtualization Primer for Java Developers
Virtualization Primer for Java DevelopersRichard McDougall
 
CERN OpenStack Cloud Control Plane - From VMs to K8s
CERN OpenStack Cloud Control Plane - From VMs to K8sCERN OpenStack Cloud Control Plane - From VMs to K8s
CERN OpenStack Cloud Control Plane - From VMs to K8sBelmiro Moreira
 
Visão Técnica - RHOS (Red Hat Enterprise Linux OpenStack)
Visão Técnica - RHOS (Red Hat Enterprise Linux OpenStack)Visão Técnica - RHOS (Red Hat Enterprise Linux OpenStack)
Visão Técnica - RHOS (Red Hat Enterprise Linux OpenStack)Raul Leite
 
BRKSPG-2069-64bit-package.pdf
BRKSPG-2069-64bit-package.pdfBRKSPG-2069-64bit-package.pdf
BRKSPG-2069-64bit-package.pdfHeng30
 
Toronto RHUG: Container-native virtualization
Toronto RHUG: Container-native virtualizationToronto RHUG: Container-native virtualization
Toronto RHUG: Container-native virtualizationStephen Gordon
 
OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...
OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...
OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...Stephen Gordon
 
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes MeetupMetal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes MeetupLaure Vergeron
 
Linux On V Mware ESXi
Linux On V Mware ESXiLinux On V Mware ESXi
Linux On V Mware ESXiMasafumi Ohta
 

Similar to xen-save client1.save● Restore a saved state (20)

Running Asterisk on virtualized environments
Running Asterisk on virtualized environmentsRunning Asterisk on virtualized environments
Running Asterisk on virtualized environments
 
Automating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with PuppetAutomating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with Puppet
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & docker
 
RISC V in Spacer
RISC V in SpacerRISC V in Spacer
RISC V in Spacer
 
The kvm virtualization way
The kvm virtualization wayThe kvm virtualization way
The kvm virtualization way
 
Openstackinsideoutv10 140222065532-phpapp01
Openstackinsideoutv10 140222065532-phpapp01Openstackinsideoutv10 140222065532-phpapp01
Openstackinsideoutv10 140222065532-phpapp01
 
OpenStack: Inside Out
OpenStack: Inside OutOpenStack: Inside Out
OpenStack: Inside Out
 
Comment automatiser le déploiement de sa plateforme sur des infrastructures ...
Comment automatiser le déploiement de sa plateforme sur des infrastructures ...Comment automatiser le déploiement de sa plateforme sur des infrastructures ...
Comment automatiser le déploiement de sa plateforme sur des infrastructures ...
 
Virtualization Everywhere
Virtualization EverywhereVirtualization Everywhere
Virtualization Everywhere
 
Virtualization 101 - DeepDive
Virtualization 101 - DeepDiveVirtualization 101 - DeepDive
Virtualization 101 - DeepDive
 
Virtualization Primer for Java Developers
Virtualization Primer for Java DevelopersVirtualization Primer for Java Developers
Virtualization Primer for Java Developers
 
CERN OpenStack Cloud Control Plane - From VMs to K8s
CERN OpenStack Cloud Control Plane - From VMs to K8sCERN OpenStack Cloud Control Plane - From VMs to K8s
CERN OpenStack Cloud Control Plane - From VMs to K8s
 
Visão Técnica - RHOS (Red Hat Enterprise Linux OpenStack)
Visão Técnica - RHOS (Red Hat Enterprise Linux OpenStack)Visão Técnica - RHOS (Red Hat Enterprise Linux OpenStack)
Visão Técnica - RHOS (Red Hat Enterprise Linux OpenStack)
 
BRKSPG-2069-64bit-package.pdf
BRKSPG-2069-64bit-package.pdfBRKSPG-2069-64bit-package.pdf
BRKSPG-2069-64bit-package.pdf
 
Toronto RHUG: Container-native virtualization
Toronto RHUG: Container-native virtualizationToronto RHUG: Container-native virtualization
Toronto RHUG: Container-native virtualization
 
OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...
OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...
OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...
 
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes MeetupMetal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
 
Linux On V Mware ESXi
Linux On V Mware ESXiLinux On V Mware ESXi
Linux On V Mware ESXi
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Gns3
Gns3Gns3
Gns3
 

More from Saúl Ibarra Corretgé

Challenges running Jitsi Meet at scale during the pandemic
Challenges running Jitsi Meet at scale during the pandemicChallenges running Jitsi Meet at scale during the pandemic
Challenges running Jitsi Meet at scale during the pandemicSaúl Ibarra Corretgé
 
The Road to End-to-End Encryption in Jitsi Meet
The Road to End-to-End Encryption in Jitsi MeetThe Road to End-to-End Encryption in Jitsi Meet
The Road to End-to-End Encryption in Jitsi MeetSaúl Ibarra Corretgé
 
Jitsi Meet: our tale of blood, sweat, tears and love
Jitsi Meet: our tale of blood, sweat, tears and loveJitsi Meet: our tale of blood, sweat, tears and love
Jitsi Meet: our tale of blood, sweat, tears and loveSaúl Ibarra Corretgé
 
Jitsi Meet: Video conferencing for the privacy minded
Jitsi Meet: Video conferencing for the privacy mindedJitsi Meet: Video conferencing for the privacy minded
Jitsi Meet: Video conferencing for the privacy mindedSaúl Ibarra Corretgé
 
Get a room! Spot: the ultimate physical meeting room experience
Get a room! Spot: the ultimate physical meeting room experienceGet a room! Spot: the ultimate physical meeting room experience
Get a room! Spot: the ultimate physical meeting room experienceSaúl Ibarra Corretgé
 
Going Mobile with React Native and WebRTC
Going Mobile with React Native and WebRTCGoing Mobile with React Native and WebRTC
Going Mobile with React Native and WebRTCSaúl Ibarra Corretgé
 
Going Mobile with React Native and WebRTC
Going Mobile with React Native and WebRTCGoing Mobile with React Native and WebRTC
Going Mobile with React Native and WebRTCSaúl Ibarra Corretgé
 
Jitsi: state-of-the-art video conferencing you can self-host
Jitsi: state-of-the-art video conferencing you can self-hostJitsi: state-of-the-art video conferencing you can self-host
Jitsi: state-of-the-art video conferencing you can self-hostSaúl Ibarra Corretgé
 
WebRTC: El epicentro de la videoconferencia y IoT
WebRTC: El epicentro de la videoconferencia y IoTWebRTC: El epicentro de la videoconferencia y IoT
WebRTC: El epicentro de la videoconferencia y IoTSaúl Ibarra Corretgé
 
libuv: cross platform asynchronous i/o
libuv: cross platform asynchronous i/olibuv: cross platform asynchronous i/o
libuv: cross platform asynchronous i/oSaúl Ibarra Corretgé
 
Videoconferencias: el santo grial de WebRTC
Videoconferencias: el santo grial de WebRTCVideoconferencias: el santo grial de WebRTC
Videoconferencias: el santo grial de WebRTCSaúl Ibarra Corretgé
 
SylkServer: State of the art RTC application server
SylkServer: State of the art RTC application serverSylkServer: State of the art RTC application server
SylkServer: State of the art RTC application serverSaúl Ibarra Corretgé
 
Escalabilidad horizontal desde las trincheras
Escalabilidad horizontal desde las trincherasEscalabilidad horizontal desde las trincheras
Escalabilidad horizontal desde las trincherasSaúl Ibarra Corretgé
 

More from Saúl Ibarra Corretgé (20)

Challenges running Jitsi Meet at scale during the pandemic
Challenges running Jitsi Meet at scale during the pandemicChallenges running Jitsi Meet at scale during the pandemic
Challenges running Jitsi Meet at scale during the pandemic
 
The Road to End-to-End Encryption in Jitsi Meet
The Road to End-to-End Encryption in Jitsi MeetThe Road to End-to-End Encryption in Jitsi Meet
The Road to End-to-End Encryption in Jitsi Meet
 
Jitsi: State of the Union 2020
Jitsi: State of the Union 2020Jitsi: State of the Union 2020
Jitsi: State of the Union 2020
 
Jitsi Meet: our tale of blood, sweat, tears and love
Jitsi Meet: our tale of blood, sweat, tears and loveJitsi Meet: our tale of blood, sweat, tears and love
Jitsi Meet: our tale of blood, sweat, tears and love
 
Jitsi Meet: Video conferencing for the privacy minded
Jitsi Meet: Video conferencing for the privacy mindedJitsi Meet: Video conferencing for the privacy minded
Jitsi Meet: Video conferencing for the privacy minded
 
Jitsi - Estado de la unión 2019
Jitsi - Estado de la unión 2019Jitsi - Estado de la unión 2019
Jitsi - Estado de la unión 2019
 
Get a room! Spot: the ultimate physical meeting room experience
Get a room! Spot: the ultimate physical meeting room experienceGet a room! Spot: the ultimate physical meeting room experience
Get a room! Spot: the ultimate physical meeting room experience
 
Going Mobile with React Native and WebRTC
Going Mobile with React Native and WebRTCGoing Mobile with React Native and WebRTC
Going Mobile with React Native and WebRTC
 
Going Mobile with React Native and WebRTC
Going Mobile with React Native and WebRTCGoing Mobile with React Native and WebRTC
Going Mobile with React Native and WebRTC
 
Jitsi: Estado de la Unión (2018)
Jitsi: Estado de la Unión (2018)Jitsi: Estado de la Unión (2018)
Jitsi: Estado de la Unión (2018)
 
Jitsi: state-of-the-art video conferencing you can self-host
Jitsi: state-of-the-art video conferencing you can self-hostJitsi: state-of-the-art video conferencing you can self-host
Jitsi: state-of-the-art video conferencing you can self-host
 
WebRTC: El epicentro de la videoconferencia y IoT
WebRTC: El epicentro de la videoconferencia y IoTWebRTC: El epicentro de la videoconferencia y IoT
WebRTC: El epicentro de la videoconferencia y IoT
 
Jitsi: Open Source Video Conferencing
Jitsi: Open Source Video ConferencingJitsi: Open Source Video Conferencing
Jitsi: Open Source Video Conferencing
 
Jitsi: State of the Union
Jitsi: State of the UnionJitsi: State of the Union
Jitsi: State of the Union
 
libuv: cross platform asynchronous i/o
libuv: cross platform asynchronous i/olibuv: cross platform asynchronous i/o
libuv: cross platform asynchronous i/o
 
Videoconferencias: el santo grial de WebRTC
Videoconferencias: el santo grial de WebRTCVideoconferencias: el santo grial de WebRTC
Videoconferencias: el santo grial de WebRTC
 
SylkServer: State of the art RTC application server
SylkServer: State of the art RTC application serverSylkServer: State of the art RTC application server
SylkServer: State of the art RTC application server
 
Escalabilidad horizontal desde las trincheras
Escalabilidad horizontal desde las trincherasEscalabilidad horizontal desde las trincheras
Escalabilidad horizontal desde las trincheras
 
A deep dive into libuv
A deep dive into libuvA deep dive into libuv
A deep dive into libuv
 
Planning libuv v2
Planning libuv v2Planning libuv v2
Planning libuv v2
 

Recently uploaded

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

xen-save client1.save● Restore a saved state

  • 1. Asterisk Xenified Saúl Ibarra Corretgé <saghul@gmail.com> http://www.saghul.net http://www.sipdoc.net saghul http://www.irontec.com
  • 2. AstriCon 2009: Asterisk Xenified About me ● saghul – VoIP enthusiast, playing around with Asterisk since 2k5 – GNU/Linux lover likes everything “Software Libre” – Co-founder of http://sipdoc.net – Highly involved in spanish VoIP comunities 2
  • 3. AstriCon 2009: Asterisk Xenified The presentation http://www.saghul.net/blog/downloads/astricon2k9/ http://www.slideshare.net/saghul/ 3
  • 4. AstriCon 2009: Asterisk Xenified Index 1. Introduction to virtualization 2. Xen 3. Why use virtualization? 4. Xenifying Asterisk 5. Tips and tricks 4
  • 6. AstriCon 2009: Asterisk Xenified Introduction to virtualization ● Virtualization – The ability to use a single physical computer to run several “simulated” computers ● Why would we use it? – Testing / production environments – Cost reduction – Different testing scenarios 6
  • 7. AstriCon 2009: Asterisk Xenified Virtualization types Performance is virtualization's Achilles Heel and depends mainly in the type of virtualization used. Isolation between host and guests its also very important, usually: +isolation → -performance ● Emulation ● Full virtualization ● Paravirtualization ● OS level virtualization 7
  • 8. AstriCon 2009: Asterisk Xenified Virtualization types (I) Emulation ● Entire hardware is simulated (no access to real hardware) ● Guests are unmodified ● Different architectures can be virtualized ● Poor performance ● Ex. Bochs. 8
  • 9. AstriCon 2009: Asterisk Xenified Virtualization types (II) Full virtualization ● Similar to emulation ● Some instructions are run on the raw hardware (Intel VT or AMD V is needed) ● Host and guests have to be the same architecture ● Guest OS runs unmodified ● Often used instead of paravirtualization, when guest OS is distributed in binary form (e.g. Windows) ● Better performance than emulation ● Ex. KVM, VirtualBox. 9
  • 10. AstriCon 2009: Asterisk Xenified Virtualization types (III) Paravirtualization ● Guest OS is modified so that it communicates whith the real hardware ● Applications run unmodified ● Host and guests have to be the same architecture ● Better performance than Full virtualization ● Ex. Xen. 10
  • 11. AstriCon 2009: Asterisk Xenified Virtualization types (IV) OS level virtualization ● Guests share resources with the host system ● Weak isolation ● Host performance can be compromised by guests ● Guests are not really full-featured systems ● Ex. OpenVZ. 11
  • 12.
  • 13. AstriCon 2009: Asterisk Xenified What is Xen ● neXt gENeration virtualization. ● Open Source ● Supports Paravirtualization AND Full Virtualization. ● Runs on commodity hardware. ● Packaged for many distros. ● Cool features: – PV and Full Virtualization support. – PCI passthrough – Live migration 13
  • 14. AstriCon 2009: Asterisk Xenified Xen Architecture 14
  • 16. AstriCon 2009: Asterisk Xenified Why use virtualization? ● Exploitation of multiple core CPU systems. ● Support for multiple OSes including legacy. ● Rapid deployment and provisioning. ● Full utilization of hardware resources. 16
  • 17. AstriCon 2009: Asterisk Xenified Why virtualize Asterisk? ● #include <Why use virtualization?> ● Reduce Asterisk servers load ● Provide 'virtual PBX' solutions to clients – We can even give them the root shell! ● Different clients → different needs → different configuration – Isolated environments – Easier to 'control' 17
  • 18. AstriCon 2009: Asterisk Xenified Desired virtualization scenario 18
  • 19. AstriCon 2009: Asterisk Xenified Networking ● Dummy device to keep the network isolated. 19
  • 21. AstriCon 2009: Asterisk Xenified Installing Xen ● Debian Lenny as dom0. ● Debianized Xen Kernel: 2.6.26 ● Custom compiled Xen hypervisor and tools: 3.3.x apt-get install linux-image-2.6-xen-686 linux-headers-2.6-xen-686 linux-modules- 2.6-xen-686 21
  • 22. AstriCon 2009: Asterisk Xenified Intalling Xen (2) ● Compiling Xen apt-get install iproute bridge-utils python-twisted binutils zlib1g-dev python-dev transfig bzip2 screen libcurl3-dev libncurses5-dev x-dev build-essential gettext gawk bcc libsdl1.2debian-all libsdl1.2-dev libx86-dev libvncserver-dev wget http://bits.xensource.com/oss- xen/release/3.3.2/xen-3.3.2.tar.gz tar zxvf xen-3.3.2.tar.gz && cd xen-3.3.2 make xen && make install-xen make tools && make install-tools update-rc.d xend defaults 20 21 update-rc.d xendomains defaults 21 20 Update-grub && reboot 22
  • 23. AstriCon 2009: Asterisk Xenified Compiling Asterisk ● Nothing special needed! ● Since DAHDI 2.2 dahdi_dummy uses kernel internal timming instead of RTC. (before we needed to patch dahdi_dummy.c) ● Compile Asterisk and DAHDI as usual (I tested latest 1.6.0.x version) 23
  • 25. AstriCon 2009: Asterisk Xenified Hard Drive ● Performance is significantly higher with partitions than with block-files. ● HDD as fast as possible → 15k SAS ● Each domU in a separate LVM volume. – 2 volumes, / and swap ● LVM snapshots for fast provisioning. – lvcreate -L 80G -s -n newclient /dev/xenvol/baseclient 25
  • 26. AstriCon 2009: Asterisk Xenified Networking ● The dom0's network card traffic will be REALLY high. – His own traffic + the domUs ● Little tweak on the network card – On the domU ● ethtool -K eth0 tx off ● Choose a good network card! 26
  • 27. AstriCon 2009: Asterisk Xenified Giving access to the clients ● Instead of giving the clients SSH access, we can give them total control over their Virtual Machine. – They can even shut it down! ● How? → xen-shell ● Access to a special shell through the dom0. # Install necessary tools. apt-get install xen-shell sudo # Create groups and users groupadd xenclients useradd -d /dev/null -g xenclients -s /usr/bin/xen- login-shell client1 passwd client1 27
  • 28. AstriCon 2009: Asterisk Xenified Giving access to the clients (II) # Allow access the special shell visudo → %xenclients ALL=NOPASSWD: /usr/sbin/xm ● Username and VM name have to be the same. 28
  • 29. AstriCon 2009: Asterisk Xenified Giving access to the clients (III) 29
  • 30. AstriCon 2009: Asterisk Xenified Saving, restoring and migrating a domU ● Save the state of a domU – Like the hibernate function. – Fast booting. – xm save ● Restore the status of a domU – xm restore ● Migration – Static ● Suspend -> Migrate -> Restore – Live ● DomU keeps running! ● xm migrate 30
  • 31. AstriCon 2009: Asterisk Xenified Live migration ● 2 Xen servers with xend running and listening for relocation requests: /etc/xen/xend-config.sxp (xend-relocation-server yes) (xend-relocation-port 8002) (xend-relocation-address '') (xend-relocation-hosts-allow '') ● Shared storage system among the two servers. Both of them have to be able to access domU files. ● Servers need to have the same Xen version. ● domU configuration file in both hosts. 31
  • 32. AstriCon 2009: Asterisk Xenified PCI passthrough ● Real hardware on our domU! ● Hide the PCI device to the dom0 and give it to the domU → PCI passthrough. ● Hide a PCI id – lspci ● GRUB configuration (dom0): pciback.permisive pciback.hide=(02:03.0)(0000:02:03.1) ● DomU configuration file: pci=['02:03.0', '02:03.1'] 32
  • 33. AstriCon 2009: Asterisk Xenified Conclusions ● Better use of available resources. ● Scalable Asterisk solutions. ● Fast-provisioning. ● Fail-proof system. 33
  • 34. AstriCon 2009: Asterisk Xenified Thanks! BYE sip:astricon@astricon.net SIP/2.0 Via: SIP/2.0/UDP guest.astricon.net:5060;branch=z9hG4bKnashds7 Max-Forwards: 70 From: saghul <sip:saghul@sipdoc.net>;tag=8321234356 To: AstriCon <sip:astricon@astricon.net>;tag=9fxced76sl Call-ID: 3848276298220188511@astricon.net CSeq: 1 BYE Content-Length: 0 Thanks for watching! 34
  • 36. AstriCon 2009: Asterisk Xenified License http://creativecommons.org/licenses/by-sa/3.0/ All images are property of their respective authors. 36