How to automate install ubuntu 24 server on VMWare Fusion

How to automate install ubuntu 24 server on VMWare Fusion
ubuntu desktop
  1. Download Ubuntu Server ARM version here.
  2. Download VMWare Fusion for Mac OS Apple Silicon here.
  3. Install your VMWare Fusion on your Mac.
  4. Run VMware and create new Virtual Machine.
  5. Choose Linux and Ubuntu For ARM.
  6. Configure your CPU, Memory and Disk wanna to be use on VM.
  7. Don't click finish, click customize setting and save disk to your vm location folder.
  8. Don't close your VMWare window and continue to this, next open your terminal.
  9. Run this command to start create config file :
    mkdir ubuntuautomation
    cd ubuntuautomation
    touch meta-data
    nano user-data
    
  10. Paste this script ans save by type ctrl + x
    #cloud-config
    autoinstall:
    version: 1
    identity:
        hostname: ubuntu-server
        username: ubuntu
        password: "$6$K9Rzffei1cfS.dPW$v1YZ4AltToA2HB92Ls2crSb1TNkNKiX7dIIC/giLgpYQsuE./qrtn4XvSsfPOer/bogz/1wSnO/NrKOVipeY8/"
    keyboard:
        layout: us
    locale: en_US.UTF-8
    storage:
        layout:
        name: lvm
    ssh:
        allow-pw: true
    packages:
        - openssh-server
    
  11. Run this command to create secondary iso for automation installer :
    hdiutil makehybrid -o autoinstall.iso -hfs -iso -joliet -default-volume-name CIDATA cidata/
    
  12. After that you can see autoinstall.iso and continue back to VMWare setting window
  13. Add your autoinstall.iso on first cdrom
  14. Add new cdrom and add your ubuntu installer on there
  15. Change bootable to cdrom
  16. Start the VM and type e on try and install
  17. On line linux /casper/vmlinuz --- change to linux /casper/vmlinuz autoinstall ds=nocloud-net;s=/cdrom/ —--
  18. Type f10 to start automation install and let it done.
  19. After installed successfully, disconnect all cdrom and you can start login with username ubuntu pass is user and then you can change the password.