Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native runtime failed to run image #186

Open
johnrichardrinehart opened this issue Dec 14, 2020 · 3 comments
Open

Native runtime failed to run image #186

johnrichardrinehart opened this issue Dec 14, 2020 · 3 comments

Comments

@johnrichardrinehart
Copy link

Executing ./build_and_run.sh in this repo fails to run the built OSv image.

It seems that my image is using the information specified in meta/run.yaml, since the capstan package compose command outputs (among other things)

Command line will be set based on config_set_default attribute of meta/run.yaml

and meta/run.yaml looks like

runtime: native

config_set: 

   ################################################################
   ### This is one configuration set (feel free to rename it).  ###
   ################################################################
   myconfig1:
      # REQUIRED
      # Command to be executed in OSv.
      # Note that package root will correspond to filesystem root (/) in OSv image.
      # Example value: /usr/bin/simpleFoam.so -help
      bootcmd: /hw

   # Add as many named configurations as you need

# OPTIONAL
# What config_set should be used as default.
# This value can be overwritten with --runconfig argument.
config_set_default: myconfig1

but then ./capstan run demo seems to run the wrong command, outputting:

Command line set to: 'runscript /run/myconfig1;'
Command line will be set to default boot
Created instance: demo
Setting cmdline: runscript /run/default;

So, it's not running /run/myconfig1.

Full compose output:

Command line will be set based on config_set_default attribute of meta/run.yaml
Resolved runtime into: native
extractPackageContent: osv.bootstrap
Importing demo...
Importing into /home/john/.capstan/repository/demo/demo.qemu
Uploading files to /home/john/.capstan/repository/demo/demo.qemu...
Setting cmdline: --norandom --nomount --noinit /tools/mkfs.so; /tools/cpiod.so --prefix /zfs/zfs; /zfs.so set compression=off osv
Uploading files  <------------------------------------------------------------------> 106 p/s 100.00%
Command line set to: 'runscript /run/myconfig1;'

Full ./capstan -v run output:

➜  capstan-project git:(master) ✗ ./capstan run -v demo       
Removing orphaned instance folder: /home/john/.capstan/instances/qemu/demo
Command line will be set to default boot
Created instance: demo
Setting cmdline: runscript /run/default;
Invoking QEMU at: /usr/bin/qemu-system-x86_64 with arguments:
  -vnc :1
  -m 1024
  -smp 2
  -device virtio-blk-pci,id=blk0,bootindex=0,drive=hd0
  -drive file=/home/john/.capstan/instances/qemu/demo/disk.qcow2,if=none,id=hd0,aio=threads,cache=none
  -chardev stdio,mux=on,id=stdio,signal=off
  -device isa-serial,chardev=stdio
  -netdev user,id=un0,net=192.168.122.0/24,host=192.168.122.1
  -device virtio-net-pci,netdev=un0
  -chardev socket,id=charmonitor,path=/home/john/.capstan/instances/qemu/demo/osv.monitor,server,nowait
  -mon chardev=charmonitor,id=monitor,mode=control
OSv v0.55.0-2-gdbfb0bb1
eth0: 192.168.122.15
Booted up in 0.00 ms
Cmdline: runscript /run/default;
Failed to open runscript file '/run/default'.
Failed to parse command line.
@johnrichardrinehart johnrichardrinehart changed the title Native runtime failed to build image Native runtime failed to run image Dec 14, 2020
@wkozaczuk
Copy link
Collaborator

@johnrichardrinehart I do not see build_and_run.sh in that repo. This is probably most-up-to-date Wiki -
https://github.com/cloudius-systems/capstan/blob/master/Documentation/ApplicationManagement.md - that documents the 'package' mode of creating OSv images.

Here is the simplest example of building an image with node.js example:

capstan package compose --pull-missing --require osv.node-js node-example
capstan run -p qemu -v --execute '/libnode.so' node-example

@johnrichardrinehart
Copy link
Author

Agh. I failed to rename. build.sh builds and runs. It's build_and_run.sh.

@johnrichardrinehart
Copy link
Author

I'll try your instructions tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants