Merge pull request #10306 from bugfood/fix-attach

allow attaching guest additions without a communicator
This commit is contained in:
Megan Marsh 2020-11-30 10:58:23 -08:00 committed by GitHub
commit 862700b1a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -83,9 +83,9 @@ func (c *GuestAdditionsConfig) Prepare(communicatorType string) []error {
fmt.Errorf("guest_additions_mode is invalid. Must be one of: %v", validModes))
}
if communicatorType == "none" && c.GuestAdditionsMode != "disable" {
errs = append(errs, fmt.Errorf("guest_additions_mode has to be "+
"'disable' when communicator = 'none'."))
if communicatorType == "none" && c.GuestAdditionsMode == "upload" {
errs = append(errs, fmt.Errorf("communicator must not be 'none' "+
"when guest_additions_mode = 'upload'."))
}
return errs