This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.
Step 1 - Enable NBD on the Host
modprobe nbd max_part=8
| # Updated for Ruby 2.3 | |
| string_t = None | |
| def get_rstring(addr): | |
| s = addr.cast(string_t.pointer()) | |
| if s['basic']['flags'] & (1 << 13): | |
| return s['as']['heap']['ptr'].string() | |
| else: | |
| return s['as']['ary'].string() |
| # Change Java Runtime: | |
| sudo update-alternatives --config java | |
| # Delete Open-JDK | |
| sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\* | |
| # Change fonts - remove hinting: | |
| http://askubuntu.com/questions/32624/ugly-fonts-in-netbeans-how-can-i-make-it-use-the-system-font | |
| # Change RubyMine AntiAliasing first: |
| #!/bin/bash | |
| # This file is for iTerm2 users. | |
| # | |
| # Put this file in /usr/local/bin/iterm-cmd-click-emacsclient | |
| # | |
| # You'll need to do the following at command line... | |
| # $ defaults write com.googlecode.iterm2 SemanticHistoryHandler /usr/local/bin/iterm-cmd-click-emacsclient | |
| emacsclient -e "(find-file \"$1\")" "(goto-line $2)" |