It is currently Thu May 17, 2012 4:16 pm


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How to install Vyatta 6.1 Core LiveCD on Qemu image in Linux
PostPosted: Thu Sep 16, 2010 6:18 am 
Offline

Joined: Mon Nov 10, 2008 10:31 am
Posts: 452
Location: Slovakia
Hi,
Quote:
Vyatta is bringing innovation and affordability to the networking industry by delivering advanced routing and security in a software-based network OS that scales from the branch office to the service provider edge. Vyatta has decoupled networking software from proprietary hardware allowing users to leverage the price and performance advantages of standard x86-based hardware and components as well as Citrix XenServer and VMWare virtual or cloud environments.

Quote:
The word "vyatta" (pronounced vee-AH-tah) is ancient Sanskrit and means "open."

url:
Quote:
http://www.vyatta.com/

I would like to show how to install Vyatta 6.1 Core LiveCD on Qemu image and run it from GNS3.

1. Download Vyatta Core 6.1 LiveCD iso (You need to fill short questionnaire for Vyatta download)

Quote:
http://www.vyatta.com/downloads/index.php

2. Create Qemu qcow2 image

/usr/local/bin/qemu-img create -f qcow2 ./vyatta6.1vc.img 1G

3. Boot Qemu image with Vyatta 6.1 LiveCD

/usr/local/bin/qemu -boot d -hda ./vyatta6.1vc.img -cdrom ./vyatta-livecd_VC6.1-2010.08.20_i386.iso -m 512

login/password: vyatta/vyatta

4. Install Live CD

To install Live CD to Qemu image enter this command (as user vyatta)

install-system

The tutorial is opened and it walk you through installation process:

Would you like to continue? (Yes/No) [YES]: Enter

Partition (Auto/Union/Parted/Skip) [Auto]: Enter

Install the image on? [sda]: Enter

This will destroy all data on /dev/sda.
Continue? (Yes/No) [No]: Yes

How big of root partition should I create? (1000MB - 1074MB) [1074]MB: Enter

I found the following configuration files
/opt/vyatta/etc/config/config.boot
Which one should I copy to sda? [/opt/vyatta/etc/config/config.boot] Enter

Enter password for administrator account
Enter vyatta password: your_password
Retype vyatta password: your_password

Which drive should GRUB modify the boot partition on? [sda]: Enter

Done!
Now you successfully install Vyatta.

5. Adapt Vyatta NIC behavior to GNS3 Qemuwrapper

GNS3 qemuwrapper always changes MAC address of presented NIC during the boot of Qemu instance. Vyatta is programmed to save MAC address of existing ethernet interfaces. If MAC address of particular NIC is changed (by GNS3 qemuwrapper) Vyatta preserves the interface with old MAC and create new interface with new MAC.
Each time Qemu instace is restarted the number of interfaces doubled.

These are my steps how to solve it (it must be a better solution but I didn't find any with Google search):

a) Enable root account on Vyatta 6.1 (thanks to http://www.timpeerlings.nl/ )

vyatta$ configure
vyatta#set system login user root authentication plaintext-password test
vayata# commit
vyatta# save

exit

Now switch to user root:

su
Password: test

b) Remove vyatta_net_name script (root account needed)

cd /lib/udev/
mv ./vyatta_net_name ./vyatta_net_name_backup
rm ./vyatta_net_name


6. Setup serial console login (thanks to http://linux.xvx.cz/2009/08/debian-with ... onnection/ )

This configuration redirects output to serial ttyS0 and allows you to use Console in GNS3.
Login as root with su command and modify grub configuration file:

vim /etc/default/grub

Change the lines in configuration file according to these lines

# This file is sourced by update-grub, and its variables are propagated
# to its children in /etc/grub.d/

GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,9600n8"

# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1"


# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true


Now update grub with command:

update-grub


7. Setup GNS3 for Vyatta qemu image

- Start GNS3
- Edit-> Preferences-> Qemu-> Qemu Host

Copy the settings from attachment (gns3-vyatta-settings). Check Kvm only if your processor supports hardware virtualization. Check Kqemu only if it is installed and running. If you are not sure with these options let them unchecked otherwise Qemu will be not started.

You need also set Qemu general settings like path to qemu, qemu-img and qemuwrapper.

- Edit-> Preferences-> Qemu-> General Settings

Check the attachement for details (qemu-general-settings)

Login to Vyatta:

login/password: vyatta/your_password

8. Conclusion

I made a video to prove functionality of Yvatta Qemu image. In this video three Vyatta Qemu instances run RIP routing protocol.

Quote:
http://www.4shared.com/file/VGWMk6tC/vyatta_on_qemu_gns3.html


You can download Vyatta 6.1 Qemu image from here:

Quote:
http://www.4shared.com/file/Oyg8hpPR/vyatta61vcpart1.html

Quote:
http://www.4shared.com/file/2t5WUBw1/vyatta61vcpart2.html


login/pass: vyatta/skuska

root account: root/skuska (Don't use root account for router configuration)

If you use Linux and there is already non-patched Qemu installed in your distro don't forget to patch, compile and install Qemu for udp tunnels and multicast. The great how to is here:

Quote:
http://blog.gns3.net/2009/10/olive-juniper/2/


Cheers,






Attachments:
qemu-general-settings.jpeg
qemu-general-settings.jpeg [ 102.58 KiB | Viewed 2073 times ]
gns3-vyatta-settings.jpeg
gns3-vyatta-settings.jpeg [ 144.28 KiB | Viewed 2168 times ]

_________________
Brezular

http://brezular.wordpress.com
Top
 Profile  
 
 Post subject: Re: How to install Vyatta 6.1 Core LiveCD on Qemu image
PostPosted: Sun Sep 19, 2010 1:08 am 
Offline

Joined: Mon Nov 10, 2008 10:31 am
Posts: 452
Location: Slovakia
Hi,
I added point 6. Serial console login. The Qemu Vyatta 6.1 image with serial console support is available for download, check rapidshare links, please.

Cheers,

_________________
Brezular

http://brezular.wordpress.com


Top
 Profile  
 
 Post subject: Re: How to install Vyatta 6.1 Core LiveCD on Qemu image in Linux
PostPosted: Fri Nov 26, 2010 8:48 am 
Hi

Nice tutorial

What about in Windows , das vyatta works ?

Regards


Top
  
 
 Post subject: Re: How to install Vyatta 6.1 Core LiveCD on Qemu image in Linux
PostPosted: Fri Nov 26, 2010 11:35 am 
Offline

Joined: Mon Nov 10, 2008 10:31 am
Posts: 452
Location: Slovakia
Hi,
yes - as far as Qemu can be installed on Windows ;-)
Cheers,





_________________
Brezular

http://brezular.wordpress.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO