Commit Graph

93 Commits

Author SHA1 Message Date
Rolf Neugebauer
82c7118de9 kernels: Create LinuKit kernel images from Ubuntu mainline
The Ubuntu mainline PPA has kernel.org based kernels for many
kernel releaseis.  This commit adds suport for downloading and
converting the 3.16.x long long term support kernel as well
as the current 4.x series.  The "mainline.sh" script only
downloads/processes kernels which have not yet been put on
Hub.

The kernels are stored under "linuxkit/kernel-mainline" and are
tagged with the kernel version.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-28 17:07:24 +01:00
Rolf Neugebauer
b432b9c8ca scripts: Add simple Powershell script to manage Hyper-V VMs
This script can create/start/stop/remove Hyper-V VMs. The
VMs are configured as Gen2 VMs which boot from EFI ISOs.

Network and Disk configuration is optional.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-27 14:41:07 +01:00
Dave Tucker
11fcf087ca makefile: Use moby run qemu
This deprectes scripts/qemu.sh as moby run qemu can now safely be run in
CI, where we currently used the qemu container

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-24 15:17:01 +01:00
Sebastiaan van Stijn
19a3123f09 Add AUTHORS file and script
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-17 10:30:28 -05:00
Rolf Neugebauer
fcd407787b scripts: Use qemu from linuxkit hub org
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-12 21:28:17 +01:00
Justin Cormack
c3031e22a3 Remove some obsolete scripts
- one was old for installing in d4m no longer relevant
- the other is relaced by `docker run hyperkit`

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-06 17:57:16 +01:00
Thomas Gazagnaire
7f0761c5f1 Really fix make qemu
Previously, the cmdline file was never sent in the build context which
caused the script to pick the default options.

Also, when mulitple options are specified (not the default) the right
escaping needs to be used.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-06 16:05:35 +02:00
Dave Tucker
6726746484 Add a runner for UEFI ISOs
Fixes #480

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-03 14:13:37 +01:00
Justin Cormack
668408614f Use moby run to run hyperkit in Makefile
- cut down the hyperkit script but leave as reference for now
- an error left over after shutdown that needs removing at some point

fix #1375

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-24 18:52:42 +00:00
Justin Cormack
76cb22f927 Fix hyperkit script to use correct command line
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-20 15:51:33 +00:00
Justin Cormack
9208496d82 Output kernel command line to a file in the kernel+initrd output case
Trying to find the relevant yaml file was an issue as we now support
`--name` and it might be in a different directory, so although it is
a bit verbose outputing a whole file at least it is more consistent.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-20 13:43:09 +00:00
Justin Cormack
57fbdd95cc Make the hyperkit script try harder to find executables
Currently if you just do `make` the hyperkit executables won't get
put in `bin/`, so try to extract from OSX.

This is temporary until get a better runner, but makes it nicer after `make clean`.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-15 16:03:25 +00:00
Justin Cormack
8427af09c5 Make the hyperkit script get the kernel command line if just passed a name
This is all slightly annoying, maybe we should make a file for the CLI for
hyperkit, but this is better and fixes a bug that the test CLI was coming from moby,
and is easier to use with custom builds.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-15 15:01:47 +00:00
Ian Campbell
0dbb1e6e97 qemu: Enable KVM support and switch to Q35
Passing accel=kvm:tcg causes it to try KVM first if available with a fallback
to TCG (emulated/JIT mode) if it is not available. With this the boot logs gain:

+Hypervisor detected: KVM

and also

-Booting paravirtualized kernel on bare hardware
+Booting paravirtualized kernel on KVM

Among various other noise.

If I rename my host /dev/kvm then this is reversed, although with the following
message:

  Could not access KVM kernel module: No such file or directory
  failed to initialize KVM: No such file or directory
  Back to tcg accelerator.

