mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +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
|
||||
)
|
||||
|
||||
func init() {
|
||||
hyperkit.SetLogger(log.StandardLogger())
|
||||
}
|
||||
|
||||
// Process the run arguments and execute run
|
||||
func runHyperKit(args []string) {
|
||||
flags := flag.NewFlagSet("hyperkit", flag.ExitOnError)
|
||||
@ -206,12 +210,15 @@ func runHyperKit(args []string) {
|
||||
id = strconv.Itoa(i)
|
||||
}
|
||||
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 == "" {
|
||||
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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user