Tuesday, August 1, 2017

Accessing & upgrading a Debian Bitnami VM

So I stumbled across Bitnami recently. It's nice to be able to download ready-to-go VMs for different pieces of software. One I tried was a VMWare OVA that used Debian 8 as its base. But the current release of Debian is 9.1, and there wasn't an immediate issue involved in upgrading (MySQL -> MariaDB compatibility is an issue for some apps).

I. I needed SSH access. After loading the VM, I was able to enable SSH by following the Bitnami instructions for doing so. They add an extra /etc/ssh/sshd_not_to_be_run file to keep SSHD disabled, even after enabling the service.

II. I modified instructions from this source and another tool to make something work for me. Logged in as SSH under the bitnami user; for the last step, keep existing files if asked...

  1. sudo su -
  2. cp /etc/apt/sources.list /etc/apt/sources.list_backup
  3. apt install nano deborphan
  4. wget https://launchpad.net/~utappia/+archive/ubuntu/stable/+files/ucaresystem-core_3.0-1+xenial2_all.deb
  5. dpkg -i ucaresystem-core_3.0-1+xenial2_all.deb
  6. sed -i 's/jessie/stretch/g' /etc/apt/sources.list
  7. apt update && ucaresystem-core

III. Bitnami used the Extlinux bootloader for the VM I had; so I had to manually edit it to accept the newer kernel. nano /extlinux.conf ; change the kernel to /vmlinuz and change the initrd= to use /initrd.img as the target. For the end of the "append" line, add scsi_mod.use_blk_mq=y dm_mod.use_blk_mq=y or elevator=noop per what VMWare and others have suggested of late.

IV. Of course you should reboot the VM.

You should be able to modify this process to upgrade other Debian & Ubuntu VMs; just be wary of how things work on different versions (especially if you're trying to hop from something non-system-friendly).

Errata

Since you'd be using kernel 4.9 or better, give this a whirl in your /etc/sysctl.conf

net.ipv4.tcp_congestion_control=bbr
net.ipv4.tcp_tw_recycle=1
net.ipv4.tcp_tw_reuse=1
net.core.somaxconn=1024
net.core.netdev_max_backlog=2048
fs.file-max=1000000
net.core.bpf_jit_enable=1


Updated Aug 2, 2017 to include extlinux.conf changes + use of TCP_BBR.

No comments:

Post a Comment