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.
2; Give it a meaningful name and choose Linux and Debian (64 bit) for the Operating System.
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.
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”.
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.
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 “Dynamica
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.
…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
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.
10; Click on the download icon to see the progress of the download.
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.
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.
13; Click on the empty CD drive icon, then click the CD icon under Attributes and select “Choose a virtual CD/DVD disk file”
14; Browse to the location of the Live Raizo image, select it click on the Open button.
15; Then click OK
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.
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
17; Once the VM has booted up, type “
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.
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“
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 “
22; Next, we need to create the file “persistence.conf” so type “
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 “:
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.
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.
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 “
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
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.