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
#!/usr/bin/env python | |
""" | |
Print (and write to JSON file) system information in a cross-platform manner. | |
Output contains information about platform, BIOS, CPU, memory, disk, GPU, network, peripheral devices, installed | |
packages, motherboard and users. | |
This script heavily relies on psutil and some other bash/powershell commands. See requirements.txt for dependency list. |
<details> <summary>How do I dropdown?</summary> <br> This is how you dropdown.
#!/bin/zsh -e | |
cd ~/tmpfs | |
mkdir -p .lxc-root .lxc-data/etc .lxc-data/home/lilydjwg/{.vim,.cache} .lxc-work | |
sudo GDK_DPI_SCALE=$GDK_DPI_SCALE zsh -e - <<'EOF' | |
modprobe overlay | |
mountpoint .lxc-root || mount -t overlay -o lowerdir=/,upperdir=$PWD/.lxc-data,workdir=$PWD/.lxc-root overlayfs $PWD/.lxc-root | |
# .lxc-root/etc/resolv.conf is protected |
#!/bin/bash | |
# You must accept the Oracle Binary Code License | |
# http://www.oracle.com/technetwork/java/javase/terms/license/index.html | |
# usage: get_jdk.sh <ext> <jdk_version> | |
# ext: rpm | |
# jdk_version: default 8 | |
ext=rpm | |
jdk_version=8 |
Let's say you have an iOS project, and you want to use some external library, like AFNetworking. How do you integrate it?
Add the project to your repo:
git submodule add [email protected]:AFNetworking/AFNetworking.git Vendor/AFNetworking
or something to that effect.
Simple way to setup an arm chroot for building packages for your arm devices. This is an alternative to cross-compiling where you are limited to only linking against the libs in your toolchain.
You can store the chroot wherever you like. I choose to store it in a disk-image which I mount to my filesystem.
#!/bin/bash | |
el_version="6" | |
kernel_major="2.6.32" | |
kernel_minor="279.5.1" | |
vz_major="042stab061" | |
vz_minor=".2" | |
echo "Fetching OpenVZ Repo..." | |
cd /etc/yum.repos.d |
Get the Release.key | |
https://getfedora.org/keys/obsolete.html | |
rpm --import /tmp/Release.key | |
or | |
rpm --import https://getfedora.org/static/FB4B18E6.txt | |
Enable the Fedora19 repo (NOTE: obsolete/archived) | |
vi /etc/yum.repos.d/f19.repo |
Occasionally we will deploy a virtual instance into our KVM infrastructure and realize after the fact that we need more local disk space available. This is the process we use to expand the disk image. This process assumes the following:
This process will work with either a qcow2
or raw
disk image. For