From 5537648dc76561a30730ec416569a2c48a8a351c Mon Sep 17 00:00:00 2001 From: Qu Xuan Date: Fri, 7 Feb 2020 16:05:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20google=20e2=E4=B8=8D=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E7=9B=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/compute/guestdrivers/google.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/compute/guestdrivers/google.go b/pkg/compute/guestdrivers/google.go index fd299255cd..ccff94668f 100644 --- a/pkg/compute/guestdrivers/google.go +++ b/pkg/compute/guestdrivers/google.go @@ -150,6 +150,9 @@ func (self *SGoogleGuestDriver) ValidateCreateData(ctx context.Context, userCred if localDisk > 8 { return nil, httperrors.NewInputParameterError("%s disk cannot exceed 8", api.STORAGE_GOOGLE_LOCAL_SSD) } + if localDisk > 0 && strings.HasPrefix(input.InstanceType, "e2") { + return nil, httperrors.NewNotSupportedError("%s for %s features are not compatible for creating instance", input.InstanceType, api.STORAGE_GOOGLE_LOCAL_SSD) + } return input, nil }