hooklift / govmx

Encoding and decoding Go library for VMware VMX files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VMX property values that can contain '=' characters break parsing

johlandabee opened this issue · comments

VMX property values that can contain '=' characters break parsing due to how loadVMXMap() is implemented:

govmx/decode.go

Lines 54 to 57 in 983fd93

parts := strings.Split(line, "=")
if len(parts) != 2 {
errors = appendErrors(errors, fmt.Errorf("Invalid line: %s ", line))
}

This came up while trying to create machines with https://github.com/hooklift/terraform-provider-vix using this https://app.vagrantup.com/generic/boxes/ubuntu1804/versions/3.0.10/providers/vmware_desktop.box Vagrant box.

The box has a guestos.detailed.data property defined with the value bitness='64' distroName='Ubuntu' distroVersion='18.04' familyName='Linux' kernelVersion='4.15.0-76-generic' prettyName='Ubuntu 18.04.4 LTS'

I'll submit a pull request.