Category Archives: VirtualBox and VMware

How to Save Time by Using Snapshots in VirtualBox

image

Snapshots are a massive time saver when you are testing settings and configuration for your test labs. Read on to see how you can take advantage of them while following along with our articles.

The basic idea of a snapshot is that you setup your virtual machine exactly how you want it, take a snapshot, and then you can make any changes you want. You could even install something awful, because it doesn’t matter – all you have to do is roll back the snapshot, and your virtual machine will be exactly how it was before.

It’s the perfect way to do a bunch of testing and figure things out, without breaking your setup. Plus, it’s a virtual machine, so you could always reload it anyway.

Taking a Snapshot

Taking a snapshot in VirtualBox is actually very easy, and when done can save massive amounts of time. To get started open up your Virtual Machine and click on the Machine menu item, then select Take Snapshot…

image

Since we will be snapshotting a clean install you will need to give your snapshot an intuitive name and description to remember this.

image

The virtual machine will then dim out periodically while a point in time snapshot is taken.

image

Reverting To a Snapshot

The purpose of reverting to a snapshot is so that you can go back in time to a particular state, in our case a clean state just after we installed the OS. Since we can only do this when the virtual machine is not on, go ahead and shut it down.

image

Then select your virtual machine from the list and switch over to the snapshots view. Here you will see a list of the various snapshots you may have taken. To restore to a snapshot simply right click on it and choose Restore Snapshot From the Context Menu.

image

For most situations you are going to want to uncheck the option to create a snapshot of the virtual machine current state. The reason being is that you will normally want to restore when you have broken something, there’s no point in taking a snapshot of a broken configuration.

image

You will then see that the “Current State” will become the same as the snapshot you selected to restore to.

image

Now when you power on the virtual machine you will see the virtual machine quickly reverting itself.

image

Always remember that without snapshots, recording the Geek School would be nearly impossible, so remember to use them and save yourself countless hours. That’s all there is to it.

Advertisements

Getting started with GNS3 (Installation and configuration)

Up & Running With GNS3 1.X

How to Setup GNS3

Adding your own PC to GNS3 with MS Loopback

MicroNugget: GNS3 and Windows 8

MicroNugget: How to Tune GNS3 to Avoid a 100% CPU Utilization?

MicroNugget: Connecting Virtual Box Hosts to GNS3 Networks

MicroNugget: Virtual PC Simulators & GNS3

MicroNugget: Using Wireshark with GNS3

MicroNugget: Connecting GNS3 to the Internet

MicroNugget: The ASA in GNS3

How To Install GNS3 1.0 on Windows 8.1

GNS3 1.0 was released to the world on October 21st, 2014. I have been using previous versions of GNS3 for some time now to simulate networks and to practice for my Cisco certifications. For those of you who aren’t familiar with GNS3, it is an application that allows you to build networks for free. The caveat there is you need to supply the images for your equipment. GNS3 supports Cisco, Juniper, HP, Arista, Citrix, and Brocade (as specified on their site, gns3.com. You build out a virtual lab which means there is no need to purchase physical hardware.

Before getting started, you’ll need to sign up on GNS3‘s website. Once you have an account. You can download GNS3. Click on the Windows download button to begin.

Download GNS3 for Windows

Once you open the installation file, click through the standard setup screen and agreement until you get to the Choose Components section.


How to Install GNS3

GNS3 Components

Select all the components you will need – almost everything. SolarWinds is a new application packaged with GNS3. If you already have some of the components installed, such as Wireshark, you can uncheck it.

Location of Installation

After completing installation, Start GNS3.

Upon opening GNS3, you will be prompted to save your new project locally or in the cloud. For the purposes of setting up GNS3 I will skip this.

Store GNS3 project files locally or in the cloud

Click on Edit and then Preferences.

Editing preferences of GNS3

Expand Dynamips and select IOS routers.

Add new IOS images

This is where you must supply your IOS image. I cannot supply these images for you. Click on New to add your image.

Add new IOS image in GNS3

Enter the name of the Image and its platform.

Add a name and platform

Set the amount of RAM to be allocated to IOS.

Allocated ram

Select the default adapters you want installed for each new instance of this device.

The default adapters for the template

After you finish, the router will be displayed with its settings.

List of images

Click on the General tab to view your settings. Make any changes as you see fit.

GNS3 General Preferences

The Console applications tab is where you can configure what application is to be used to console into your devices within GNS3.

Putty for console

The Packet capture tab displays your settings for capturing traffic on links between your devices within GNS3. Notice the capture analyzer command using SolarWindows Response Time Viewer.

Wireshark for packet capture

Click OK to close the Preferences window.

The big window in the middle of GNS3 is your topology view. This is wear you drag and drop devices from the left menu item.

GNS3 Main Window

To add a device, click on one of the symbols on the left and drag and drop the IOS image you’ve uploaded to GNS3.

Click and drag

The Topology Summary window will display a list of all your devices. A red orb signifies a device that is off. A green orb means the device is on.

Right click on your device and click on Start to turn on your device. Right click again and select Console to bring up Putty to manage your device.

Device Menu

Happy labbing!

GNS3 1.2.1 installation on Ubuntu 14.04

As mentioned in an earlier post GNS3 is moving ahead fast. Currently at version 1.2.1 the GNS3 is looking great. Compared with the version 1.0 Beta 1 which I had installed, the 1.2.1 is not only more stable, but it has the Menu more clean and compact. For example now there is only one Preferences menu where you can adjust all your settings.

During the installation of 1.0 Beta 1 I made some notes in Evernote and it prove to be very useful as the installation was pretty messy. With 1.2.1 I did the same thing, but the installation was very smooth. Still, I said that if I made those notes maybe I should share them for those interested in a quick installation. A more complete guide can be found on GNS3 Community.

1. Download GNS3 1.2.1

Head over to http://www.gns3.com/, create and account and download the bundle archive for Linux.

If you for some reason you don’t want to create an account, you may download each package individually from https://github.com/GNS3

The following lines will assume that you have the bundle archive.

2. Install Ubuntu 14.04 dependencies

3. Unzip the bundle archive

You should see 5 packages in GNS3-1.2.1 folder:
dynamips-0.2.14.zip
gns3-server-1.2.1.zip
gns3-gui-1.2.1.zip
iouyap-0.95.zip
vpcs-0.6.zip

4. Install Dynamips

To check if the correct version is install:

You should see in the output 0.2.14

5. Install GNS3 Server

To check if the GNS3 Server is installed correctly:

If you see some output other than an error, than you’re fine.

6. Install GNS3 GUI

To test if the installation is working:

You should see a graphical interface of GNS3 launched.

At this moment you have a working GNS3 environment if you want only want to test Cisco hardware emulators. I strongly recommend to continue and install also the rest of the components. Who knows when you’ll need them

7. Install IOUyap (Optional, if you will use IOU images)

To test the installation:

8. Install VPCS (Optional, if you want to use VirtualPC)

For the third line, the 64 represent 64bit, as my Ubuntu 14.04 is build on 64bit.
The values can be:
– 32 or i386 for 32bit OS
– 64 or amd64 for 64bit OS

Please be sure to use the correct one for your OS.

To test the VPCS:

You should see a Virtual PC being launched. Leave the console with letter q.

9. Install VirtualBox (Optional, if you want to launch VMs)

Download the correct version for your system from https://www.virtualbox.org/wiki/Linux_Downloads. The following lines will assume an Ubuntu 14.04 64bit OS.

You can also use the instructions at https://www.virtualbox.org/wiki/Linux_Downloads and go for an APT installation.The choice is yours.

10. Install Qemu (Optional, if you want to use qemu images)

11. Install IOU (Optional, if you want to use IOU images)

I’m not a legal matter expert, and the usage of IOU is sort of grey area. Because of this, I’m not going to cover this chapter.

You’re ready to go. Start the GNS3 GUI:

Some things to check before going live:

  • check in the menu Edit > Preferences to set your desired Paths (in General sections) and to check the paths for the binaries (dynamips, vpcs, iou, virtualbox…)
  • add the IOS, virtualbox vm, iou images
  • in case of Cisco hardware emulators don’t forget to find the IdlePC value (when you add the IOS image or later with the start of your first router with a certain image) otherwise your CPUs will cry.

If something does not work as described or you need help please let me know in Comments.

[Update 1]

If you get the following error during installation of iouyap:

Try to install the iniparser as follows:

then

and finally iouyap

How to convert .img files to .vdi for Virtualbox

To convert an .img file to .vdi in Linux, so that you can directly use it in VirtualBox, open a terminal and paste this:

VBoxManage convertdd  file.img file.vdi

For instance, to convert the recently mentioned ChromeOS Cherry from .img to .vdi:

VBoxManage convertdd ChromeOS-Cherry.img ChromeOS-Cherry.vdi

To do this is Windows (I haven’t tested it but it should work), open cmd.exe (Start > Run, enter: cmd.exe), navigate to “C:\Program Files\innotek VirtualBox” (using the “cd” command), then run this (after placing the .img file inside the “C:\Program Files\innotek VirtualBox” folder):

VBoxManage.exe convertdd file.img file.vdi

Please let us know if you have tried this in Windows and rather or not it worked.

To use it in VirtualBox, create a new Virtual Machine, select “Use existing hard disk” and browse for the recetly converted .vdi file:

virtualbox use existing hard disk

Installing Chromium OS in VirtualBox

Install Android 4.4 Kitkat on your PC using Virtual Box

UBUNTU TOUCH EMULATOR: INSTALLATION AND USAGE IN UBUNTU 14.04

A while back, Canonical released an experimental Ubuntu Touch emulator running Unity 8 and Mir. Back then, there were a few bugs, including a nasty one on 64bit that could break the system and since they were fixed, I though I’d write an article on how to properly install and use the Ubuntu Touch Emulator in Ubuntu 14.04, 13.10 and 12.04.

Ubuntu Touch Emulator

The initial Ubuntu Touch Emulator installation instructions changed so if you’ve installed the first experimental release, use the instructions below to create new instances.
Below you can watch two quick Ubuntu Touch Emulator test videos I’ve recoded in Ubuntu 14.04:


(ARM instance; direct video link)


(x86 instance; direct video link)

Ubuntu Touch Emulator is available in the official Ubuntu 14.04 repositories but it’s an old version and futhermore, it doesn’t support x86 instances, so I recommend using the Phablet Tools PPA, which has packages for Ubuntu 14.04, 13.10 and 12.04.
Add the Phablet Tools PPA and install the emulator using the following commands:
sudo add-apt-repository ppa:phablet-team/tools
sudo apt-get update
sudo apt-get install ubuntu-emulator

If you’ve installed an older version of Ubuntu Emulator, also run an upgrade:

sudo apt-get upgrade
The Ubuntu Emulator package is also available in the Ubuntu SDK PPA, but it’s an older version at the time I’m writing this article (about one month older than the one from the Phablet Tools PPA).
Note that I’ve only tested it in Ubuntu 14.04 and 12.04, but it should also work in Ubuntu 13.10 since the PPA above has packages for it.

Creating and running instances

1. The first thing you need to do is create a new instance – we’ll call it “UbuntuTouch” in the commands below:

Create an ARM instance:

sudo ubuntu-emulator create UbuntuTouch --channel=ubuntu-touch/utopic-proposed

To create an Ubuntu Touch Emulator x86 instance, use the following command:

sudo ubuntu-emulator create UbuntuTouch –arch=i386 –channel=ubuntu-touch/utopic-proposed

The current “stable” image doesn’t seem to work, that’s why I’ve added the Utopic proposed channel for the image in the commands above.

On Ubuntu 12.04, you may get the following error:

Error while converting ~/.local/share/ubuntu-emulator/UbuntuTouch/system.img: Unknown option 'compat'
qemu-img: Invalid options for file format 'qcow2'.
I’m not sure why this error is displayed, but the emulator runs just fine so ignore it.

2. Then, run the new instance by using the following command:

ubuntu-emulator run UbuntuTouch

The first time you run the emulator, the boot process will take quite a while. When it finishes booting, a shell with Ubuntu Touch will start, asking you to enter the username and password:

Ubuntu Touch Emulator shell
If you want to interact with the emulator via an interactive ADB session, log in here using “phablet” (without the quotes) for both the username and password. It’s not required to log in here if you only want to use the Ubuntu Touch Emulator GUI.
After this, it might take another few minutes and Unity 8 with Mir should be loaded in the Ubuntu Touch Emulator.
In theory, Ubuntu Touch emulator should support some parameters, such as setting the memory (“–memory”), which by default is set to 512mb of RAM, but for some reason the instance doesn’t start when using this, or at least it didn’t in my test.

3. Optional: change the Ubuntu Touch Emulator size: 

Ubuntu Touch Emulator with a 0.7 scale on my 1920×1080 monitor.
If the default Ubuntu Touch Emulator size is too big for your screen, you can scale it down. To do this, run it with the “–scale” option. For instance, to scale the emulator to half its original size, use:
ubuntu-emulator run --scale 0.5 UbuntuTouch
Notes:
  • the downloaded images are stored under ~/.cache/ubuntuimages
  • the images are stored under ~/.local/share/ubuntu-emulator

Deleting instances

To delete an Ubuntu Touch Emulator instance, use the following command:

sudo ubuntu-emulator destroy UbuntuTouch
Where “UbuntuTouch” is the name of the instance you’ve created. If you can’t remember the name, you can run the command below to list your Ubuntu Touch Emulator instances:
ubuntu-emulator list

Creating / restoring snapshots

Ubuntu Touch Emulator supports disk snapshots – to take a snapshot, use the following command:
ubuntu-emulator snapshot --create=SNAPSHOT1 UbuntuTouch
where “SNAPSHOT1” is the name of the snapshot and “UbuntuTouch” is the name of your instance created above.

Then, when you wish to restore this snapshot, use:

ubuntu-emulator snapshot --revert=SNAPSHOT1 UbuntuTouch

You can also use “–revert-pristine” to revert to the originally created snapshot.

Pfsense on VirtualBox

How to install vmware workstation on Ubuntu

How to Boot from USB in VirtualBox

vSphere 5.5 – How to install and configure VMware ESXi 5.5

Realtek network cards and VMware ESXi 5.5

Yesterday I decided to upgrade my two ESXi servers from ESXi 5.1 to ESXi 5.5 since the update came out some time ago.
The upgrade from ESXi 5.0 to ESXi 5.1 went great, without any problems. But this time, that is not the case.

My two ESXi servers are white boxes made of the following hardware:

The problem was the motherboard that ships with an onboard Realtek 8111E network adapter.
This problem has been verified to be the same with Realtek 8168 and Realtek 8169.
The reason for this, is that VMware removed the drivers from the new ESXi 5.5 iso.

In this post I will show you how to get ESXi 5.5 working with the Realtek network adapters.

Some people don’t like to use “not supported” hardware this way, and others had connection problems on the VM’s after doing this. I did not have any problems, and have been running with this solution since I wrote this post (21 days ago now). So i think it is pretty stable.
If you don’t want to use the method below, you can always buy a Intel Pro 1000 network card and put it in a PCI-e slot.
I highly recommend the Intel pro 1000 series, they are fast, reliable and works on any OS out of the box (including ESXi), but they are a little pricy. You can get them here, with free shipping:
Intel Pro 1000 Dual port
Intel Pro 1000 single port

There are two ways to make the upgrade work on your motherboard:

  1. Using a supported network adapter in a PCI-E slot (See above, regarding the Intel Pro 1000 network adapters)
  2. Creating a custom ESXi 5.5 iso with the drivers from ESXi 5.1

Putting in a extra network adapter was not an option for me, so I went for option two, and here is how I did it:

Creating a custom ESXi 5.5 iso including the Realtek network drivers

What you need

You just need a Windows XP or higher computer, and the software below.

Getting the needed software

First you need to get the needed software.
The following is what you need to download:

Injecting the drivers and create a new iso file

There is not a lot of steps to this, actually just a couple and it will not take long.

Open the “Esxi-customizer”

First run the .exe for ESXi-customizer to extract it.
When extracted, run the program so you get the following window:
ESXi-Customizer_ESXi-5.5.0_r8168

Fill out fields

Simply fill out all 3 fields.
First one: Choose the original VMware ESXi 5.5 iso you downloaded from VMware
Second one: Choose the .VIB file for you Realtek network adapter that you downloaded earlier.
Third one: Choose what folder to use for working folder. A log and the finished new .iso file will be saved here. just create a new folder on your C:\ drive and use it.

If your motherboard support UEFI boot, you can tick the “Create UEFI bootable ISO” if not, then untick this. If you are unsure about this, then untick it!
Tick the auto update check to make sure you always have the latest version of this software.

Do it!

Let’s do it! Press “Run!”
The program will run some commands in the command promt behind it, and that’s it.
It does not take long. Once done, you can close the program.

Upgrade your VMware ESXi server

Now, burn your newly created ISO image of VMware ESXi 5.5 with your Realtek network adapter drivers injected that was created in the folder you choose to be the working folder for the program.
You can also “Burn” it to a usb stick, if your server does not have a optical drive installed. I do not have a guide for this yet.

Boot up your server on the cd/usb and choose to upgrade the system like you would with the original iso.

Note that the custom .iso does not work trough VMware Update Manager.

Feel free to leave a comment below, and rate the post at the top if this helped you!

Difference between vSphere, ESXi and vCenter

VMware Inc. is a software company that develops many suite of software products specially for providing various virtualization solutions. There are many cloud products, datacenter products,  desktop products and so on.

vSphere is a software suite that comes under data center product. vSphere is like Microsoft Office suite which has many software like MS Office, MS Excel, MS Access and so on. Like Microsoft Office, vSphere is also a software suite that has many software components like vCenter, ESXi, vSphere client and so on. So, the combination of all these software components is vSphere. vSphere is not a particular software that you can install and use, “it is just a package name which has other sub components”.

ESXi, vSphere client and vCenter are components of vSphere. ESXi server is the most important part of vSphere. ESXi is the virtualization server. It is type 1 hypervisor. All the virtual machines or Guest OS are installed on ESXi server. To install, manage and access those virtual servers which sit above of ESXi server, you will need other part of vSphere suit called vSphere client or vCenter. Now, vSphere client allows administrators to connect to ESXi servers and access or manage virtual machines. vSphere client is installed on the client machine (e.g. Administrator’s laptop). The vSphere client is used from client machine to connect to ESXi server and do management tasks. So now what is vCenter? Why we need it? Try cloning existing virtual machine using just a vSphere client without vCenter server.

vCenter server is similar to vSphere client but it’s a server with more power. vCenter server is installed on Windows Server or Linux Server. VMware vCenter server is a centralized management application that lets you manage virtual machines and ESXi hosts centrally. vSphere client is used to access vCenter Server and ultimately manage ESXi servers. vCenter server is compulsory for enterprises to have enterprise features like vMotion, VMware High Availability, VMware Update Manager and VMware Distributed Resource Scheduler (DRS). For example, you can easily clone existing virtual machine in vCenter server. So vCenter is another important part of vSphere package. You have to buy vCenter license separately.

Difference between vSphere, ESXi and vCenter

The diagram above shows vSphere suite in a more descriptive way. vSphere is a product suite, ESXi is a hypervisor installed on a physical machine. vSphere Client is installed on laptop or desktop PC and is used to access ESXi Server to install and manage virtual machines on ESXi server. vCenter server is installed as virtual machine on top of ESXi server. vCenter server is a vSphere component which is mostly used in large environment where there are many ESXi server and dozens of virtual machines. The vCenter server is also accessed by vSphere client for management purpose. So, vSphere client is used to access ESXi server directly in small environment. In larger environment, vSphere client is used again to access vCenter server which ultimately manages ESXi server.