This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Instructions for working with QEMU image come from | |
# https://www.kumari.net/index.php/system-adminstration/49-mounting-a-qemu-image | |
1. Download image http://cloud-images.ubuntu.com/ | |
2. Install qemu, nbd-client | |
3. Load the module | |
sudo modprobe nbd max_part=8 | |
4. Connect image | |
sudo qemu-nbd --connect=/dev/nbd0 Downloads/xenial-server-cloudimg-amd64-disk1.img | |
5. Mount image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"syscall" | |
) | |
func main() { |