Customize iTerm2 to use with GNS3

Term2 with GNS3 broadcast input

Hi folks, today I’m goin to show you how to get the best of iTerm2 to use with GNS3 the idea is to use a custom script to connect to devices in GNS3 using iTerm2 tabs and use the Badge feature of iTerm2 to show the device who we are connected.

First we need to create a profile in iTerm2 I’ll recommend to call it GNS3.

iTerm2 Preferences

We need to put “\(” in the Badge field, that will configure the badge of windows with the name of the device we’re using in GNS3.

After that we goin to customize the profile, as you can see I use a semi transparent red color for the badge.

iTerm2 Preferences

Now it’s time to configure the GNS3 client, we coint to GNS3 -> preferences  and in the General menu we select the Console applications tab.

GNS3 Console Application Settings

And then click on the Edit button.

GNS3 Custom Console Application

Then we goin to select Custom in the drop down menu and paste the following Code:

osascript -e 'tell application "iTerm"' -e 'activate' -e 'if (count of windows) = 0 then' -e '   set t to (create window with default profile)' -e 'else' -e '   set t to current window' -e 'end if' -e 'tell t' -e '    create tab with profile "GNS3" command "sh"' -e '    set s to current session' -e '    tell s' -e '        set name to "%d"' -e '        write text "PATH=\"" & (system attribute "PATH") & "\" exec telnet %h %p"' -e '    end tell' -e 'end tell' -e 'end tell'

Take in consideration that in the script we reference the name of the  iTerm2 Profile if you use a name thats is different from GNS3 you need to modify it.

Then click ok in the ok and ok to save the settings.

The script will open iTerm2 app and create a new tab with the selected profile for each connection in GNS3.

the following is an example of a running session with this configuration in a simple GNS3 Tolology:


This slideshow requires JavaScript.

As you can see you can use the devices in tabs or rearrange these tabs to see and type in the devices at the same time using the broadcast input feature of iTerm2.

Now enjoy your lab with this little hacks 😉

Workaround: System Center Configuration Manager 2012 Stop Windows Server 2012 Hyper-V Virtual Machine Management

Hi, a few weeks ago I installed a Windows Server 2012 in production environment, some days later I found that the “Hyper-V Virtual Machine Management” is stoped.

I start the vmms service and it’s stopped again at the next day, searching about this issue, I found this post in technet, in the post some people resolve the problems uninstalling the System Center Configuration Manager 2012 Agent from the Hyper-V Host, in my case this is not the best option, I use the Agent for a lot of activities.

Reading the Hyper-V Event Viewer I found some EentID 19040 when the service is stopping, I create a scheduled task that use this events as trigger. in the action I write a powershell line that start the vmms service again

This is not a definitive solution, just a workaround.

This are the options to create the scheduled task.

Select “Run whether user is logged or not” and use an account with rights in the server.



In the trigger tab click new adn select a event trigger.



In the event trigger use Log, Source and EventID from the previous image


In the Action tab click at new and select Start a program.



In program use powershell and in arguments write:

-command “sleep 30 ; start-service vmms”


It’s done, when the vmms service is stopped again by SCCM Agent, this task will start it again.