Q35 is a more modern emulated platform based on the ICH9 host chipset rather
than the default "pc" I440FX (Pentium Pro / Pentium II era) emulation. See
http://wiki.qemu-project.org/Features/Q35 for more info. Switching to Q35 is
not a requirement for enabling KVM but seemed like a reasonable change.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-13 15:39:08 +00:00
Tycho Andersen
a383e6bb46 hoist kernel cmdline into moby.yaml
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-09 14:29:40 -08:00
Tycho Andersen
8a3ae66f64 hoist kernel command line out of qemu docker image
we want to fiddle with this for selinux, and probably for other things too.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-09 11:13:49 -08:00
Justin Cormack
5ab5b32413 Cleanup after merge
- update README
- script to start qemu
- fixes to hyperkit

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-07 12:23:53 +00:00
Justin Cormack
5996dc8418 Merge pull request #1248 from justincormack/remove-alpine
Out with the old, in with the new Moby
2017-03-07 09:37:20 +00:00
Justin Cormack
159202416c Out with the old, in with the new Moby
- remove remainder of editions code
- add a new check container to run tests without Docker
- switch over `make test` to use new command to build tests

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-06 22:28:41 +00:00
Tycho Andersen
fb22969380 fix some shellcheck issues
In d4m.sh line 14:
    (cd $DB && \
        ^-- SC2086: Double quote to prevent globbing and word splitting.

In d4m.sh line 21:
(cd $DB; git reset --hard)
    ^-- SC2086: Double quote to prevent globbing and word splitting.

In d4m.sh line 22:
if [ -f ${DB}/${DB_BRIDGE} ]; then
        ^-- SC2086: Double quote to prevent globbing and word splitting.

In d4m.sh line 23:
    content=$(cat ${DB}/${DB_BRIDGE})
                  ^-- SC2086: Double quote to prevent globbing and word splitting.

In d4m.sh line 24:
    [ ${content} != "1" ] && enable_bridge
      ^-- SC2086: Double quote to prevent globbing and word splitting.

In d4m.sh line 34:
dd if=/dev/zero of=$DISK bs=1048576 count=256
                   ^-- SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-06 13:25:45 -08:00
Rolf Neugebauer
30dae6b278 scripts: Fix enabling of VPNKit L2 bridge mode
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-01 16:28:31 -08:00
Justin Cormack
4ffd42e4f0 slirp binary renamed to vpnkit
Recently com.docker.slirp was renamed.

Please update Docker for Mac before using this script...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-28 17:52:38 -08:00
Rolf Neugebauer
2a7972e0b3 scripts: Add script to run a hyperkit with moby on the DfM network
This requires a VPNKit which includes https://github.com/docker/vpnkit/pull/188

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-02-23 11:26:49 -08:00
Justin Cormack
6aab136adc dd unit size is very non standard, just use numbers
On OSX the system version uses `m` but `brew` will install a version
that only understands `M`...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-13 11:50:07 +00:00
Justin Cormack
bf88aa69d2 Fix OSX script for directory moves
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-09 13:59:16 +00:00
Justin Cormack
4aa0444c92 Move hyperkit script to scripts directory
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-06 15:28:32 +00:00
Justin Cormack
f75039f9bc Clean up scripts
- the binfmt script is not needed
- rename the script to instal in Docker for Mac

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-19 17:06:41 +00:00
Justin Cormack
f190512e2e Add some missing --rm in docker run
Some of these were missing, leaving strays around.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-09 09:08:22 -08:00
Justin Cormack
8a5f15a6bd improve restart of osx script
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-14 20:34:57 +00:00
Natanael Copa
3f13365771 Only backup vmlinuz/initrd once with moby script
We probably want keep the backup of the original so don't overwrite
backup if it exists.

Signed-off-by: Natanael Copa <natanael.copa@docker.com>
2016-07-26 17:33:32 +02:00
Natanael Copa
d976eef44e Minor readabaility cleanup of scripts/moby.sh
Use a variable $mobydir to make script more readable. No changes in
functionality.

Signed-off-by: Natanael Copa <natanael.copa@docker.com>
2016-07-26 17:33:32 +02:00
Natanael Copa
66ba586cac Move built kernel to arch specific subdir
We want be able to build kernels for different archs without that they
clash with each other so we but the generated files into an $arch subdir.

Signed-off-by: Natanael Copa <natanael.copa@docker.com>
2016-07-25 17:18:02 +02:00
Justin Cormack
d4131e9bc0 modernise...
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-07-12 16:02:49 +01:00
Justin Cormack
deb29a7f56 posixly correct
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-07-12 15:44:43 +01:00
Justin Cormack
df4eeaff80 clean up moby script, add undo option
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-07-12 13:34:49 +01:00
Rolf Neugebauer
b037de72b1 win: remove PS script and documentation. They live elsewhere now
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-02-05 16:58:59 -08:00
Rolf Neugebauer
cd61eff2f4 doc: Add notes on how to run docker against MobyLinux
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-01-28 15:09:48 -08:00
Rolf Neugebauer
b47f280302 Hyper-V: remove the force stop now that the Hyper-V deamons are running
Also, minor, unrelated tweak to the documentation

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-01-28 09:17:44 -08:00
Rolf Neugebauer
454b00dbd9 hyperv: Add script and notes on how to boot Moby on Hyper-V
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-01-25 17:46:45 +00:00
Justin Cormack
90dd1fb273 improve script
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-01-22 18:36:34 +00:00
Justin Cormack
e0acb831a8 script to restart docker4mac
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-01-22 17:37:27 +00:00
Justin Cormack
76d4d05924 fix binfmat paths
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2016-01-08 10:49:13 +00:00
Justin Cormack
453f38e64a add in all the other architectures from binfmt misc and script to generate them
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2016-01-07 16:12:35 +00:00