Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Kutkovsky
Forked from agentsim/highsierra_bootable.sh
Created January 28, 2019 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kutkovsky/0fd223fe9875f152ac860251b2645495 to your computer and use it in GitHub Desktop.
Save Kutkovsky/0fd223fe9875f152ac860251b2645495 to your computer and use it in GitHub Desktop.
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
# Restore the 10.13 Installer's BaseSystem.dmg into file system and place custom BaseSystem.dmg into the root
hdiutil create -o /tmp/HighSierra.cdr -size 8965m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp /tmp/BaseSystem.dmg /Volumes/OS\ X\ Base\ System
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil convert /tmp/HighSierra.cdr.dmg -format UDTO -o /tmp/HighSierra.iso
mv /tmp/HighSierra.iso.cdr ~/Desktop/HighSierra.iso
rm /tmp/HighSierra.cdr.dmg
@Kutkovsky
Copy link
Author

vm.create

Usage: govc vm.create [OPTIONS] NAME

Create VM.

For a list of possible '-g' IDs, see:
http://pubs.vmware.com/vsphere-6-5/topic/com.vmware.wssdk.apiref.doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html

Examples:
govc vm.create vm-name
govc vm.create -m 2048 -c 2 -g freebsd64Guest -net.adapter vmxnet3 -disk.controller pvscsi vm-name

Options:
-annotation= VM description
-c=1 Number of CPUs
-datastore-cluster= Datastore cluster [GOVC_DATASTORE_CLUSTER]
-disk= Disk path (to use existing) OR size (to create new, e.g. 20GB)
-disk-datastore= Datastore for disk file
-disk.controller=scsi Disk controller type
-ds= Datastore [GOVC_DATASTORE]
-firmware=bios Firmware type [bios|efi]
-folder= Inventory folder [GOVC_FOLDER]
-force=false Create VM if vmx already exists
-g=otherGuest Guest OS ID
-host= Host system [GOVC_HOST]
-iso= ISO path
-iso-datastore= Datastore for ISO file
-link=true Link specified disk
-m=1024 Size in MB of memory
-net= Network [GOVC_NETWORK]
-net.adapter=e1000 Network adapter type
-net.address= Network hardware address
-on=true Power on VM. Default is true if -disk argument is given.
-pool= Resource pool [GOVC_RESOURCE_POOL]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment