Merge pull request #2723 from pcfdev-forks/master

allow hyperkit console input/output to be redirected
This commit is contained in:
Justin Cormack 2017-11-15 10:55:51 +00:00 committed by GitHub
commit bebb6a09db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,9 @@ func runHyperKit(args []string) {
isoBoot := flags.Bool("iso", false, "Boot image is an ISO")
kernelBoot := flags.Bool("kernel", false, "Boot image is kernel+initrd+cmdline 'path'-kernel/-initrd/-cmdline")
// Hyperkit settings
consoleToFile := flags.Bool("console-file", false, "Output the console to a tty file")
// Paths and settings for UEFI firmware
// Note, the default uses the firmware shipped with Docker for Mac
fw := flags.String("fw", "/Applications/Docker.app/Contents/Resources/uefi/UEFI.fd", "Path to OVMF firmware for UEFI boot")
@ -197,6 +200,10 @@ func runHyperKit(args []string) {
log.Fatalln("Error creating hyperkit: ", err)
}
if *consoleToFile {
h.Console = hyperkit.ConsoleFile
}
for i, d := range disks {
id := ""
if i != 0 {