Tuesday, January 14, 2020

vagrant virtualbox libvirt vs me

A note about vagrant and virtualbox running on hyper-visors that run libvirt (KVM/qemu).

In my setup, I run libvirt on my workstation and run multiple KVMs.
For some tutorials, I needed to be able to run vagrant. Vagrant has a plugin for libvirt, but unfortunately it seems like almost no boxes (I was looking for bento-boxes) support the libvirt provider.

Since these boxes I need to run additionally for this tutorial are rather small and not very busy, I decided to run them without hardware acceleration. This has it's down-sides of course - SLOW, but I don't mind.

To tell vagrant that you do want to run the virtualbox provider without hardware acceleration add a section like this to your Vagrantfile:

 config.vm.provider "virtualbox" do |v|
    v.customize ["modifyvm", :id, "--hwvirtex", "off"]

Tuesday, May 1, 2018

Changing SIM card on NTT DOCOMO

Quick note on changing/activating a new SIM card on NTT Docomo...

...  when switching to a new phone

So I changed my "Smart Phone" from nasty domestic to nasty Korean brand.
I ordered everything through the Docomo Online shop, which was a challenge by itself (J-IT Mess).
 The new phone arrived with a new SIM in the right physical form factor (Nano), I thought there would be some kind of automatic or semi-automatic switch-over, but apparently that was not the case.
 I tried my luck reading through the instructions on how to do this online, but I could not get this figured out. I cannot see any point in the "Online Contract Change" or however one would translate this.

After calling support, all that needed to be done was:
  1. Call 1580 from the new phone (which has the new SIM inserted obviously).
  2. Then enter the Network-Anshin-Bango followed by #-sign. 
  3. Then confirm with '1' and '#' and voila - done. 
Beats me, why they do not put that in the huge mess of various instructions.
So maybe this helps somebody.

Saturday, May 23, 2015

joining mov files from drive recorder

Note to my self - to join mov files from my drive recorder use ffmpeg like so:

  1. Create a text file with the imput files like so:
    file 'REC_20150429_162028A.mov'
    file 'REC_20150429_162228A.mov'
  2. run ffmpeg:
  3. ffmpeg -f concat -i input.txt -c copy output.mp4

Tuesday, March 12, 2013

trouble building oprofile from devtoolset1.1

Had a bit of trouble the other day building oprofile from devtoolset 1.1.

Google didn't find me anything that helped right out of the box, so in case you get:

RPM build errors:
    File not found: /var/tmp/devtoolset-1.1-oprofile-root/opt/rh/devtoolset-1.1/root/usr/bin/oprof_start

when trying to build devtoolset-1.1-oprofile-0.9.7-6.el5.src.rpm on RHEL5/CentOS5 here is what I ended up doing:

--- oprofile.spec       2013-03-13 09:50:07.730025826 +0900
+++ oprofile.spec.bbh   2013-03-13 09:49:52.557940097 +0900
@@ -124,6 +124,9 @@
 --mandir=%{_mandir} \
 --infodir=%{_infodir} \
 --enable-gui=%{qt_ver} \
+%if 0%{?rhel} < 6
+--with-qt-dir=/usr/lib64/qt-3.3 \

 make CFLAGS="%{optflags}"

Sunday, May 13, 2012

Solaris and libcrypt

Solaris 10 and libcrypt

As a reminder to myself, when you need to build something on Solaris and you get the following error:
fatal: libcrypt_d.so.1: open failed: No such file or directory

Then you need to install the Solaris 10 Encryption Kit (link)
File: sol-10-encrypt-GA-iso.zip

Just install the 3 packages from the iso and install them.

Sunday, February 19, 2012

xubuntu no window titles etc

On the kids laptop the Xubuntu session was seriously broken. Of course it being the kids laptop it's a bit mess anyway.
So I try to fix it - because it's *urgent* - they want to use tuxpaint. After moving and fiddling with the ~/.config directory and try one or two other things, it turns out it is as easy as removing the session cache.

rm -rf ~/.cache/sessions/*

Wednesday, December 7, 2011

P4 and return codes

This just hit me.

>cat test.sh
/usr/local/bin/p4 sync -n
echo "Returncode $rc"

>cat test2
# \
exec tclsh "$0" "$@"
set rc [catch {exec -- /usr/local/bin/p4 sync -n} out]
puts "Return code: \"$rc\""
puts "out: \"$out\""

Return code: "1"
out: "File(s) up-to-date."

File(s) up-to-date.
Returncode 0

>/usr/local/bin/p4 sync -n
File(s) up-to-date.
>echo $?

>/usr/local/bin/p4 -s sync -n
error: File(s) up-to-date.
exit: 0

P4 knowledge base article regarding this:

"In general, you should not rely on a command exiting non-zero on "failure". Instead, use the global -s flag to help interpret the command output -- and parse that output in your scripts. Possible tags with the -s flag include info:, info1:, info2:, error:, and text:"

My kangaroo rating for this:
 [x] not funny!