mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 10:09:07 +00:00
cmd: Adjust run_hyperkit to interface changes
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
47f139eb08
commit
87667051f2
@ -26,6 +26,10 @@ const (
|
|||||||
hyperkitNetworkingDefault = hyperkitNetworkingDockerForMac
|
hyperkitNetworkingDefault = hyperkitNetworkingDockerForMac
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
hyperkit.SetLogger(log.StandardLogger())
|
||||||
|
}
|
||||||
|
|
||||||
// Process the run arguments and execute run
|
// Process the run arguments and execute run
|
||||||
func runHyperKit(args []string) {
|
func runHyperKit(args []string) {
|
||||||
flags := flag.NewFlagSet("hyperkit", flag.ExitOnError)
|
flags := flag.NewFlagSet("hyperkit", flag.ExitOnError)
|
||||||
@ -206,12 +210,15 @@ func runHyperKit(args []string) {
|
|||||||
id = strconv.Itoa(i)
|
id = strconv.Itoa(i)
|
||||||
}
|
}
|
||||||
if d.Size != 0 && d.Path == "" {
|
if d.Size != 0 && d.Path == "" {
|
||||||
d.Path = filepath.Join(*state, "disk"+id+".img")
|
d.Path = filepath.Join(*state, "disk"+id+".raw")
|
||||||
}
|
}
|
||||||
if d.Path == "" {
|
if d.Path == "" {
|
||||||
log.Fatalf("disk specified with no size or name")
|
log.Fatalf("disk specified with no size or name")
|
||||||
}
|
}
|
||||||
hd := hyperkit.DiskConfig{Path: d.Path, Size: d.Size}
|
hd, err := hyperkit.NewDisk(d.Path, d.Size)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("NewDisk failed: %v", err)
|
||||||
|
}
|
||||||
h.Disks = append(h.Disks, hd)
|
h.Disks = append(h.Disks, hd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user