From 3cf4c63a875b063f02b6633464adaeceba02df84 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Fri, 9 Nov 2018 14:00:07 -0800 Subject: [PATCH] Change antiquated Master/Slave terminology for disk drives to more appropriate Primary/Secondary. --- builder/vmware/iso/step_create_vmx.go | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/builder/vmware/iso/step_create_vmx.go b/builder/vmware/iso/step_create_vmx.go index 432d543fe..d879cb3ef 100644 --- a/builder/vmware/iso/step_create_vmx.go +++ b/builder/vmware/iso/step_create_vmx.go @@ -28,10 +28,10 @@ type vmxTemplateData struct { SATA_Present string NVME_Present string - DiskName string - DiskType string - CDROMType string - CDROMType_MasterSlave string + DiskName string + DiskType string + CDROMType string + CDROMType_PrimarySecondary string Network_Type string Network_Device string @@ -383,10 +383,10 @@ func (s *stepCreateVMX) Run(_ context.Context, state multistep.StateBag) multist SATA_Present: "FALSE", NVME_Present: "FALSE", - DiskType: "scsi", - HDD_BootOrder: "scsi0:0", - CDROMType: "ide", - CDROMType_MasterSlave: "0", + DiskType: "scsi", + HDD_BootOrder: "scsi0:0", + CDROMType: "ide", + CDROMType_PrimarySecondary: "0", Network_Adapter: "e1000", @@ -406,20 +406,20 @@ func (s *stepCreateVMX) Run(_ context.Context, state multistep.StateBag) multist case "ide": templateData.DiskType = "ide" templateData.CDROMType = "ide" - templateData.CDROMType_MasterSlave = "1" + templateData.CDROMType_PrimarySecondary = "1" templateData.HDD_BootOrder = "ide0:0" case "sata": templateData.SATA_Present = "TRUE" templateData.DiskType = "sata" templateData.CDROMType = "sata" - templateData.CDROMType_MasterSlave = "1" + templateData.CDROMType_PrimarySecondary = "1" templateData.HDD_BootOrder = "sata0:0" case "nvme": templateData.NVME_Present = "TRUE" templateData.DiskType = "nvme" templateData.SATA_Present = "TRUE" templateData.CDROMType = "sata" - templateData.CDROMType_MasterSlave = "0" + templateData.CDROMType_PrimarySecondary = "0" templateData.HDD_BootOrder = "nvme0:0" case "scsi": diskAdapterType = "lsilogic" @@ -429,7 +429,7 @@ func (s *stepCreateVMX) Run(_ context.Context, state multistep.StateBag) multist templateData.SCSI_diskAdapterType = diskAdapterType templateData.DiskType = "scsi" templateData.CDROMType = "ide" - templateData.CDROMType_MasterSlave = "0" + templateData.CDROMType_PrimarySecondary = "0" templateData.HDD_BootOrder = "scsi0:0" } @@ -440,9 +440,9 @@ func (s *stepCreateVMX) Run(_ context.Context, state multistep.StateBag) multist if cdromAdapterType == "" { cdromAdapterType = templateData.CDROMType } else if cdromAdapterType == diskAdapterType { - templateData.CDROMType_MasterSlave = "1" + templateData.CDROMType_PrimarySecondary = "1" } else { - templateData.CDROMType_MasterSlave = "0" + templateData.CDROMType_PrimarySecondary = "0" } switch cdromAdapterType { @@ -686,9 +686,9 @@ nvme0.present = "{{ .NVME_Present }}" {{ .DiskType }}0:0.present = "TRUE" {{ .DiskType }}0:0.fileName = "{{ .DiskName }}.vmdk" -{{ .CDROMType }}0:{{ .CDROMType_MasterSlave }}.present = "TRUE" -{{ .CDROMType }}0:{{ .CDROMType_MasterSlave }}.fileName = "{{ .ISOPath }}" -{{ .CDROMType }}0:{{ .CDROMType_MasterSlave }}.deviceType = "cdrom-image" +{{ .CDROMType }}0:{{ .CDROMType_PrimarySecondary }}.present = "TRUE" +{{ .CDROMType }}0:{{ .CDROMType_PrimarySecondary }}.fileName = "{{ .ISOPath }}" +{{ .CDROMType }}0:{{ .CDROMType_PrimarySecondary }}.deviceType = "cdrom-image" isolation.tools.hgfs.disable = "FALSE" memsize = "512"