direktiv / vorteil

turn your applications and containers into micro virtual machines
https://direktiv.io
Apache License 2.0
174 stars 13 forks source link

Resolves #42 #41 #40, also resolves a bug with virtualbox on windows #44

Closed trentis closed 4 years ago

trentis commented 4 years ago

42 #41 #40

jalfvort commented 4 years ago

There is one additional problem discovered that somewhat relates to issue #40 . It looks like the earlier than the kernel manager or whatever merges the default kernel values. Here is an example of what kind of problem this causes:

Scenario 1 - Not Kernel defined :

VCFG

....
[vm]
  cpus = 1
  ram = "91 MiB"
  inodes = 100
  disk-size = "+10 MiB"
.$ /cli run /tmp/helloworld/ --platform firecracker
Scanning inputs  ⠋                                                                                
Writing image done [=================================] 32.0 MiB / 32.0 MiB
Kernel 'firecracker-' VMLinux does not exist

visualizers logic thinks kernel is = "" , but it should be whatever the default / latest kernel is.

Scenario 2 - Old Kernel defined :

VCFG

....
[vm]
  cpus = 1
  ram = "91 MiB"
  inodes = 100
  kernel = "20.8.3"
  disk-size = "+10 MiB"
$ ./cli run /tmp/helloworld/ --platform firecracker
Scanning inputs  ⠋                                                                                
Requested kernel '20.8.3' is too old for this compiler. Using latest kernel instead.
Writing image done [==============================] 32.0 MiB / 32.0 MiB
Kernel 'firecracker-20.8.3' VMLinux does not exist

visualizers logic thinks kernel is = "20.8.3" (from vcfg) , but it should be whatever the default / latest kernel is (kernel manger is setting this).

I can approve the pr for now if you want and make this another issue, but I thought I would see if you wanted to fix this issue in this pr.