Add os_version and os_features to Image
These fields are needed to specify the exact version of Windows that an image can run on. They may be useful for other platforms in the future. This also changes image.store.Create to validate that the loaded image is supported on the current machine. This change affects Linux as well, since it now validates the architecture and OS fields. Signed-off-by: John Starks <jostarks@microsoft.com>
This commit is contained in:
parent
d70faf86e8
commit
335e27d88c
3 changed files with 27 additions and 8 deletions
|
@ -59,10 +59,7 @@ func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) {
|
|||
// console which supports ANSI emulation, or fall-back to the golang emulator
|
||||
// (github.com/azure/go-ansiterm).
|
||||
func useNativeConsole() bool {
|
||||
osv, err := system.GetOSVersion()
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
osv := system.GetOSVersion()
|
||||
|
||||
// Native console is not available before major version 10
|
||||
if osv.MajorVersion < 10 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue