Skip to content

Commit

Permalink
Move base vmx into stemcell builder
Browse files Browse the repository at this point in the history
Signed-off-by: Ashwin Venkatesh <avenkatesh@pivotal.io>
  • Loading branch information
mdelillo authored and bot committed Apr 10, 2018
1 parent 8e11cab commit ed7019e
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/tasks/build/vsphere.rake
Expand Up @@ -86,7 +86,7 @@ namespace :build do
end

# Setup base vmx file for packer to use
vmx_template_txt = File.read("../ci/bosh-windows-stemcell-builder/create-vsphere-patchfile/old-base-vmx.vmx")
vmx_template_txt = File.read("resources/old-base-vmx.vmx")
new_vmx_txt = vmx_template_txt.gsub("INIT_VMDK",vmdk_path)
config_vmx = Tempfile.new(["config", ".vmx"])
File.write(config_vmx.path, new_vmx_txt)
Expand Down
77 changes: 77 additions & 0 deletions resources/old-base-vmx.vmx
@@ -0,0 +1,77 @@
.encoding = "UTF-8"
checkpoint.vmState = ""
cleanShutdown = "TRUE"
config.version = "8"
displayName = "BOSH-Windows-Stemcell"
ehci.pciSlotNumber = "34"
ehci.present = "TRUE"
ehci:0.deviceType = "video"
ehci:0.parent = "-1"
ehci:0.port = "0"
ethernet0.addressType = "generated"
ethernet0.connectionType = "nat"
ethernet0.generatedAddress = "00:0c:29:44:c9:a1"
ethernet0.generatedAddressOffset = "0"
ethernet0.linkStatePropagation.enable = "TRUE"
ethernet0.pciSlotNumber = "192"
ethernet0.present = "TRUE"
ethernet0.virtualDev = "e1000e"
ethernet0.wakeOnPcktRcv = "FALSE"
floppy0.present = "FALSE"
guestOS = "windows8srv-64"
hgfs.linkRootShare = "true"
hgfs.mapRootShare = "true"
hpet0.present = "TRUE"
ide0:0.autodetect = "TRUE"
ide0:0.deviceType = "cdrom-raw"
ide0:0.present = "TRUE"
ide0:0.startConnected = "FALSE"
isolation.tools.hgfs.disable = "false"
mem.hotadd = "TRUE"
memsize = "4096"
mks.enable3d = "TRUE"
monitor.phys_bits_used = "40"
numvcpus = "4"
pciBridge0.pciSlotNumber = "17"
pciBridge0.present = "TRUE"
pciBridge4.functions = "8"
pciBridge4.pciSlotNumber = "21"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge5.pciSlotNumber = "22"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge6.pciSlotNumber = "23"
pciBridge6.present = "TRUE"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
pciBridge7.pciSlotNumber = "24"
pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
powerType.powerOff = "soft"
powerType.powerOn = "soft"
powerType.reset = "soft"
powerType.suspend = "soft"
sata0.present = "FALSE"
sata0:1.present = "FALSE"
scsi0.pciSlotNumber = "160"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsisas1068"
scsi0:0.fileName = "INIT_VMDK"
scsi0:0.present = "TRUE"
scsi0:0.redo = ""
serial0.fileType = "thinprint"
serial0.present = "TRUE"
softPowerOff = "TRUE"
tools.remindInstall = "FALSE"
tools.syncTime = "TRUE"
tools.upgrade.policy = "upgradeAtPowerCycle"
toolsInstallManager.lastInstallError = "0"
toolsInstallManager.updateCounter = "1"
vcpu.hotadd = "TRUE"
virtualHW.productCompatibility = "hosted"
virtualHW.version = "9"
vmci0.pciSlotNumber = "35"
vmci0.present = "TRUE"
7 changes: 0 additions & 7 deletions spec/integration/build/vsphere_spec.rb
Expand Up @@ -96,9 +96,6 @@

describe "with patchfile" do
before(:each) do
FileUtils.mkdir_p("../ci/bosh-windows-stemcell-builder/create-vsphere-patchfile")
File.write("../ci/bosh-windows-stemcell-builder/create-vsphere-patchfile/old-base-vmx.vmx", "some-vmx-template")

os_version = 'windows2012R2'
@version = '1200.3.1-build.2'
agent_commit = 'some-agent-commit'
Expand Down Expand Up @@ -167,10 +164,6 @@
allow(Stemcell::Builder::VSphere).to receive(:find_file_by_extn).and_return(@fake_stemcell_path)
end

after(:each) do
FileUtils.rm_rf("../ci/bosh-windows-stemcell-builder/create-vsphere-patchfile")
end

it 'should build a vsphere stemcell from patchfile' do
Rake::Task['build:vsphere_patchfile'].invoke

Expand Down

0 comments on commit ed7019e

Please sign in to comment.