Skip to content

Commit

Permalink
typos and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
goffinet committed Jan 3, 2021
1 parent 40ab0e1 commit 580f6da
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 30 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,19 @@ But this is probably better to build by yourself your appliance with the `auto-i

Purposes : change RAM and vcpus, add block devices and network facilities

1. `add-memory.sh` : add RAM
2. `add-vcpu.sh` : set vcpus count
3. `add-bridge.sh` : add an isolated or ipv4 nat/ipv6 ula libvirt bridge
4. `add-nic.sh` : a new NIC on live guest to a bridged interface
5. `attach-nic.sh` : attach a live guest present NIC to a bridge
6. `detach-nic.sh` : detach a live guest from a bridge
7. `add-storage.sh` : attach an empty bit disk by GB size
8. `start_all.sh` : start all the defined guests
9. `destroy-and-undefine-all.sh` : destroy, undefine all the guests with storage removing
To assign public IPs on VMs hosted on Hetzner hosts see [Connect public IPv4 addresses, IPv4 and IPv6 subnets on Hetzner servers](README.hetzner.md).

- `add-memory.sh` : add RAM
- `add-vcpu.sh` : set vcpus count
- `add-bridge.sh` : add an isolated or ipv4 nat/ipv6 ula local libvirt bridge
- `add-bridge-l2.sh` : create a L2 bridge that connects a physical NIC
- `add-bridge-l3.sh` : create a L3 bridge to forward (Hetzner) IPv4 public ranges to your guests
- `add-nic.sh` : a new NIC on live guest to a bridged interface
- `attach-nic.sh` : attach a live guest present NIC to a bridge
- `detach-nic.sh` : detach a live guest from a bridge
- `add-storage.sh` : attach an empty bit disk by GB size
- `start_all.sh` : start all the defined guests
- `destroy-and-undefine-all.sh` : destroy, undefine all the guests with storage removing

## How-To

Expand Down
2 changes: 1 addition & 1 deletion add-bridge-l2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ check_parameters () {
if [ "$parameters" -eq 0 ] ; then
echo "Description : This script create a L2 bridge that connects a physical NIC"
echo "Usage : $0 <name> <interface name>"
echo "Example : '$0 internet enp2s0' or '$0 internet eth0'"
echo "Example : '$0 internet enp2s0'"
exit
fi
}
Expand Down
5 changes: 2 additions & 3 deletions add-bridge-l3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ parameters="$#"
path="/tmp"

error () {
echo "Description : This script create a L3 bridge to route Hetzner IPv4 public ranges to your VMs"
echo "Description : This script create a L3 bridge to forward Hetzner IPv4 public ranges to your VMs"
echo "Syntax : '$0 <name> <ip4|ip4_dhcp> <ipv4 network> <ipv4 netmask> <ipv4 gateway>'"
echo " <ivp4 gateway> is the ipv4 address of the root interface that"
echo " <ivp4 gateway> is the ipv4 address of the enp2s0 interface"
echo "Examples : '$0 hetzner1 ip4 5.9.214.208 255.255.255.248 5.9.156.152'"
echo " '$0 hetzner1 ip4_dhcp 5.9.214.208 255.255.255.248 5.9.156.152'"

exit
}

Expand Down
2 changes: 1 addition & 1 deletion add-guest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## Please check all the variables
# First parmater as name
name=$1
# Secund parameter image name avaible on "https://download.goffinet.org/kvm/"
# Secund parameter image name available on "https://download.goffinet.org/kvm/"
#imagename="centos7 bionic debian10"
which curl > /dev/null || ( echo "Please install curl" && exit )
imagename="$(curl -kqs https://download.goffinet.org/kvm/imagename)"
Expand Down
2 changes: 1 addition & 1 deletion add-memory.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi
guests_defined="$(virsh list --all --name)"
if grep -qvw "$guest" <<< ${guests_defined} ; then
echo "Please provide a live guest name : exit"
echo "Guests avaible :"
echo "Guests available :"
echo "$(virsh list --name)"
exit
fi
Expand Down
2 changes: 1 addition & 1 deletion add-nic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ interface=$(virsh net-dumpxml "${bridge}" | grep 'forward dev' | sed -n "s/^.*<f
if grep -qw "$interface" <<< $(ls /sys/class/net) ; then
mode="bridged"
fi
# Check if the bridge interface is avaible
# Check if the bridge interface is available
elif grep -qvw "$bridge" <<< $(ls /sys/class/net) ; then
echo "This interface ${bridge} is not available"
echo "Please create a valid bridge or choose between : "
Expand Down
2 changes: 1 addition & 1 deletion add-storage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi
guests_defined="$(virsh list --all --name)"
if grep -qvw "$guest" <<< ${guests_defined} ; then
echo "Please provide a live guest name : exit"
echo "Guests avaible :"
echo "Guests available :"
echo "$(virsh list --name)"
exit
fi
Expand Down
2 changes: 1 addition & 1 deletion add-vcpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi
guests_defined="$(virsh list --all --name)"
if grep -qvw "$guest" <<< ${guests_defined} ; then
echo "Please provide a live guest name : exit"
echo "Guests avaible :"
echo "Guests available :"
echo "$(virsh list --name)"
exit
fi
Expand Down
2 changes: 1 addition & 1 deletion archives/auto-centos7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ mirror=http://centos.mirrors.ovh.net/ftp.centos.org/7/os/x86_64
## and the name of your new domains between double quotes as arguments.
## 3. Look to your console and please read the logs.
## If the newly created domains already exist, the script ask you what to do with them.
## Assume that you have a local http server avaible
## Assume that you have a local http server available
## when you choose http kickstart installation
##
## What the script is doing for you ?
Expand Down
2 changes: 1 addition & 1 deletion archives/autovm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ mirror=http://$bridgeip4/repo
## and the name of your new domains between double quotes as arguments.
## 3. Look to your console and please read the logs.
## If the newly created domains already exist, the script ask you what to do with them.
## Assume that you have a local http server avaible
## Assume that you have a local http server available
## when you choose http kickstart installation
##
## What the script is doing for you ?
Expand Down
2 changes: 1 addition & 1 deletion archives/quick-launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## Please check all the variables
# First parmater as name
name=$1
# Secund parameter image name avaible on "https://download.goffinet.org/kvm/"
# Secund parameter image name available on "https://download.goffinet.org/kvm/"
# Image name : 'debian7', 'debian8', 'centos7', 'ubuntu1604', 'metasploitable', 'kali', 'arch'
#imagename="debian7 debian8 debian10 centos7 centos8 ubuntu1604 bionic metasploitable kali arch"
which curl > /dev/null || ( echo "Please install curl" && exit )
Expand Down
6 changes: 3 additions & 3 deletions attach-nic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ fi
guests_defined_live="$(virsh list --name)"
if grep -qvw "$guest" <<< ${guests_defined_live} ; then
echo "Please provide a live guest name : exit"
echo "Guests avaible :"
echo "Guests available :"
echo "$(virsh list --name)"
exit
fi
# Check if the bridge interface is avaible
# Check if the bridge interface is available
if grep -qvw "$bridge" <<< $(ls /sys/class/net) ; then
echo "This interface ${bridge} is not avaible"
echo "This interface ${bridge} is not available"
echo "Please create a valid bridge or choose between : "
echo $(ls /sys/class/net)
exit
Expand Down
2 changes: 1 addition & 1 deletion clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi
guests_defined="$(virsh list --all --name)"
if grep -qvw "$original" <<< ${guests_defined} ; then
echo "Please provide a defined guest name : exit"
echo "Guests avaible :"
echo "Guests available :"
echo "$(virsh list --all --name)"
exit
fi
Expand Down
2 changes: 1 addition & 1 deletion define-guest-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## Please check all the variables
# First parmater as name
name=$1
# Secund parameter image name avaible on "https://download.goffinet.org/kvm/"
# Secund parameter image name available on "https://download.goffinet.org/kvm/"
#imagename="centos7 bionic debian10"
which curl > /dev/null || ( echo "Please install curl" && exit )
imagename="$(curl -kqs https://download.goffinet.org/kvm/imagename)"
Expand Down
6 changes: 3 additions & 3 deletions detach-nic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ fi
guests_defined_live="$(virsh list --name)"
if grep -qvw "$guest" <<< ${guests_defined_live} ; then
echo "Please provide a live guest name : exit"
echo "Guests avaible :"
echo "Guests available :"
echo "$(virsh list --name)"
exit
fi
# Check if the bridge interface is avaible
# Check if the bridge interface is available
if grep -qvw "$bridge" <<< $(ls /sys/class/net) ; then
echo "This interface ${bridge} is not avaible"
echo "This interface ${bridge} is not available"
echo "Please create a valid bridge or choose between : "
echo $(ls /sys/class/net)
exit
Expand Down
2 changes: 1 addition & 1 deletion sparsify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi
guests_defined="$(virsh list --all --name)"
if grep -qvw "$name" <<< ${guests_defined} ; then
echo "Please provide a defined guest name : exit"
echo "Guests avaible : "
echo "Guests available : "
echo "$(virsh list --all --name)"
echo "Usage : $0 <guest name>"
exit
Expand Down

0 comments on commit 580f6da

Please sign in to comment.