Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Miroslav Safr <Miroslav.Safr@gmail.com>
- Loading branch information
0 parents
commit 81bda10
Showing
10 changed files
with
1,145 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: rvmb - Rapid VM builder | ||
author: Miroslav Safr <miroslav.safr@gmail.com> | ||
web: http://safrm.net/projects/rvmb | ||
description: Rapid VM builder for qemu-kvm based portable VMs | ||
|
||
|
||
content: | ||
rvmb .................. main script | ||
install.sh ............ installation (from source) script | ||
|
||
Usage - full: | ||
#check available targets | ||
$ rvmb list-targets | ||
|
||
#create and install VM | ||
#there can be passed own configuration file based on teplate (-t <file>) | ||
#or created clone of the same VM configuration (-c <number>) | ||
$ rvmb -t ubuntu-12.04-x86_64-mini | ||
|
||
#.. manual steps during installation | ||
|
||
#running the VM | ||
$ rvmb run-vm | ||
|
||
#connect running VM | ||
$ rvmb connect-vm-ssh | ||
|
||
|
||
Usage - try live iso : | ||
$ rvmb run-live-iso -t ubuntu-12.04-x86_64-desktop | ||
|
||
Tested targets: | ||
ubuntu-12.04-i386-desktop | ||
ubuntu-12.04-x86_64-desktop | ||
ubuntu-12.04-x86_64-mini | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> | ||
<refentry id="rvmb.1"> | ||
|
||
<refentryinfo> | ||
<title> Rapid VM builder for qemu-kvm based portable VMs</title> | ||
<author> | ||
<personname><firstname>Miroslav</firstname><surname>Safr</surname></personname> | ||
<email>miroslav.safr@gmail.com</email> | ||
<personblurb><para>Author and maintainer</para></personblurb> | ||
</author> | ||
<date>2014-06-10</date> | ||
<productnumber>NA</productnumber> | ||
<productname>rvmb</productname> | ||
</refentryinfo> | ||
|
||
<refmeta> | ||
<refentrytitle>rvmb</refentrytitle> | ||
<manvolnum>1</manvolnum> | ||
</refmeta> | ||
|
||
|
||
<refnamediv> | ||
<refname>rvmb</refname> | ||
<refpurpose> Rapid VM builder for qemu-kvm based portable VMs</refpurpose> | ||
</refnamediv> | ||
|
||
<refsynopsisdiv> | ||
<cmdsynopsis> | ||
<command>rvmb [COMMAND] [OPTIONS]...</command> | ||
<arg choice="opt">-h --help</arg> | ||
<arg choice="opt">-v --verbose</arg> | ||
<arg choice="opt">-d --debug</arg> | ||
<arg choice="opt">-t --target <conf-file></arg> | ||
<arg choice="opt">-c --clone <number></arg> | ||
<arg choice="opt">-m --memory <kB></arg> | ||
<arg choice="opt">-V --version</arg> | ||
</cmdsynopsis> | ||
</refsynopsisdiv> | ||
|
||
<refsect1><title>DESCRIPTION</title> | ||
<para> | ||
Rapid VM builder for qemu-kvm based portable VMs. As a working directory is taked current dir. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>COMMAND</title> | ||
<para> | ||
Specify step execution: | ||
list-targets | ||
prepare-host create-disk download-iso install-base customize-image | ||
run-vm connect-ssh connect-xrdp | ||
</para> | ||
<para> | ||
If not specified usign automatic detection: | ||
empty=install, | ||
image installed=run-vm | ||
running=connect-ssh | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>OPTIONS</title> | ||
<variablelist> | ||
<varlistentry><term>-h --help</term> | ||
<listitem> | ||
<para> | ||
Print help text to the screen. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry><term>-v --verbosee</term> | ||
<listitem> | ||
<para> | ||
Prints more output. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry><term>--d --debug</term> | ||
<listitem> | ||
<para> | ||
Prints also debug output. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry><term>-t --target <conf-file></term> | ||
<listitem> | ||
<para> | ||
Select target config file. It can be a full path to the file or name of the file in targets dir (list-targets). | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry><term>-c --clone <number></term> | ||
<listitem> | ||
<para> | ||
Cloning increment number (adds postfix, increases ports etc.). so there can be created more VMs from one configuration file. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry><term>-m --memory <kB></term> | ||
<listitem> | ||
<para> | ||
Uses specific VM memory amount (in kB). | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry><term>-V --version</term> | ||
<listitem> | ||
<para> | ||
Prints version of the scripts. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1><title>SEE ALSO</title> | ||
<para> | ||
<ulink url="http://safrm.net/projects/rvmb"/> | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>AUTHOR</title> | ||
<para> | ||
Miroslav Šafr <miroslav.safr@gmail.com> | ||
</para> | ||
</refsect1> | ||
<refsect1> | ||
<title>LICENSE</title> | ||
<para> | ||
LGPL2 | ||
</para> | ||
</refsect1> | ||
</refentry> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> | ||
<refentry id="rvmb.1"> | ||
|
||
<refentryinfo> | ||
<title> Rapid VM builder for qemu-kvm based portable VMs</title> | ||
<author> | ||
<personname><firstname>Miroslav</firstname><surname>Safr</surname></personname> | ||
<email>miroslav.safr@gmail.com</email> | ||
<personblurb><para>Author and maintainer</para></personblurb> | ||
</author> | ||
<date>20140611_0757</date> | ||
<productnumber></productnumber> | ||
<productname>rvmb</productname> | ||
</refentryinfo> | ||
|
||
<refmeta> | ||
<refentrytitle>rvmb</refentrytitle> | ||
<manvolnum>1</manvolnum> | ||
</refmeta> | ||
|
||
|
||
<refnamediv> | ||
<refname>rvmb</refname> | ||
<refpurpose> Rapid VM builder for qemu-kvm based portable VMs</refpurpose> | ||
</refnamediv> | ||
|
||
<refsynopsisdiv> | ||
<cmdsynopsis> | ||
<command>rvmb [COMMAND] [OPTIONS]...</command> | ||
<arg choice="opt">-h --help</arg> | ||
<arg choice="opt">-v --verbose</arg> | ||
<arg choice="opt">-d --debug</arg> | ||
<arg choice="opt">-t --target <conf-file></arg> | ||
<arg choice="opt">-c --clone <number></arg> | ||
<arg choice="opt">-m --memory <kB></arg> | ||
<arg choice="opt">-V --version</arg> | ||
</cmdsynopsis> | ||
</refsynopsisdiv> | ||
|
||
<refsect1><title>DESCRIPTION</title> | ||
<para> | ||
Rapid VM builder for qemu-kvm based portable VMs. As a working directory is taked current dir. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>COMMAND</title> | ||
<para> | ||
Specify step execution: | ||
list-targets | ||
prepare-host create-disk download-iso install-base customize-image | ||
run-vm connect-ssh connect-xrdp | ||
</para> | ||
<para> | ||
If not specified usign automatic detection: | ||
empty=install, | ||
image installed=run-vm | ||
running=connect-ssh | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>OPTIONS</title> | ||
<variablelist> | ||
<varlistentry><term>-h --help</term> | ||
<listitem> | ||
<para> | ||
Print help text to the screen. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry><term>-v --verbosee</term> | ||
<listitem> | ||
<para> | ||
Prints more output. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry><term>--d --debug</term> | ||
<listitem> | ||
<para> | ||
Prints also debug output. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry><term>-t --target <conf-file></term> | ||
<listitem> | ||
<para> | ||
Select target config file. It can be a full path to the file or name of the file in targets dir (list-targets). | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry><term>-c --clone <number></term> | ||
<listitem> | ||
<para> | ||
Cloning increment number (adds postfix, increases ports etc.). so there can be created more VMs from one configuration file. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry><term>-m --memory <kB></term> | ||
<listitem> | ||
<para> | ||
Uses specific VM memory amount (in kB). | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry><term>-V --version</term> | ||
<listitem> | ||
<para> | ||
Prints version of the scripts. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1><title>SEE ALSO</title> | ||
<para> | ||
<ulink url="http://safrm.net/projects/rvmb"/> | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>AUTHOR</title> | ||
<para> | ||
Miroslav Šafr <miroslav.safr@gmail.com> | ||
</para> | ||
</refsect1> | ||
<refsect1> | ||
<title>LICENSE</title> | ||
<para> | ||
LGPL2 | ||
</para> | ||
</refsect1> | ||
</refentry> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/sh | ||
#Rapid VM builder - http://safrm.net/projects/rvmb | ||
#author: Miroslav Safr <miroslav.safr@gmail.com> | ||
BINDIR=/usr/bin | ||
COMPLETION_DIR=/etc/bash_completion.d | ||
SHAREDIR=/usr/share | ||
MANDIR=/usr/share/man | ||
|
||
#root check | ||
USERID=`id -u` | ||
[ $USERID -eq "0" ] || { | ||
echo "I cannot continue, you should be root or run it with sudo!" | ||
exit 0 | ||
} | ||
|
||
#automatic version | ||
if command -v appver 1>/dev/null 2>&1; then . appver; else APP_SHORT_VERSION=NA ; APP_FULL_VERSION_TAG=NA ; APP_BUILD_DATE=`date +'%Y%m%d_%H%M'`; fi | ||
#test | ||
for TEST in $( grep -r -l -h --exclude-dir=.git --exclude-dir=test "#\!/bin/sh" . ) | ||
do | ||
sh -n $TEST | ||
if [ $? != 0 ]; then | ||
echo "syntax error in $TEST, exiting.." | ||
exit 1 | ||
fi | ||
done | ||
|
||
#update documentation | ||
jss-docs-update ./doc | ||
|
||
mkdir -p -m 0755 $BINDIR | ||
install -m 0777 -v ./rvmb $BINDIR/ | ||
sed -i".bkp" "1,/^VERSION=/s/^VERSION=.*/VERSION=$APP_FULL_VERSION_TAG/" $BINDIR/rvmb && rm -f $BINDIR/rvmb.bkp | ||
sed -i".bkp" "1,/^VERSION_DATE=/s/^VERSION_DATE=.*/VERSION_DATE=$APP_BUILD_DATE/" $BINDIR/rvmb && rm -f $BINDIR/rvmb.bkp | ||
|
||
|
||
TARGETS=`find ./targets -type f` | ||
mkdir -p -m 0755 $SHAREDIR/rvmb/targets | ||
install -m 755 $TARGETS $SHAREDIR/rvmb/targets | ||
|
||
mkdir -p -m 0755 $COMPLETION_DIR | ||
install -m 0777 -v ./rvmb_completion $COMPLETION_DIR/ | ||
|
||
mkdir -p -m 0644 $MANDIR/man1 | ||
install -m 644 ./doc/manpages/rvmb.1 $MANDIR/man1 | ||
|
Oops, something went wrong.