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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
#!/bin/bash | |
# Convert Markdown to Wordpress blogging format | |
# Required program(s) | |
req_progs=(ascii2uni pandoc) | |
for p in ${req_progs[@]}; do | |
hash "$p" 2>&- || \ | |
{ echo >&2 " Required program \"$p\" not installed."; exit 1; } | |
done |
# save this file in /etc/default/unicorn_app | |
USER=app_user | |
APP_ROOT=/srv/app | |
RVM_STRING=2.2.4@app_gemset | |
RACK_ENV=production | |
UNICORN_OPTS="-D -c /srv/app/shared/config/unicorn.rb -E production" | |
DAEMON=unicorn |