mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 09:39:08 +00:00
infrakit: rename the Moby property to kernel+initrd
The infrakit plugin is not specific to Moby and should be able to boot other Linux systems as long as a kernel image and initial RAM disk are supplied. Reflect this in the property passed to the plugin. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
70a27b667e
commit
34af633552
@ -13,7 +13,7 @@
|
||||
"Instance": {
|
||||
"Plugin": "instance-hyperkit",
|
||||
"Properties": {
|
||||
"Moby": "etcd",
|
||||
"kernel+initrd": "etcd",
|
||||
"Disk" : 1024,
|
||||
"CPUs" : 1,
|
||||
"Memory" : 1024
|
||||
|
@ -7,7 +7,8 @@
|
||||
"Instance": {
|
||||
"Plugin": "instance-hyperkit",
|
||||
"Properties": {
|
||||
"Moby": "../../moby",
|
||||
"_comment" : "kernel+initrd specifies the prefix as in <prefix>-bzImage and <prefix>-initrd.img",
|
||||
"kernel+initrd": "linux",
|
||||
"Disk" : 512,
|
||||
"CPUs" : 2,
|
||||
"Memory" : 1024
|
||||
|
@ -54,8 +54,8 @@ func (p hyperkitPlugin) Provision(spec instance.Spec) (*instance.ID, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if properties["Moby"] == nil {
|
||||
return nil, errors.New("Property 'Moby' must be set")
|
||||
if properties["kernel+initrd"] == nil {
|
||||
return nil, errors.New("Property 'kernel+initrd' must be set")
|
||||
}
|
||||
if properties["CPUs"] == nil {
|
||||
properties["CPUs"] = 1
|
||||
@ -122,8 +122,8 @@ func (p hyperkitPlugin) Provision(spec instance.Spec) (*instance.ID, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
h.Kernel = properties["Moby"].(string) + "-bzImage"
|
||||
h.Initrd = properties["Moby"].(string) + "-initrd.img"
|
||||
h.Kernel = properties["kernel+initrd"].(string) + "-bzImage"
|
||||
h.Initrd = properties["kernel+initrd"].(string) + "-initrd.img"
|
||||
h.UUID = uuidStr
|
||||
h.DiskImage = diskImage
|
||||
h.ISOImage = isoImage
|
||||
|
Loading…
Reference in New Issue
Block a user