Browse Source

fixed default subtype creation to use ssh management and max 22 ports, changed ram to 2GB as recommended by Arista

master
Sebastian Rieger 7 years ago
parent
commit
27fd3d25cd
  1. 49
      create-arista-veos-image/create-arista-veos-image.sh
  2. 39
      create-arista-veos-image/dynamic-subtype-vEOS.json

49
create-arista-veos-image/create-arista-veos-image.sh

@ -14,11 +14,12 @@
# V1.4 support for variable VEOS image sizes (as requested by @Jade_Deane to use custom VEOS images)
# V1.4.1 fixed check for existing images
# V1.5 fixed detection of missing loop files for Ubuntu 16.04 in VIRL >=1.3, added default subtype creation
# V1.51 fixed default subtype creation to use ssh management and max 22 ports, changed ram to 2GB as recommended by Arista
# usage
if [ ! $# -eq 3 ] ; then
echo -e "usage: $0 <Aboot-veos-serial-version.iso> <vEOS-version.vmdk> <new glance image name>, e.g.:\n"
echo "$0 Aboot-veos-serial-2.0.8.iso vEOS-4.13.4F.vmdk vEOS"
echo "$0 Aboot-veos-serial-8.0.0.iso vEOS-lab-4.16.9M.vmdk vEOS"
exit -1
fi
@ -288,12 +289,21 @@ glance image-create --container-format bare --disk-format qcow2 --visibility pub
--property hw_vif_model=e1000 --property hw_cdrom_type=ide --property release="$GLANCE_IMAGE_RELEASE" --property subtype=IOSv --property config_disk_type=disk
# create default flavor
CHECKING_FOR_EXISTING_FLAVOR=$(nova flavor-show $GLANCE_IMAGE_NAME.tiny 2>&1)
if [ $? == 1 ]; then
echo "Creating default flavor $GLANCE_IMAGE_NAME.tiny..."
echo "==========================================================="
nova flavor-create --is-public true $GLANCE_IMAGE_NAME.tiny auto 1024 0 1
else
echo "Default flavor $GLANCE_IMAGE_NAME.tiny already exists..."
fi
CHECKING_FOR_EXISTING_FLAVOR=$(nova flavor-show $GLANCE_IMAGE_NAME.small 2>&1)
if [ $? == 1 ]; then
echo "Creating default flavor $GLANCE_IMAGE_NAME.small..."
echo "==========================================================="
nova flavor-create --is-public true $GLANCE_IMAGE_NAME.small auto 1024 0 1
nova flavor-create --is-public true $GLANCE_IMAGE_NAME.small auto 1536 0 1
else
echo "Default flavor $GLANCE_IMAGE_NAME.small already exists..."
fi
@ -312,24 +322,25 @@ cat << EOF > dynamic-subtype-$GLANCE_IMAGE_NAME.json.default
{
"dynamic-subtypes": [
{
"plugin_base": "generic",
"device_type": "switch",
"plugin_desc": "Arista vEOS",
"cli_protocol": "ssh",
"plugin_name": "$GLANCE_IMAGE_NAME",
"cli_serial": 1,
"plugin_desc": "Arista vEOS",
"baseline_image": "$GLANCE_IMAGE_NAME",
"hw_ram": 1024,
"hw_vm_extra": "",
"interface_wrap": 7,
"config_disk_type": "disk",
"interface_pattern": "Ethernet{0}",
"gui_visible": true,
"config_file": "/veos_config.txt",
"interface_first": 1,
"gui_icon": "iosvl2",
"plugin_base": "generic",
"vnc_available": false,
"interface_management": "Management1",
"interface_range": 7,
"baseline_flavor": "$GLANCE_IMAGE_NAME.medium"
"cli_serial": 1,
"interface_range": 22,
"gui_visible": true,
"interface_pattern": "Ethernet{0}",
"baseline_image": "$GLANCE_IMAGE_NAME",
"config_disk_type": "disk",
"hw_ram": 2048,
"hw_vm_extra": "",
"gui_icon": "iosvl2",
"config_file": "/veos_config.txt",
"interface_first": 1,
"deprecated_use": "",
"baseline_flavor": "$GLANCE_IMAGE_NAME.medium",
"interface_management": "Management1"
}
]
}

39
create-arista-veos-image/dynamic-subtype-vEOS.json

@ -1,24 +1,25 @@
{
"dynamic-subtypes": [
{
"cli_protocol": "ssh",
"gui_icon": "iosvl2",
"plugin_desc": "Arista vEOS",
"interface_first": 1,
"baseline_flavor": "vEOS.medium",
"plugin_base": "generic",
"interface_management": "Management1",
"interface_pattern": "Ethernet{0}",
"config_file": "/veos_config.txt",
"hw_ram": 1024,
"deprecated_use": "",
"hw_vm_extra": "",
"cli_serial": 1,
"interface_range": 22,
"config_disk_type": "disk",
"plugin_name": "vEOS",
"gui_visible": true,
"baseline_image": "vEOS"
"plugin_base": "generic",
"device_type": "switch",
"plugin_desc": "Arista vEOS",
"cli_protocol": "ssh",
"plugin_name": "vEOS",
"cli_serial": 1,
"interface_range": 22,
"gui_visible": true,
"interface_pattern": "Ethernet{0}",
"baseline_image": "vEOS",
"config_disk_type": "disk",
"hw_ram": 2048,
"hw_vm_extra": "",
"gui_icon": "iosvl2",
"config_file": "/veos_config.txt",
"interface_first": 1,
"deprecated_use": "",
"baseline_flavor": "vEOS.medium",
"interface_management": "Management1"
}
]
}
}
Loading…
Cancel
Save