> "5" + "1"
> "5" - "1"
i moved the blog (which is more of an archive of the good ol’ times these days) to a new server. Lets see if everyhting still works . . .
Really nice graphic novel about how to learn coding.
If you want to use a pci device in a vm, you first have to detach it from the host. List the devices and look for the one you want to use in the vm:
virsh nodedev-list --tree
In my case (CentOS7) I needed to enable iommu in order for this to work. This involves adding a kernel parameter:
kpath=`grubby --default-kernel` grubby --update-kernel=$kpath --args="intel_iommu=on” cat /proc/cmdline
After the reboot, /proc/cmdline should now include the iommu flag. Also check whether all the needed modules are loaded, in my case these are:
You can then detach the pci device:
virsh nodedev-dettach pci_0000_05_00_1
I then used virt-manager, powered off the vm, and added the “Physical Host Device”.
trying to start virt-manager as a normal user will yield a “Unable to open a connection…” message. To fix this, we need to change access permissions for libvirtd.
echo "unix_sock_group = \"libvirt\" unix_sock_rw_perms = \"0770\" auth_unix_rw = \"none\" ">>/etc/libvirt/libvirtd.conf
We also jneed to create the group “libvirt” we just set:
groupadd -g $GID libvirt; usermod -a -G libvirt $USER
Be sure to set $GID and $USER correctly.
A restart of the daemon should then do the trick:
service libvirtd stop; service libvirtd start
if virt-manager the shows only squares instead of letters, install the necessary fonts:
yum -y groupinstall "Fonts"
Enough word already on all channels, here’s a short one-liner to check which procs are still using the vulnerable old libs after the upgrade:
sudo lsof -n | grep ssl | grep DEL
Oh, and if you want to test wether a site is still vulnerable: https://gist.github.com/takeshixx/10107280
Time to revoke all those lingering server certs . . .
the pasteboard tools do not work in tmux on a mac. But there is a tool to fix this (of course ^^):
brew install reattach-to-user-namespace
Then, in your .tmux.conf, add this:
set-option -g default-command "reattach-to-user-namespace -l zsh"
– more info on how to configure can be fiound here: https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/blob/master/Usage.md
After restarting your tmux server, pbcopy and pbpaste should work again.
trying to change my login shell to zsh using the zsh built with homebrew i faced a small issue as OS X claimed:
chsh: /usr/local/bin/zsh: non-standard shell
The solution was to add the shell to the “approved” list:
echo "/usr/local/bin/zsh" >/etc/shells
The a simple
chsh -s /usr/local/bin/zsh will do the trick.
a rather handy little helper is simply called “pv” – pipe view. I mainly use it when copying vms or lots of small files:
tar cf - ./src | pv --timer --rate --average-rate --bytes | ssh machine tar xpf - -C /dst
which then prints something like this:
4.54GiB 0:06:55 [11.2MiB/s] [11.2MiB/s]
pv can also be used to set a rate limit to the transfer using “-L 1m” to restrict the bandwidth to 1 MB/s. For the Mac users out there – homebrew has knows “pv”.