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
<?xml version="1.0" encoding="UTF-8"?> | |
<project basedir="." default="package" name="PROJECT_NAME"> | |
<!-- | |
This script assumes: | |
1) CATALINA_HOME environment variable points to tomcat's directory | |
2) Following Folder Structure | |
./ (project root) | |
|- src/ (project.src.dir - source folder) | |
|- build/ | |
| |- classes/ (project.classes.dir) |
#!groovy | |
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
def label = "mypod-${UUID.randomUUID().toString()}" | |
podTemplate(label: label, yaml: """ | |
spec: | |
containers: | |
- name: mvn | |
image: maven:3.3.9-jdk-8 |
import org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval | |
ScriptApproval scriptApproval = ScriptApproval.get() | |
scriptApproval.pendingScripts.each { | |
scriptApproval.approveScript(it.hash) | |
} | |
/* Script to clear script approval | |
$JENKINS_HOME/init.groovy.d/disable-script-security.groovy: | |
*/ |