Monthly Archives: October 2019

OS X: disable Mission Control on top edge

In El Capitan Apple introduced a feature which opens Mission Cotrol as soon as you drag a window to the top edge of the screen. That is annoying at least to me. Therefore here is a possible fix:

Disable:

defaults write com.apple.dock mcx-expose-disabled -bool TRUE && killall Dock

Enable:

defaults delete com.apple.dock mcx-expose-disabled && killall Dock

Resize KVM guest’s raw volumes

After running virtual machines in KVM for some time, it might come in handy to be able to resize a KVM guest's raw volumes. In order to do so you first have to shutdown your VM for a while:

virsh destroy <guestname>

In order to add an additional 2 gig to your respective machine, you do the following:</guestname>

qemu-img resize <diskname>.img +2G

Now restart the machine:</diskname>

virsh start <guestname>

Then use fdisk inside the guest to make use of the new space:

fdisk /dev/vda

There, you delete the respective partition and immediately recreate it - with more space. Now restart the machine in order to let the kernel make note of the changes:

reboot

After a final resize you're able to make use of the sweet new space:

resize2fs /dev/vda1

Voila!