add metadata files
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
b108d836ff
commit
bf00263bc5
9 changed files with 206 additions and 5 deletions
5
agent.sh
5
agent.sh
|
|
@ -26,6 +26,7 @@ function start_vm {
|
|||
DEFINE_string 'vm_name' '-' 'VM NAME' 'm'
|
||||
DEFINE_string 'vm_ip' '-' 'VM CIDR' 'p'
|
||||
DEFINE_string 'volume_id' '-' 'Volume backend file' 'o'
|
||||
DEFINE_string 'ssh_key' '-' 'pub ssh Key' 'k'
|
||||
DEFINE_boolean 'dryrun' false 'Enable dry-run mode' 'd'
|
||||
|
||||
FLAGS "$@" || exit $?
|
||||
|
|
@ -52,14 +53,14 @@ function start_vm {
|
|||
print_in_color "${COLOR_SYAN}" " name: ${FLAGS_vm_name}"
|
||||
print_in_color "${COLOR_SYAN}" " ip: ${vm_ip}"
|
||||
print_in_color "${COLOR_SYAN}" " volume backing file: ${FLAGS_volume_id}"
|
||||
print_in_color "${COLOR_SYAN}" " tap: to generate"
|
||||
print_in_color "${COLOR_SYAN}" " sshkey: ${FLAGS_ssh_key}"
|
||||
print_in_color "${COLOR_SYAN}" "#############################################"
|
||||
echo
|
||||
echo
|
||||
|
||||
create_vpc "${FLAGS_vpc_name}"
|
||||
create_subnet "${FLAGS_vpc_name}" "${FLAGS_subnet_name}" "${FLAGS_vxlan_id}" "${local_ip}" "${gateway_ip}" "${subnet}"
|
||||
qemu_start_vm "${FLAGS_vm_ip}" "${FLAGS_subnet_name}" "${FLAGS_vpc_name}" "${FLAGS_vm_name}" "${FLAGS_volume_id}"
|
||||
qemu_start_vm "${FLAGS_vm_ip}" "${FLAGS_subnet_name}" "${FLAGS_vpc_name}" "${FLAGS_vm_name}" "${FLAGS_volume_id}" "${FLAGS_ssh_key}" "${FLAGS_gateway_ip}"
|
||||
}
|
||||
|
||||
function stop_vm {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue