In this blog, I’m going to cover how to create a Live Raizo VM, with persistence.

So what is Live Raizo? according to https://sourceforge.net/projects/live-raizo/, “Live Raizo is a live distribution based on Debian, to experiment with system administration on simulated networks and real devices”.

GNS3 is the GUI (Graphical User Interface) included with Live Raizo which co-ordinates the network simulators/emulators and gives a graphical representation of the interconnections, as well as simplifying the configuration of those links.

A live CD, or .iso image, which can be loaded as a CD by using the appropriate software, is designed to be used as a boot source media that allows you to use a computer without booting from the hard drive. The advantage of using the Live Raizo CD as a boot source is that you can’t write to it, so you know that the Operating System and therefore the computer functionality will be the same every time you boot from the CD.

Of course there is a disadvantage, and that is not being able to save your work, or any changes back to the CD.

To get around this issue, you could simply mount the hard drive of the computer and save any work you do on there, but doing that manually every time is going to put most people off using the live CD in the first place.

The Live Raizo CD has a way to automate the mounting of the Hard drive or a USB memory stick connected to the computer, and it’s called, “persistence”. It is possible to copy the .iso image to a USB drive and use that as boot media and for the persistence files at the same time.

However, we’re going to create a virtual machine (using an existing VirtualBox install) and use an iso image of the Live Raizo cd to boot the VM then use the hard drive of the VM as the persistence drive.

Creating the Virtual Machine

1; Open an instance of VirtualBox and click on the icon to create a New VM.

How to create a Live Raizo VM with persistence, Clicking the VirtualBox "New" VM icon.
VirtualBox creating a new Virtual Machine

2; Give it a meaningful name and choose Linux and Debian (64 bit) for the Operating System.

How to create a Live Raizo VM with persistence, Selecting a Name, Type and Version for the VM
Name the VM and choose the type of Operating System, (OS) and version.

3; Choose the amount of memory to allocate to the VM. You can move the slider or type the amount of memory directly into the box on the right. I chose to give it 4GB of memory, which is half of the available memory I had on the host machine. 4GB is the minimum amount of memory recommended by GNS3 to run their simulation environment.

Image showing how to select the memory for a VirtualBox VM.
Allocating memory to a VirtualBox VM

4; Next, you need to create a hard drive so select the radio button to “Create a virtual hard drive now”, then select the button “Create”.

Creating a Virtual Hard Drive for a VirtulBox VM.
Choose to create a new virtual hard drive.

5; Select the file type for the Virtual Hard Drive. You can leave it as the default of VDI if it’s only going to be used by VirtualBox and click the “Next” button.

Image showing how to choose the Hard Drive file type for a VirtualBox VM.
Selecting the Hard Drive file type for VirtualBox.

6; Next choose a size for the hard drive. The minimum recommended on the GNS3 website is 1GB, with 35GB being recommended and 80GB being described as optimal. I stuck with the default of “Dynamically Allocated” and clicked the next button.

How to create a Live Raizo VM with persistence, Choosing to dynamically allocate the hard drive storage.
Choosing “Dynamically Allocated” storage for the VirtualBox Hard Drive

7; I allowed 16GB for the hard drive, but you can choose to go with more or less depending on the resources you can spare from the host.

How to create a Live Raizo VM with persistence, Choosing a size for the hard drive
Choosing the size of the virtual hard drive for a VirtualBox VM.

…and that’s it as far as the VM is concerned. For the moment we can ignore the network settings and leave them as they are. I’ll cover connections between the GNS3 virtual environment, the Live Raizo VM, the host machine and real external switches and the Internet in other blog posts.

Next, we need to download a copy of Live Raizo to use as our boot mediafor the VM.

Downloading Live Raizo from the Internet

8; Search for the latest Live Raizo release on the Internet. You can use Google or your preferred search engine, just type in Live Raizo and select a link leading to the download at a reputable site like sourceforge.net

Image of a search for Live Raizo using the Google search engine.
Search the Internet for a Live Raizo download, select a reputable site like sourceforge.net

9; Once at the download page select the button or link to download the file and choose to save the file from the popup menu that follows. Notice that the file is 1.1Gb so it’ll take a while to download depending on how much bandwidth you have.

How to create a Live Raizo VM with persistence, Downloading the Live Raizo iso image.
Click the Download button for the file. If you hover the mouse over the button, you’ll see URL appear at the lower left of the window, so you’ll know you’re about to click the correct button.

10; Click on the download icon to see the progress of the download.

Checking the download progress of a file in the Firefox browser.
Checking the download progress of a file in the Firefox browser.

11; Once the download completes you can go to the download folder by clicking the folder icon shown below. You can then cut and paste the Live Raizo iso image to a folder of your choice.

How to create a Live Raizo VM with persistence, Opening the download folder from the Firefox browser.
Click the folder icon to open the download folder and move the Live Raizo file to a location of your choice.

Loading Live Raizo using the Virtual Machine CD

12; You have to go back to VirtualBox to load the Live Raizo iso image. Double click on the Storage link for the Live Raizo VM.

Opening the storage options for the VirtualBox VM
Opening the storage options for the VirtualBox VM

13; Click on the empty CD drive icon, then click the CD icon under Attributes and select “Choose a virtual CD/DVD disk file”

Choosing to select a virtual CD/DVD disk file for a VirtualBox VM
Choosing to select a virtual CD/DVD disk file for a VirtualBox VM

14; Browse to the location of the Live Raizo image, select it click on the Open button.

How to create a Live Raizo VM with persistence, Selecting the Live Raizo image to use in the CD tray of the VirtualBox VM
Select the Live Raizo image file and then click the Open button

15; Then click OK

How to create a Live Raizo VM with persistence, Confirming the selection of an image file for the CD in VirtualBox
Click OK to progress to the next step

Now the “Storage” section of the VM will show the selected iso image as below, and the VM is ready to boot from the virtual CD.

How to create a Live Raizo VM with persistence, Viewing the storage section to confirm the loaded iso image file in the virtual CD tray
The VirtualBox VM storage section showing the selected iso image

Preparing the Hard Drive for Live Raizo persistence

16; As it is, the hard drive hasn’t been formatted so we can’t access it for read/write operations. The Live Raizo CD has a number of tools you can use to prepare the hard drive for use though. To begin, first, start the VM, either by right-clicking on the VM and then selecting start, or left-clicking the VM and choosing Start from the icons at the top of the VirtualBox Manager window. Choose English (US) without persistence.

17; Once the VM has booted up, type “sudo fdisk -l” at the prompt to determine what disks the VM can see. In the below example we see two drives one /dev/loop0 which at 991 MiB is the CD iso, and another drive at /dev/sda which is 16GiB and must be the hard drive since we allocated 16GB for it in an earlier step.

How to create a Live Raizo VM with persistence, Using fdisk -l to determine what drives are present.
Using fdisk -l to see which hard drives are present.

18; Next we need to create the partition table so we type “sudo fdisk dev/sda” to enter the fdisk utility on our hard drive at /dev/sda, then we type “n” (1) and return, to create a new partition, followed by “p” (2) and return to create a primary partition. Accept the defaults for the partition number (3), first (4) and last (5) sectors (just press the return or Enter key for each), then follow that with “w” (6) and return to write the partition table to the disk.

Note that the first “p” entered in the graphic below was used t read the existing partition table, but since the disk isn’t partitioned it only shows /dev/sda, or, the whole disk.

Preparing the hard drive partition table with the fdisk utility of Live Raizo on a VirtualBox VM
Preparing the hard drive partition table with the fdisk utility

19; Next, we’ll format the hard drive with the ext3 format and use a label of “persistence”, the Live Raizo CD will look for the “persistence” label during the boot sequence. The command for this is “sudo mkfs.ext3 -b 4096 -L persistence /dev/sda

Formatting the hard drive of the Live Raizo VM
Formatting the hard drive of the Live Raizo VM

20; So the Live Raizo boot sequence looks for the partition with the label persistence and within the partition, it looks for a file called “persistence.conf”, the file must contain the line “/home”, the partition is mounted automatically in /home. The process is described here, https://sourceforge.net/p/live-raizo/wiki/Home/#persistence-of-home.

21; Before we can create or edit the file though, we need to mount the newly formatted drive, so we create a mount point. This can be anywhere since we’re not in persistent mode, it won’t be written to the disc, so will not survive the reboot. Type “sudo mkdir hd” and press return, followed by “sudo mount /dev/sda /hd” and press return. Then change to the directory by typing “cd /hd” and press return.

22; Next, we need to create the file “persistence.conf” so type “sudo touch persistence.conf” and press the return or enter key.

23; We then need to edit the file which we can do with “sudo vi persistence.conf”, this will bring up a window with the vi editor. Type “i” (with no return) to enter — INSERT — mode. then type “/home” (without the quotes) and then press the Esc key, you’ll notice the — INSERT — at the bottom of the window has disappeared. At this point, you can type “:wq” (without the quotes, a colon, followed by lower case “w” and a “q”) and press return.

24; You can check the file by typing “more persistence.conf” followed by a return and you should see the following which indicates the file exists and has “/home” as its contents, and we can proceed to test and see if it all works.

Live Raizo contents of "persistence.conf" file
Live Raizo contents of “persistence.conf” file

Testing the Live Raizo VM persistence

25; If the VM is powered on, then type “sudo poweroff” followed by a return to shut it down.

26; Start the VM and at the Boot Menu choose to start with persistence.

Starting the Live Raizo VM with persistence
Starting the Live Raizo VM with persistence

27; Once the boot sequence completes, create a file in the current directory by typing “touch mypersistencetestfile” then a return. Check the file has been created by typing “ls” followed by a return.

28; Now type “sudo poweroff –reboot” and press return to restart the VM, choose the Persistence option at the boot menu and then type “ls” followed by return.

29; If you can see the file you created in step 27, you know that the persistence has worked and you can carry on to using the GUI part of the Live Raizo platform by typing “startx” and pressing return. You can now set up GNS3, store your Cisco image files and save your projects, knowing that when you poweroff the Live Raizo VM, it’ll all be saved for the next time you login.

To cut a long story short, the summary

This blog covered how to create a Virtual Machine using VirtualBox and then booting it with a Live Raizo CD but then also saving any changes made during the session to the hard drive of the VM.

To do that required formatting the VM hard drive and adding a partition label called “persistence” and creating a file called “persistence.conf” with the contents “/home” in the root of the persistence partition.

The advantage of the live CD is that the loaded apps such as GNS3 work the way they should every time, and you can still save projects and changes.

If you’re a network engineer and you could use an IPv4 subnet calculator check out the free techiedoodah IPv4 excel subnet calculator spreadsheet and if you get a lot of time hands on rackside and need a tray to put your laptop on, let us know what you think of the Portable Rack Mount Laptop Tray and sign up if you want one. Type with two hands instead of one, be more comfortable, improve your productivity and get out of the server room sooner, (or wherever the rack happens to be).

Techiedoodah blogs are created in the hope that they can help others by giving real-life examples. If this has been useful to you please feel free to leave a comment. If you’re reading this post on the home page, you won’t be able to post comments here, so follow this link to the blog, and then scroll to the comments section at the bottom of the page.

Comments for How to create a Live Raizo VM with persistence.