jbontech / vm_templates_sh

Virtual machine templates (KVM/QEMU hybrid boot: BIOS+UEFI) using auto install methods and/or chroot install scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vm_templates

Virtual machine templates (KVM/QEMU hybrid boot: BIOS+UEFI) using auto install methods and/or chroot install scripts.

Installation

source code tarball download:

# [aria2c --check-certificate=false | wget --no-check-certificate | curl -kOL]

FETCHCMD='aria2c --check-certificate=false'

$FETCHCMD https://bitbucket.org/thebridge0491/vm_templates_sh/[get | archive]/master.zip

version control repository clone:

git clone https://bitbucket.org/thebridge0491/vm_templates_sh.git

Usage

to build virtual machine using auto install methods or chroot scripts:

# NOTE, relevant comments -- transfer file(s) ; run manual commands

[VOL_MGR=zfs] sh vminstall_auto.sh [<distro> [<guest>]]

sh vminstall_chroot.sh [<distro> [<guest>]]

build examples:

[VOL_MGR=zfs] sh vminstall_auto.sh [freebsd [freebsd-Release-zfs]]

sh vminstall_chroot.sh [freebsd [freebsd-Release-zfs]]

[optional] Vagrant option - (in running VM) add vagrant user:

sudo sh /root/init/<variant>/vagrantuser.sh

[optional] Vagrant option - (with VM shutdown) make box:

cd build/<guest> ; sh vmrun.sh box_vagrant <guest>

to update and execute shell provisioning scripts on running virtual machine:

tar -c init/common init/<variant> -C scripts <variant> |

ssh <user>@<ipaddr> "cat - > /tmp/scripts.tar"

ssh <user>@<ipaddr> <<-EOF

cd /tmp ; tar -xf scripts.tar ; mv <variant> scripts

sudo cp -r init scripts /root/

sudo sh /root/scripts/<script>.sh

EOF

provision example:

tar -c init/common init/freebsd -C scripts freebsd |

ssh packer@10.0.2.15 "cat - > /tmp/scripts.tar"

ssh packer@10.0.2.15 <<-EOF

cd /tmp ; tar -xf scripts.tar ; mv freebsd scripts

sudo cp -r init scripts /root/

sudo sh /root/scripts/upgradepkgs.sh

EOF

Author/Copyright

Copyright (c) 2020 by thebridge0491 <thebridge0491-codelab@yahoo.com>

License

Licensed under the Apache-2.0 License. See LICENSE for details.

About

Virtual machine templates (KVM/QEMU hybrid boot: BIOS+UEFI) using auto install methods and/or chroot install scripts

License:Other


Languages

Language:Shell 96.4%Language:Perl 2.1%Language:Lua 1.1%Language:HTML 0.4%