Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Stromweld committed Mar 18, 2024
1 parent 4d33f1e commit 1784ecd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.ovf
*.vmdk
*.vdi
*.qcow2
*.log
virtualfloppy.vfd
packer_cache/
Expand Down
4 changes: 2 additions & 2 deletions amazon_linux_2_virtualbox_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ echo "Creating the VM"
# from https://www.perkin.org.uk/posts/create-virtualbox-vm-from-the-command-line.html
VBoxManage createvm --name $VM --ostype "RedHat_64" --register
VBoxManage storagectl $VM --name "SATA Controller" --add sata --controller IntelAHCI
VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$AMZDIR"/amazon.vdi
VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$AMZDIR"/amazon2.vdi
VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 1 --type dvddrive --medium "$AMZDIR"/seed.iso
VBoxManage modifyvm $VM --memory 2048
VBoxManage modifyvm $VM --cpus 2
Expand All @@ -59,7 +59,7 @@ echo Deleting the VM
vboxmanage unregistervm $VM --delete

echo starting packer build of amazonlinux
if packer build -timestamp-ui -only=virtualbox-ovf.amazonlinux -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then
if packer build -timestamp-ui -only=virtualbox-ovf.vm -var "vbox_source_path=$AMZDIR/amazon2.vdi" -var "vbox_checksum=null" -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2-x86_64-virtualbox.pkrvars.hcl "$AMZDIR"/../../packer_templates; then
echo "Cleaning up files"
rm -f "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.iso
else
Expand Down

0 comments on commit 1784ecd

Please sign in to comment.