enabling vbox guest additions #419
-
Is there a generalized way to enable the installation of vbox guest additions? That is, I have a working custom build chained from win2019s - The only thing I'm doing different from your repo is adding some packer stuff under var ws2019s_rc = PackerTemplates_CreateWindows(
"ws2019s-rc",
"windows-server-2019-standard-rc",
$"1809.0.{version}",
ws2019s
); I can see several examples where the variable I thought it would be enough to tweak my {
"variables": {
"name": "rc",
"description": "install and configure base stack for RC development",
"virtualbox_guest_additions_mode": "attach"
}
} but no luck so far. If I need to copy the logic from the cookbook in |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@rjhornsby thanks for reaching out. There are a couple of different settings mentioned here. The packer setting Regarding the Chef provisioning, if you use the proper build chaining, the guest additions get installed during the core If you don't use chaining, but build your image from scratch, you need to manually include the relevant recipes or copy the fragments to your own cookbook. Please take a look at how it is sovled for example in the IIS image by simply including the generic Windows recipes. Another simple alternative can be to install the Guest Additions via Chocolatey as Chef handles these packages natively. I hope this helps, please let me know. |
Beta Was this translation helpful? Give feedback.
-
Thanks again for the insight and suggestions. I think I finally figured out that a big part of my problem was that I'd misunderstood or forgotten how the chaining actually worked. Then it was a matter of looking at the IIS example to sort of wrap my cookbooks in between |
Beta Was this translation helpful? Give feedback.
@rjhornsby thanks for reaching out.
There are a couple of different settings mentioned here. The packer setting
virtualbox_guest_additions_mode
in the template JSONs is to control Packer's behavior regarding the guest additions. Since I install it using Chef, that is indeed set todisabled
on purpose, so that the different approaches do not conflict. Thevbox?
condition you refer to has nothing to do with Packer's setting, it is one of Chef's helpers for virtualization.Regarding the Chef provisioning, if you use the proper build chaining, the guest additions get installed during the core
Windows Server 2019
build, and there is no need to install them again in your extension - it is the …