Page tree
Skip to end of metadata
Go to start of metadata

OSv

OSv is a lightweight operating system specifically designed for cloud workloads. It includes only the functionality necessary to run a single Java or POSIX application, with no support for scheduling multiple processes. For more information, see osv.io.

CloudRouter OSv images

Currently, CloudRouter ships a single OSV image, providing the OpenDaylight SDN Controller. Further images, including one that provides the ONOS SDN controller, are currently in development.

Running the OpenDaylight OSv image

There are two ways to run the OpenDaylight OSv image:

Option 1: Download the image from cloudrouter.org

Download the compressed image from repo.cloudrouter.org.

Uncompress the image:

$ unxz CloudRouter-2.0-OSv-OpenDaylight-20150824.qemu.xz

The uncompressed CloudRouter-2.0-OSv-OpenDaylight-20150824.qemu disk image can now be run on your hypervisor of choice. The image has been tested using KVM with virt-manager on Fedora 22.

Option 2: Build the image yourself from the Capstanfile

First, you must install capstan.

Next, clone the osv-apps repo:

$ git clone git@github.com:cloudius-systems/osv-apps.git
Cloning into 'osv-apps'...
remote: Counting objects: 1411, done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 1411 (delta 3), reused 0 (delta 0), pack-reused 1392
Receiving objects: 100% (1411/1411), 303.34 KiB | 72.00 KiB/s, done.
Resolving deltas: 100% (620/620), done.
Checking connectivity... done.

Change to the opendaylight directory and execute "capstan run". This will automatically build the image before running it:

$ cd osv-apps/opendaylight/
$ capstan run
Building opendaylight...
Downloading cloudius/osv-openjdk/index.yaml...
160 B / 160 B [======================================================================================================================================================] 100.00 % 
Downloading cloudius/osv-openjdk/osv-openjdk.qemu.gz...
73.84 MB / 73.84 MB [================================================================================================================================================] 100.00 % 
Uploading files...
5216 / 5216 [========================================================================================================================================================] 100.00 % Created instance: opendaylight
OSv v0.18
eth0: 192.168.122.15
Unable to update instance pid: Invalid argument
WARNING: fcntl(F_SETLK) stubbed
pthread_setcancelstate() stubbed
[ERROR] Failed to construct terminal; falling back to unsupported
java.io.IOException: Cannot run program "sh": error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
	at java.lang.Runtime.exec(Runtime.java:617)
	at java.lang.Runtime.exec(Runtime.java:485)
	at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:183)
	at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:173)
	at jline.internal.TerminalLineSettings.stty(TerminalLineSettings.java:168)
	at jline.internal.TerminalLineSettings.get(TerminalLineSettings.java:72)
	at jline.internal.TerminalLineSettings.<init>(TerminalLineSettings.java:52)
	at jline.UnixTerminal.<init>(UnixTerminal.java:31)
	at jline.NoInterruptUnixTerminal.<init>(NoInterruptUnixTerminal.java:22)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at java.lang.Class.newInstance(Class.java:374)
	at jline.TerminalFactory.getFlavor(TerminalFactory.java:168)
	at jline.TerminalFactory.create(TerminalFactory.java:81)
	at org.apache.karaf.shell.console.impl.jline.TerminalFactory.init(TerminalFactory.java:37)
	at org.apache.karaf.shell.console.impl.jline.TerminalFactory.getTerminal(TerminalFactory.java:30)
	at org.apache.karaf.shell.console.impl.jline.LocalConsoleManager.start(LocalConsoleManager.java:83)
	at org.apache.karaf.shell.console.impl.jline.LocalConsoleManager.<init>(LocalConsoleManager.java:66)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.apache.aries.blueprint.utils.ReflectionUtils.newInstance(ReflectionUtils.java:329)
	at org.apache.aries.blueprint.container.BeanRecipe.newInstance(BeanRecipe.java:962)
	at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:331)
	at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)
	at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)
	at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)
	at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)
	at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:681)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:378)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)
	at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)
Caused by: java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
	at java.lang.ProcessImpl.start(ProcessImpl.java:130)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
	... 48 more

                                                                                           
    ________                       ________                .__  .__       .__     __       
    \_____  \ ______   ____   ____ \______ \ _____  ___.__.|  | |__| ____ |  |___/  |_     
     /   |   \\____ \_/ __ \ /    \ |    |  \\__  \<   |  ||  | |  |/ ___\|  |  \   __\    
    /    |    \  |_> >  ___/|   |  \|    `   \/ __ \\___  ||  |_|  / /_/  >   Y  \  |      
    \_______  /   __/ \___  >___|  /_______  (____  / ____||____/__\___  /|___|  /__|      
            \/|__|        \/     \/        \/     \/\/            /_____/      \/          
                                                                                           

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.

opendaylight-user@root>

The running image can be terminated with ctrl+c. Now that the image is built and stored in your local repository, you can run it again using "capstan run" without the build step:

$ capstan i
Name                           Description                                        Version                   Created        
cloudius/osv-openjdk           OpenJDK 7/OSv base image for developers            v0.18                     2015-02-27T14:00:04
opendaylight
$ capstan run opendaylight
  • No labels