Image management tool: Master i share2 to improve PNETLab experiment efficiency
Imagine that you are preparing to conduct a large-scale network experiment and need to deploy multiple virtual devices from different vendors and types on PNETLab, such as IOS, ESXi, FortiGate, etc. Normally, this requires you to manually download these image files from various repositories and then upload them to the server one by one. This process is not only very time-consuming, but it may also cause problems such as version mismatches or incorrect path settings, which may make it difficult to start the experiment smoothly. In order to make yourself easier and improve work efficiency, it becomes very important to have a command line tool that can batch download and manage these image files. In this way, you can save a lot of valuable time and focus on more important tasks.
1. Introduction to ishare2
ishare2 is a Bash-based command line tool designed specifically for downloading images to PNETLab servers. It is also very suitable for managing images on similar platforms. Starting from version v1.5.7, ishare2 also provides a convenient web interface that allows users to easily search and pull images directly in the browser. This not only makes the operation more intuitive, but also greatly improves the user experience.
Core functions:
Image search: quickly locate images by type all/bin/qemu/dynamips/docker or name keywords.
Pull by number: use ishare2 pull <type> <number> to download the specified image with one click, eliminating the trouble of manual search and download
Batch operation: support pull all to download all images of the same type at once, or use labs to automatically read .unl experimental topology files and pull the required images.
Installed image view: use ishare2 installed [type] to quickly list the existing images on the server for easy management and cleanup.
Web GUI: ishare2 gui install/start/stop/restart can be deployed and operated using a browser interface, allowing users who are not familiar with the command line to easily manage.
2. Installation method
1. One-click installation (recommended)
The above command will download the script to /usr/sbin/ishare2 and grant executable permissions. You can then directly execute it to enter the interactive help interface.
2. Manual installation
Download the latest ishare2 file from the GitHub repository.
Copy to the server: cp ishare2 /usr/sbin/ishare2.
Give execution permissions: chmod +x /usr/sbin/ishare2.
Run: ishare2 to enter the tool main interface.
3. Basic usage examples
The specific usage can be viewed through ishare2 --help Help document, as shown below:
1. Image search
The image search function is very flexible and supports searching by type, name, and other methods.
Search all image files:
Copy
ishare2 search all #Search all
1.
After executing the above command, the output is as shown below:
Search by name:
Copy
ishare2 search h3cvswitch_S9850-7.1.070-R7639P06
1.
After executing the above command, the output is as follows:
2. Pull by number
First use the search command to get the number, then execute:
Copy
ishare2 pull qemu 739
1.
The number comes from the ishare2 search list.
3. Batch download
Pull all images: ishare2 pull bin all
Automatically download for experimental files:
Copy
ishare2 labs # default path
ishare2 labs 12# only download the image required for experiment number 12
ishare2 labs all # all experiments
1.
2.
3.
Customize the experiment path: ishare2 mylabs /path/to/labs.
4. Advanced functions and maintenance
Automatically generate licenses: ishare2 relicense generates new iourc license files for .bin images.
Upgrade tools and servers: ishare2 upgrade provides an interactive menu to upgrade ishare2 scripts or PNETLab VM (supports upgrades from v4.2.10 to v5.0.1 and higher)
View logs and updates: ishare2 changelog displays the latest changes in real time; ishare2 test detects dependency accessibility.
V. Conclusion
With ishare2, you can automate the tedious image download and management tasks with one click, greatly improving the deployment efficiency of PNETLab network experiments. Both beginners and experienced network engineers can benefit from it. Try it now and leave more time for design and research!