hipchat

Installing HipChat on a Proxmox Host

For the past several years I’ve used Skype almost exclusively for ‘internal’ communications (text, voice, file transfers, etc.), but after getting really fed up with it recently (for reasons I won’t explain in this post) I decided to go ahead a look for an alternative.

During my search I came across a variety of different products, all with promising features and cool integrations, that provided an ‘internal’ communication solution for small companies, but in the end I decided to go with HipChat.

“HipChat? Slack is, like, 1.269634e27 times better!”, you may say.

To be honest, I’m not one to argue which solution is the best, and neither is this the goal of this post. The reason I selected HipChat is because it provided all the features I needed (text, voice, and video chat – with history sync -, file sharing, support for user and group management, a variety of integrations, on-premises hosting, clients for multiple platforms, and – most importantly – LDAP authentication) for a decent price ($10/year for 10 users, even though it gets way more expensive after that).

They also provided a free 30-day evaluation period, so I thought “Why not?”, and I proceeded to download and install the self-hosted version on our internal Proxmox-powered server.

However, to my surprise, upon clicking the download button, instead of being presented with something like a list of different installation options for different operating systems, or maybe even installation packages for different distributions, my browser started downloading a pre-built and pre-configured VirtualBox container.

“Odd.”, I thought, “Maybe this is just an ‘easy-setup’ option and they provide installation packages elsewhere.”.

Hint: They didn’t.

So after contemplating for a while about why they would do such a thing, I finally accepted that there was no other way to get HipChat on our machine, and I proceeded to figure out how it would be possible to convert this VirtualBox container (and its contents) to something KVM would be able to manage.
And guess what, it turns out it wasn’t that hard.

Before going forward, I should warn you that this process requires at least 100GB of free storage, so if your server doesn’t have enough space you might want to do this locally and then transfer the required files over.

The first thing I did was to SSH to our Proxmox server, download the VirtualBox container (namely HipChat.ova) to a temporary directory (like /tmp), and extract it using the following command (the .ova file is basically a tgz container):

root@pve:/tmp# tar -xvf HipChat.ova

After extracting it, I was presented with several files, three of which were Virtual Machine Disks (namely system.vmdk, chat_history.vmdk, and file_store.vmdk).

You see, the way HipChat is configured is by utilizing 3 different disks. One for the base system (which is based on a modified 64-bit version of Ubuntu 12.04), one for storing uploaded files, and one for chat logs. The system disk is 24GB, the chat logs disk is 10GB, and the files disk is 40GB, making up for a total of 74GB.

The next step was converting the virtual disks to a format KVM understood. In order to be able to do that I first had to convert them from VMDK to RAW, and then back to QCOW2, but attempting to do that by solely using qemu-img yielded no results. Instead, I figured out I had to install the VirtualBox utility VBoxManage, use that to convert them to RAW, and then use qemu-img to convert to QCOW2.

Getting VBoxManage was relatively easy. I was able to get it by simply installing the virtualbox package using apt:

root@pve:/tmp# apt-get install virtualbox

Please note that doing this installs a lot of unnecessary software on your box, so you might want to perform these step on a different computer.

Then it was just a matter of executing a couple of commands for each virtual disk in order to convert it to the required format:

root@pve:/tmp# VBoxManage clonehd –format RAW system.vmdk system.raw
root@pve:/tmp# VBoxManage clonehd –format RAW chat_history.vmdk chat_history.raw
root@pve:/tmp# VBoxManage clonehd –format RAW file_store.vmdk file_store.raw
root@pve:/tmp# qemu-img convert -p -f raw system.raw -O qcow2 system.qcow2
root@pve:/tmp# qemu-img convert -p -f raw chat_history.raw -O qcow2 chat_history.qcow2
root@pve:/tmp# qemu-img convert -p -f raw file_store.raw -O qcow2 file_store.qcow2

These steps might take a while, so sit back, listen to some music, and relax!

After everything successfully finished converting it was time to setup the KVM instance for HipChat.
I simply logged into the Proxmox web interface, and created a new VM with the following settings:

  • OS: Linux 3.X/2.6 Kernel (l26)
  • CD/DVD: Do not use any media
  • Hard Disk:
    • Bus/Device: SCSI/0
    • Disk size: 24GB
    • Format: QEMU image format (qcow2)
  • CPU:
    • Sockets: 1
    • Cores: 4
    • Type: Default (kvm64)
  • Memory: Fixed size memory (4096 MB)
  • Network:
    • Model: VirtIO (paravirtualized)

When Proxmox finished creating the new VM, I selected it from the left navigation menu, went to the ‘Hardware’ tab, and added two new disks with the following settings:

  1. Disk 1
    • Bus/Device: SCSI/1
    • Disk size: 10GB
    • Format: QEMU image format (qcow2)
  2. Disk 2
    • Bus/Device: SCSI/2
    • Disk size: 40GB
    • Format: QEMU image format (qcow2)

From then on, it was simply a matter of moving over the converted virtual disks to the images directory of the newly created VM:

root@pve:/tmp# cp system.qcow2 /var/lib/vz/images/<vmid>/vm-<vmid>-disk-1.qcow2
root@pve:/tmp# cp chat_history.qcow2 /var/lib/vz/images/<vmid>/vm-<vmid>-disk-2.qcow2
root@pve:/tmp# cp file_store.qcow2 /var/lib/vz/images/<vmid>/vm-<vmid>-disk-3.qcow2

Don’t forget to replace <vmid> with the ID of your newly created VM!

After all that was done, I fired up the VM and launched the remote VNC console.

The first boot took a while, maybe even a bit longer than a while, but after approximately 45 minutes of patiently waiting for it to configure networking, fail, retry, and fail again multiple times, I was finally greeted with the login prompt.

From then on, I simply logged in using the pre-specified credentials (admin:hipchat), changed the password, configured my networking interfaces using the command below, and proceeded to login to the web interface and finish the configuration.

admin@hipchat:~# hipchat network -m static -i <ip> -s <netmask> -g <gateway> -r <dns>

And that was it!

I now had a fully functional HipChat instance on our Proxmox server, running as a standalone VM.

2 thoughts on “Installing HipChat on a Proxmox Host

  1. Good instructions.

    I too, am trying to get HipChat working. In my case we have an OpenStack server that I am trying to upload to.

    One of the issues I am seeing is that once I have uploaded the qcow files up to OpenStack I am getting some odd values for the size of drive.

    Could you tell me what size of file you ended up with when you did the final qcow? I am wondering if I have some corruption in that faze. The RAW files seem to be the correct sizes as I know them.

    1. Hey David,

      Even though the instance HipChat was originally installed on is now trashed some logs indicate that the resulting qcow2 files were 25GB (25773998080 bytes), 11GB (10739318784 bytes), and 41GB (42956488704 bytes) respectively.

      I hope this information helps you in resolving your issue.

Leave a Reply to OrfeasZ Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>