Posts

Installing Trixbox(Asterisk) on an ESXi server

Install stage:
1. Download the Trixbox ISO. This will probably take ~1 hour.
2. Create a new virtual machine in ESXi with the following options

  • Typical
  • Linux other 32-bit
  • 1024 for memory
  • 10gb disk
  • 3. Follow this blog to mount the ISO as a virtual Cd-rom. https://itsupportconsulting.com/blog/?p=366
    4. Power on the virtual machine

  • Push at the main screen
  • I’m getting an error saying
  • The Trixbox CD was not found in any of your CDROM drives. Please insert the Trixbox CD and press OK to retry.

  • I’m going to try re-uploading the ISO to my ESXi server.
  • This did not work

  • Going to try and re-download the ISO then re-upload it to ESXi
  • Well I could not get this problem resolved so I’m just going to download the Trixbox Vmware appliance. It is 2.6.1 as opposed to 2.6.2 but you can always upgrade after the install. Here is the link.
    1. Ok the first step here I’m going to use vCenter converter to import this virtual appliance into my ESXi server.
    2. Converting is very simple once the program is installed click on the “Convert Machine” button which will bring up this window.
    1
    3. What you want to do is browse to the file we downloaded in the previous step after it is unzipped. trixbox 2.6.1-vmware.vmx
    4. Once you click next it will ask you to supply your login to your ESXi server.
    5. The next step allows you to rename your VM to whatever you want and select your data store.
    6. The next step allows you to change your hardware settings for the virtual machine. I’m going to change two settings here:
    Change to a 10gb disk

  • Change the memory from 512 to 1024
  • 7. Once you click next you are ready to start your conversion. Now keep one thing in mind. This converter has to upload the large file we downloaded to the server. So if you are on a time crunch and are on wireless make sure you hardwire and disable your wireless. This will ensure you save the most time.
    Configuration phase:
    1. Ok now that we have the virtual machine install make sure it is powered on. It uses DHCP so you need to figure out what IP address it got. This can be accomplished by logging in to the Trixbox console with username root and password trixbox. Once you get the # type in ifconfig. This will display the IP.
    2. This is going to be a server so we will want to configure a static IP or else it will be getting using DHCP which could cause all types of problems down the road.

  • vi /etc/sysconfig/network-scripts/ifcfg-eth0
  • DEVICE=eth0
    ONBOOT=yes
    BOOTPROTO=none
    BROADCAST=192.168.2.255
    IPADDR=192.168.2.3
    NETMASK=255.255.255.0
    NETWORK=192.168.2.0
    now press esc and :wq to save changes and quit

  • vi /etc/resolv.conf
  • nameserver 68.2.16.30
    nameserver 68.2.16.25
    now press and :wq to save changes and quit
    The next step I recommend is opening your Trixbox server from a web browser:
    http://192.168.2.5/maint
    Click on the packages link at the top so we can update our software to the latest version. When I clicked on mine i received the following error:
    Error: The xml response that was returned from the server is invalid. Received:
    alert
    To fix it I was able to type the following from the command line:
    vi /etc/service.php
    From here find the section below and change
    max_execution_time = 300
    memory_limit = 256
    This may not work for you but it did resolve my problem.
    commands
    Once you changed this type the following to restart the http daemon:
    service httpd restart
    Now I am able to successfully open:
    http://192.168.2.5/maint/index.php?packages
    From here I’m going to go down and check every box in the “upgrade” column this way all of my software installed on the server is up to date.
    While trying to install a couple of the updates I’m receiving the following error:
    Error: Missing Dependency: libtds.so.5 is needed by package asterisk
    To fix it:
    yum install libtds.so.5
    Ok now that everything is downloaded and installed I’m going to configure some SIP trunks. I personally use Broadvoice for terminating my voice lines. However, there are tons of service providers out there. Here are my steps.
    Open internet browser to http:///admin
    First thing I’m going to do is edit the trunks
    480+NXXXXXX
    9|1480NXXXXXX
    9|1602NXXXXXX
    9|1623NXXXXXX
    602NXXXXXX
    480NXXXXXX
    623NXXXXXX
    1480NXXXXXX
    1602NXXXXXX
    1623NXXXXXX
    1NXXNXXXXXX
    NXXNXXXXXX
    01130.
    01131.
    01132.
    01133.
    01134.
    011351.
    011352.
    011354.
    011358.
    01139.
    01141.
    011423.
    01143.
    01144.
    01145.
    01146.
    01147.
    01149.
    01152.
    01.
    For trunk name you can put whatever you want
    For peer details I’m using the following:
    username=<em>
    </em>
    user=phone
    type=peer
    secret=<em>
    </em>
    nat=yes
    insecure=very
    host=sip.broadvoice.com
    fromuser=<em>
    </em>
    fromdomain=sip.broadvoice.com
    dtmfmode=inband
    dtmf=inband
    context=from-pstn
    canreinvite=no
    authname=<em>
    </em>
    For user context I’m using the following sip.broadvoice.com
    For user details I’m using:
    username=<em>
    </em>
    user=<em>
    </em>
    type=user
    secret=<em>
    </em>
    nat=never
    insecure=very
    host=sip.broadvoice.com
    fromdomain=sip.broadvoice.com
    dtmfmode=rfc2833
    dtmf=rfc2833
    context=from-pstn
    Register string:
    <em>
    </em>@sip.broadvoice.com:<em>
    </em>:<em>
    </em>@sip.broadvoice.com/<em>
    </em>
    Click submit changes.

    Mounting ISO images to ESXi

    If you are trying to mount ISO CD-rom images to ESXi so that you don’t have to physically burn the disc. Here is how.
    1. Download a program called WinSCP. This allows you to use SSH to transfer files.
    2. Open WinSCP to /vmfs/volumes/[name of your data store] then create a directory called ISOS.
    3. Copy the downloaded ISO files from your PC to the ISOS folder.
    4. Open Vmware infrastructure client right click on your server and go to edit settings.
    5. You can either create another virtual CD rom drive or you can mount your ISO to your existing one.
    6. Click on the CD/DVD Drive 1 in your options. On the right hand side select Datastore ISO file. Now simply browse to your ISO and you can mount it as if it were an inserted CD/DVD.

    Finally got ESXi up and running on my Intel i7 based processor system

    So I was finally able to get ESXi up and running. You can see from my previous posts I’ve tried hacking my system I have finally given up after investing probably 30 hours of trying.
    What I finally did was purchase this SAS controller from Amazon:
    SuperMicro Uio Card Lsi 1068E Sas Controller Card
    I also purchased an Intel pro/100 network adapter from Fry’s electronics which appears to be compatible using the e100 driver
    I do have an Intel Pro/1000 pci x1 adapter in the mail. Once it arrives I can hopefully increase my bandwidth to 1GB opposed to the 100MB I’m running currently.
    I’m still debating whether or not I want to convert my home machine into a permanent ESXi server. It would mean I would have to pull one of my old PC’s out of the closet as a workstation….ugh.

    Adding SSH capability to ESXi

    Go to the ESXi console and press alt+F1
    Type: unsupported
    Enter the root password
    At the prompt type “vi /etc/inetd.conf”
    Look for the line that starts with “#ssh” (you can search with pressing “/”)
    Remove the “#” (press the “x” if the cursor is on the character)
    Save “/etc/inetd.conf” by typing “:wq!”
    Restart the management service “/sbin/services.sh restart”

    Booting to ESXi 3.5 from a USB flash drive

    The first thing you’ll need to do is make sure you find at least a 1gb flash drive.
    Next use a program like Winrar or Peazip to get into your vmware install iso.
    First open the iso file with Winrar. It is not associated by default so you will have to right click on it and do open with Winrar.
    Next you will want to open a file named Install.TGZ then the file in that Install.TAR then usrlibvmwareinstallerVMware-VMvisor-big-3.5.0_Update_3-123629.i386.bz2VMware-VMvisor-big-3.5.0_Update_3-123629.i386.dd
    Once you get this file extracted you need to download a program called Winimage.
    Once WinImage is installed open it and go to Disk>restore virtual hard disk image on physical drive> From here select your thumb drive to write to it. Find the .dd file that you extracted in the previous step. Once you write this you should be all set. A VERY important note you need to go into your BIOS and select “USB Mass Storage Emulation Type” – “All Fixed Disc if you do not do this you will receive an error when trying to boot to the thumb drive.
    lspci -vvnn > lspci.log
    Now that we have the ESXi image on our thumb drive if we have an unsupported system there is one more step we need to go through. We need to edit 2 files for our storage controller and network card to be compatible.
    )cd /tmp/
    2) mkdir -p oem/etc/vmware
    3) mkdir -p oem/usr/share/hwdata
    4) cd oem/etc/vmware
    5) cp /etc/vmware/simple.map simple.map
    6) vi simple.map
    add the necessary PCI data for your devices
    7) close vi – press ESC and enter :wq
    8) cd /tmp/oem/usr/share/hwdata
    9) cp /usr/share/hwdata/pci.ids pci.ids
    10) vi pci.ids
    add the necessary description for your devices (this will be displayed in the console and VI Client)
    11) close vi – press ESC and enter :wq
    12) cd /tmp/oem
    13) chown -R 201:201 ./etc
    14) chown -R 201:201 ./usr
    15) chmod -R 755 ./etc
    16) chmod -R 755 ./usr
    17) chmod 644 ./etc/vmware/simple.map
    18) chmod 644 ./usr/share/hwdata/pci.ids
    19) tar -cvzf oem.tgz etc usr
    20) cp oem.tgz /bootbank/oem.tgz
    21) cd /bootbank/
    22) chmod 755 oem.tgz
    23) reboot the host

    My battle with installing ESXi 3.5 Update 2

    pciids-intelSo I found out Vmware ESXi 3.5 their latest version is free! And it’s only 32mb and it is completely host independent. So I decided to give it a shot. First I downloaded it just to be faced with an error during the install. I’m trying to install it on my Intel DX58SO motherboard with an i7 processor.
    vm-error
    Now for my entries
    pciids
    From here I was able to browse the web to determine my Intel SATA controller was not supported by Vmware. In fact I’m under the impression the supported list is very small. Then I discovered there was a community put together hardware compatibility list. These nice people even created custom files for installing ESX. You can download these files so that your install disk supports more controllers. This is the step I’m going to describe because this is what I have to do to install my version.
    First you need to get a minimum 512mb USB thumb drive. What we’re going to do is create an image from the CD to this thumb drive so that we can modify the files and then boot to it to install ESXi. Your motherboard must support USB booting.
    First thing you need to download Syslinux. The reason we’re downloading this is so we can boot to it to launch the install.
    Now format your USB stick using FAT32. Then browse to the directory in which you extracted your Syslinux files and run this command “syslinux.exe . This will make your USB disc bootable and copy over the files necessary for Syslinux to run. Now you will want to copy all the files from the ESXi downloadable iso. You can do this by downloading a program called Winrar or you can burn the ISO using Nero then just simply copy all the files over. Whichever way you want to do it.
    Now you will want to download 1.04 or latest version of the community OEM.TGZ file. This file contains all of the drivers for tons of SATA and Network cards. Once you download this file you must rename it OEM.TGZ and replace the one on your USB stick. This will give you the added driver support. If your device is supported you can now boot to your USB stick and install ESXi.
    If you made it this far it means your device was not on the list. That is unfortunate. Now that you are back in Windows go into your device manager and find your SATA controller. Here is an example of mine:
    hardware
    ids
    You can see fro my image my vendor number is 8086 and my model is 3A26. I actually have two my other one is the same vendor but it’s 3A20. So now I need to boot to my ESX install thumb drive again. Once I get the screen that says push to install I’m going to hit alt+F1. This is going to give me the console in which I can edit the files necessary. The login is going to be root with no password.
    Once logged in here are the commands we’re going to run:
    1) cd /tmp/
    2) mkdir -p oem/etc/vmware
    3) mkdir -p oem/usr/share/hwdata
    4) cd oem/etc/vmware
    5) cp /etc/vmware/simple.map simple.map
    6) vi simple.map
    — add the necessary PCI data for your devices
    i.e.
    simplemap
    7) close vi – press ESC and enter :wq
    8) cd /tmp/oem/usr/share/hwdata
    9) cp /usr/share/hwdata/pci.ids pci.ids
    10) vi pci.ids
    — add the necessary description for your devices (this will be displayed in the console and VI Client)
    i.e.
    Keep your file organize find your manufacturer first mine is intel in this case
    pciids-intel1
    Now for my model number entries:
    pciids1
    11) close vi – press ESC and enter :wq
    12) cd /tmp/oem
    13) chown -R 201:201 ./etc
    14) chown -R 201:201 ./usr
    15) chmod -R 755 ./etc
    16) chmod -R 755 ./usr
    17) chmod 644 ./etc/vmware/simple.map
    18) chmod 644 ./usr/share/hwdata/pci.ids
    19) tar -cvzf oem.tgz etc usr
    20) mkdir -p /bootbank/
    21) cp oem.tgz /bootbank/oem.tgz
    22) cd /bootbank/
    23) chmod 755 oem.tgz
    24) reboot