Date: Tue, 3 Jul 2012 07:04:02 +0000 From: dhaneshk k <dhaneshkk@hotmail.com> To: <freebsd-questions@freebsd.org> Subject: Networking IP Address Issues : NetBSD on Xen VM Message-ID: <BLU154-W36807BE6408BE469B53C54B2E90@phx.gbl>
next in thread | raw e-mail | index | archive | help
List=2C Little bit offtopic of FreBSD=2C Hope some one can help with some suggestio= ns.. The Objective is to port NetBSD as a Virtual Machine into Cloud. Steps Involved in Porting NetBSD as a Virtual Machine: Porting of NetBSD as a Virtual Machine involves 2 steps. A. Porting NetBSD w.r.t Virtualization B. Porting NetBSD w.r.t Cloud MiddleWare If Step 1 is completed successfully=2C then only Step2 could be proceeded. A. Porting NetBSD w.r.t Virtualization: =20 We use Xen Virtualization.Xen Virtualization involves the following steps. Various methods are available to port NetBSD as Virtual Machine in Xen 1. Building from ISO ( Via Paravirtualization - Using NetBSD community provided Kernel / Full Virtualization - using Qemu ) 2. Building the NetBSD File System from the Source We have tried both the ways. 1.1 Building from ISO ( Via Paravirtualization - Using NetBSD community provided Kernel ): 1. Get the ISO file of NetBSD Operating System . 2. Build the IMG File from the ISO File by using NetBSD community provided Kernel=20 Refer : http://www.netbsd.org/ports/xen/howto.html 1.2 Building from ISO ( Via Full virtualization - Using Qemu): Refer: http://open.eucalyptus.com/wiki/creating-images-iso-xen By following the above Step=2C the following version of NetBSD Image was built. Version NetBSD 5.1 Kernel XEN3_DOMU Kernel Version NetBSD netbsd51.yourdomain.org 5.1 NetBSD 5.1 (XEN3_DOMU) #0: Sat Nov 6 13:17:16 UTC 2010 builds@b6.netbsd.org:/home/builds/ab/netbsd-5-1-RELEASE/amd64/201011061943Z= -obj/home/builds/ab/netbsd-5-1-RELEASE/src/sys/arch/amd64/compile/XEN3_DOMU amd64 Architecture amd64 / 64 Bit Guest Virtual Machine Working Components : The NetBSD Guest is booted successfully in Multi User Mode=2C which enables root user to create / delete files / directories. The Network Interface is xennet0 The File System details are as follows. Filesystem Size Used Avail %Cap Mounted on /dev/xbd0a 9.5 GB 628 MB 8.4 GB 6% / kernfs 1.0K 1.0K 0B 100% /kern ptyfs 1.0K 1.0K 0B 100% /dev/pts procfs 4.0K 4.0K 0B 100% /proc Issues Faced: Unable to set IP Address manually (or) via dhclient command. Even though static IP Address is assigned=2C netmask=2Cgateway is set=2C the NetBSD Guest Virtual Machine is unable to connect to outside Network=3B Machines in outside network=20 are also unable to connect to the NetBSD Guest Virtual=20 Machine . Please shed some light on this=2C Why this issue occurs ? Or doing wrong = way? 2. Building the NetBSD File System and Kernel from the Source: NetBSD Image could be built by connecting to the NetBSD repository=2C download the Source packages=2C compile and build the Kernel and the NetBSD File System=3B at last convert the NetBSD File System into a single Image via makefs command. I compiled 64 Bit NetBSD Kernel and 64 Bit NetBSD File System. B. Porting NetBSD into Cloud MiddleWare: Porting NetBSD into Cloud Middleware involves bundling =2C uploading and registering Kernel=2C RamDisk and Machine Image into Cloud. The NetBSD Image has been uploaded into cloud and a sample Virtual Machine was run Successfully in our Cloud Setup (192.168.1.6). Refer : http://blog.netbsd.org/tnf/entry/netbsd_now_runs_under_amazon By following this procedure=2C the following version of NetBSD Image was built. Version NetBSD 6.99.8 Kernel XEN3_DOMU Kernel Version NetBSD 6.99.8 NetBSD 6.99.8 (XEN3_DOMU) #0: Fri Jun 29 21:55:59 IST 2012 root@pancdaccloud:/home/src/usr/obj/sys/arch/amd64/compile/XEN3_DOMU amd64 Architecture amd64 / 64 Bit Guest Virtual Machine Working Components : The Network Interface is xennet0 IP Address was obtained successfully via dhclient command. The NetBSD Guest Virtual Machine is able to connect to outside Network=3B Machines in outside network are also able to connect to the NetBSD Guest Virtual Machine . The File System details are as follows. Filesystem Size Used Avail %Cap Mounted on root_device 255 MB 135 MB 107 MB 55% / tmpfs 1.4 MB 632 KB 840 KB 42% /dev Issues Faced: 1.The NetBSD Guest is booted in Single User Mode=2C which disables root user to create / delete files / directories.The Filesystem is mounted in read-only mode. Why the box going to Single user mode? Am I doing wrong ? Common Issues: There are certain places where Human Intervention is required.While NetBSD Virtual Machine Guest is being booted=2C at first it asks for default Interpreter (/bin/sh).At this situation=2C User is required to give a value and press Enter Key.After getting input from the User=2C System Services are getting booted. When the NetBSD Image is uploaded into Cloud=2Cthe IP Address will always be shown as 0.0.0.0=2C and the User is required to login to the Node Controller=2CTake a console of the Virtual Machine=2C specify the Interpreter and run dhclient.But in real time scenario=2CUser logging into the Node Controller is impossible. Attempted Tasks: The following approach was also performed when building NetBSD Image. In both the Cases=2C all the files were mounted in / . To reduce the size of /=2C the following folders were mounted in different mount points. Folder Mount Point usr /usr tmp /tmp root /root home /home The Same problems discussed here were faced. Any hints to solve these issues much appreciated. Thank you Dhanesh =
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BLU154-W36807BE6408BE469B53C54B2E90>