Thursday, February 01, 2024

Speeding up VirtualBox Windows clients -- disable nested virtualisation

I previously used Hyper-V to run Windows clients on a Windows host. That worked well until a networking setup that I needed stopped working. After a lot of trying to get Hyper-V to work as I needed it to, I finally gave up and tried to use VirtualBox (without the extensions). The networking setup I needed was straightforward but the Windows client was painfully slow. After many hours of trying many things, it turns out all I needed to do was disable Nested virtualization. Now that that's not enabled (I don't need virtual machines to run inside the Windows client), VirtualBox is about as fast as Hyper-V was. Much more usable now and I think maybe even less memory hungry than Hyper-V used to be. But I maybe wrong about the memory. I gave Hyper-V up to (through dynamic memory allocation) 6GB of RAM and it was fine. I don't see how to get the VirtualBox VM to use memory dynamically so I've given it 2GB of RAM. It's running my automated tests very well. I'm going to have to try giving it fewer CPUs (maybe just 2 or 3) and then run two or three VMs :-). The things we do for fun :-).

Monday, December 19, 2022

Saturday, May 29, 2021

Have running ssh sessions (and new sessions) keep working even with openvpn changing default route

 I installed openvpn on a remote server and had my ssh sessions break because the default route had been changed and so, packets sent to me (at client) were going out through the VPN and, presumably, either not landing at my computer or being rejected due to incorrect source address.

I paste below a solution which I COMPLETELY don't understand.  They do work though.  I just pasted them into /etc/rc.local

ip rule add from $(ip route get 1 | grep -Po '(?<=src )(\S+)') table 128
ip route add table 128 to $(ip route get 1 | grep -Po '(?<=src )(\S+)')/32 dev $(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)')
ip route add table 128 default via $(ip -4 route ls | grep default | grep -Po '(?<=via )(\S+)')

https://serverfault.com/a/918441

Friday, April 30, 2021

cssh font size

The default clusterssh font size on my big monitors was too small.  

To fix this:

On Ubuntu 18.04

  1. just edit ~/.clusterssh/config

  2. change terminal_font=[whatever] with 12x24.  This increases the font size but the window dimensions then become too big.  

  3. Also change the terminal_size.  That was 80x24 originally.  Changing that to 70x40 allows me to (along with terminal_font=12x24) have two cssh terminals on one landscape 1920x1080 monitor.  Since I usually have 4 terminals, that's perfect for 4 terminals on two landscape monitors with some extra space for the cssh dialog for typing into all the terminals at once.


I really should learn tmux though.  tmux is supposed to have reasonable cssh like functionality.  But I'm so used to screen commands I'm not looking forward to learning new keystrokes.

Wednesday, February 17, 2021

some jmeter conveniences

In jmeter I recently had reason to set these (can be in jmeter.properties or user.properties).

 

CookieManager.save.cookies=true
view.results.tree.max_results=0

 

The first is to have cookies be available as variables and the second is because (to save RAM, probably) jmeter GUI doesn't show everything when you load a jtl file. The second makes it show all results.

Friday, January 01, 2021

Apparmor and empty man pages on old kernels

 On my odroid HC4, the kernel is the stock 4.9.x from hardkernel.  I haven't gotten around to switching to mainline since I do like petitboot and don't want to have the little box connected to a monitor while figuring things out.  It does work as-is, just with some small issues.

For instance, man doesn't render man pages. 

https://bugs.launchpad.net/ubuntu/+source/man-db/+bug/1778684

The workaround is to disable apparmor for /usr/bin/man.  I should just upgrade the kernel, really.  But for now:

apt install apparmor-utils
aa-disable /usr/bin/man

Saturday, December 05, 2020

odroid hc4 and zfs

 The HC4 odroid images (official focal and meveric's armbian-buster (and I think toogood's images too) don't have zfs in the kernel (I think because zfs isn't in the mainline kernel either?)

Installing zfs-dkms fails because there's some incompatibility between zfs-dkms 0.7.12 in focal and buster.

I had a play with git clone and building openzfs master.  That correctly built the kernel module and importing the pool and running zpool and zfs-test all succeeded.

Meveric, however, has pointed me at:

apt install -t buster-backports zfs-dkms

Because

"I checked however on the ZFS DKMS module form Debian Buster and found the version that is in the default repository (version 0.7.12 of spl-dkms and zfs-dkms) are not compatible with Kernel 4.9 that we're using.
Luckily for you in buster-backports there's version 0.8.5 available and THAT is compatible with Kernel 4.9."

 Many thanks to Meveric for the assist.  While I could have continued with what I'd built from source, it's better to use the backported spl-dkms so that I can get future updates/fixes.

https://forum.odroid.com/viewtopic.php?p=313882#p313882