28 lines
584 B
Bash
28 lines
584 B
Bash
#!/bin/bash
|
|
|
|
#VCS VIRT-BUILDER SCRIPT
|
|
|
|
#sudo apt update; sudo apt install libguestfs-tools
|
|
|
|
echo "FULL IMAGE FILE NAME:"
|
|
read name
|
|
#echo "HOSTNAME:"
|
|
#read hostname
|
|
#echo "FORMAT: [RAW | QCOW2]"
|
|
#read format
|
|
virt-builder -l
|
|
echo "BASE:"
|
|
read base
|
|
echo "PACKAGES:"
|
|
read pkgs
|
|
echo "FILE:"
|
|
read file
|
|
#echo "IMAGE USER:"
|
|
#read user
|
|
#echo "IMAGE PASSWORD:"
|
|
#read pw
|
|
echo "SET ROOT PASSWORD:"
|
|
read rpw
|
|
|
|
virt-builder $base --format qcow2 -o $name.qcow2 --network --install qemu-guest-agent,$pkgs --root-password $rpw --copy-in $file:/bin/ #--password $user:$pw #--hostname $hostname --update
|