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
| package main | |
| import ( | |
| "compress/gzip" | |
| "io" | |
| "net/http" | |
| "strings" | |
| ) | |
| // Gzip Compression |
| # Ubuntu upstart file at /etc/init/ejabberd.conf | |
| respawn | |
| respawn limit 20 5 | |
| start on runlevel [2345] | |
| stop on runlevel [06] | |
| script | |
| exec start-stop-daemon --start --name ejabberd --user ejabberd --chuid ejabberd --exec /usr/local/sbin/ejabberdctl -- start |
| var MyApp = angular.module('MyApp'); | |
| MyApp.factory('msgBus', ['$rootScope', function($rootScope) { | |
| var msgBus = {}; | |
| msgBus.emitMsg = function(msg, data) { | |
| data = data || {}; | |
| $rootScope.$emit(msg, data); | |
| }; | |
| msgBus.onMsg = function(msg, func, scope) { | |
| var unbind = $rootScope.$on(msg, func); | |
| if (scope) { |
| ldap_server auth1 { | |
| url "ldap://vmcentos64:389/ou=Users,ou=Accounts,dc=acme,dc=com?cn?sub?(objectClass=*)"; | |
| binddn "cn=manager,dc=acme,dc=com"; | |
| binddn_passwd password; | |
| group_attribute cn; | |
| group_attribute_is_dn on; | |
| require valid_user; | |
| } | |
| # |
| -- a quick LUA access script for nginx to check IP addresses against an | |
| -- `ip_blacklist` set in Redis, and if a match is found send a HTTP 403. | |
| -- | |
| -- allows for a common blacklist to be shared between a bunch of nginx | |
| -- web servers using a remote redis instance. lookups are cached for a | |
| -- configurable period of time. | |
| -- | |
| -- block an ip: | |
| -- redis-cli SADD ip_blacklist 10.1.1.1 | |
| -- remove an ip: |