vSphere-iso -> Notes option

Hello,
Concerning the Hashicorp Packer builder “vsphere-iso”. The option for “notes”, under the Create Configuration section is set to string.

Is there a way to pass multiple lines with a ‘new line’ character within the string? I have tried a bunch of hacks but cannot seem to get anything put a continuous line.

What it should look like in vCenter:

OS=Ubuntu20.04LTS
IP=10.10.10.10
Services=K8_host
Business Owner=Engineer#1
Business Dept=Marketing

How I do this in vRO (JS):

var myAnnotation = (
	"OS= " + operatingSystem + "\r\n" +
	"IP= " + vmIpAddress + "\r\n" +
	"Services= " + vmServices + "\r\n" +
	"Business Owner= " + businessOwner + "\r\n" +
	"Business Dept= " + businessDept
	);

So just figured it out.

  • If you are in vCenter 7+ and using the new view, the notes section might still look like one continuous line but it is not. You can switch to “classic view” within vCenter and validate the notes section.
notes  = "OS=CentOS7_x64\r\nIP=10.10.10.10\r\nServices=K8_host\r\nBussinesOwner=Engineer#1\r\nBussinessDept=Marketing"

of course you can use variables within the string to make life easier.