Giter VIP home page Giter VIP logo

vmbuilder's People

Contributors

francismunch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vmbuilder's Issues

Prune VM with SIGINT

If the process is not finished, ^C is issued, attempt to clean up (remove the VM and it's resources).

New Features

Here is some feature you can add to your script and some who can be updated ! (btw you did a great work! I tred to use Packer but it's less efficiant than this ;) ) :

TODO

  • VMID - ENTER TO CHOSE NEXT ID SHOWN
  • CLOUD-IMAGE : CHECK MD5 or SHA1 to confirm that you use the last current version
  • NETWORK INTERFACE - CHOSE HOW MANY NETWORK INTERFACE TO ADD
  • IP CONFIGURATION - CONFIGURE VMBR PER INTERFACES
  • SERIAL0 - ADD SERIAL0 (Already on but I think you can ask if people want it)
  • VM PROTECTION - ADD PROTECTION ON VM
  • TABLET MODE - DISABLE TABLET MODE (USB Tablet Device
  • Disabling the USB tablet device in windows VMs can reduce idle CPU usage and reduce context switches. This can be done on the GUI. You can use vmmouse to get the pointer in sync (load drivers inside your VM). [1] )
  • BOOT STARTUP - ENABLE START AT BOOT (Already on but I think you can ask if people want it)
  • TEMPLATE - CREATE TEMPLATE
  • VLAN - FORCE NUMBER 0-4096
  • VM SPECS - ADD SOCKETS
  • FORCE SSH KEY AUTHENTICATION - DONT DISPLAY IF ADD SSH KEY NO

FEATURES

  1. BOOT AT START
  2. PROTECT VM
  3. TEMPLATE CREATION

BOOT AT START

while true
do
 read -r -p "BOOT AT START [Y/n]: " BOOTATSTART

 case $BOOTATSTART in
     [yY][eE][sS]|[yY])
 break
 ;;
     [nN][oO]|[nN])
 break
        ;;
     *)
 echo "INVALID INPUT, PLEASE ENTER [Y/n]"
 ;;
 esac
done


if [[ "$BOOTATSTART" =~ ^[Yy]$ || "$BOOTATSTART" =~ ^[yY][eE][sS] ]]
then
    qm set "$VMID" --onboot 1
else
    qm set "$VMID" --onboot 0
fi

PROTECT VM

while true
do
 read -r -p "PROTECT VM [Y/n]: " PROTECTVM

 case $PROTECTVM in
     [yY][eE][sS]|[yY])
 break
 ;;
     [nN][oO]|[nN])
 break
        ;;
     *)
 echo "INVALID INPUT, PLEASE ENTER [Y/n]"
 ;;
 esac
done

if [[ "$PROTECTVM" =~ ^[Yy]$ || "$PROTECTVM" =~ ^[yY][eE][sS] ]]
then
    qm set "$VMID" --protection 1
else
    qm set "$VMID" --protection 0
fi

TEMPLATE CREATION

while true
do
 read -r -p "TEMPLATE VM [Y/n]: " TEMPLATEVM

 case "$TEMPLATEVM" in
     [yY][eE][sS]|[yY])
 break
 ;;
     [nN][oO]|[nN])
 break
        ;;
     *)
 echo "INVALID INPUT, PLEASE ENTER [Y/n]"
 ;;
 esac
done

if [[ "$TEMPLATEVM" =~ ^[Yy]$ || "$TEMPLATEVM" =~ ^[yY][eE][sS] ]]
then
    qm template "$VMID"
fi

Using/reading config file

Hi,

It would be wonderful if the script could read a config file (yaml?) with all the variables already set.

ENV variables

In each read statement, if env is set, skip the read statement (and if needed, set the value from env, as varname differs).

Serial console?

I am trying to figure out where the serial console is attached but haven't found it yet.

If you remove after creation and set display to default, VM won't boot.

ANy suggestions?

Network issue

Hello, when me installed script i do all steps. And on CentOS7, Debian 10 i got issue
Network not work, i set Static IP and working gateway. And cloudimage no reaction of changes, password not setting and etc.

snippets directory not exist

./vmbuilder.sh: line 595: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 596: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 597: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 598: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 599: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 600: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 601: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 603: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 604: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 605: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 606: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 607: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 608: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 609: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 612: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 613: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory
./vmbuilder.sh: line 614: /mnt/pve/pve-cluster/snippets/10003.yaml: No such file or directory

insert mkdir -p $snippetstorage to current line 594

New fork

I'd hate to create spam like this, but if anyone is still interested in using this script, I've forked and updated it a fair bit with newer distributions and improvements

github.com/pascal48/vmbuilder-updated

It's been almost a year since any updates on this repo have been made, so I think its safe to assume life caught up with francismunch or something like that.

non-local storage barely (not) implemented

   qm set $VMID --scsihw virtio-scsi-pci --scsi0 $vmstorage:vm-$VMID-disk-0,discard=on

It's

   qm set $VMID --scsihw virtio-scsi-pci --scsi0 $vmstorage:$VMID/vm-$VMID-disk-0.raw,discard=on

..still generally hardcoding this stuff isn't great, but I guess it works

Add auto start option?

Awesome script! Could you add an option to ask if you want the VM to auto start after creation?

nonsense 5-7s

echo "*** Taking a 5-7 seconds to gather information ***"

it's a bit confusing, don't print anything at all

also.. the process should be initiated on script run, with & to place it to bg. Then for the time it is needed, wait for any bg processes to complete.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.