sudo update-grub # Create mount point sudo mkdir -p /mnt/hgfs Mount shared folders sudo vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other -o uid=1000 Auto-mount on boot Add to /etc/fstab .host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,defaults 0 0 Part 6: Image Customization & Snapshots Create Base Image Template # Clean system before snapshot sudo apt autoremove -y sudo apt autoclean sudo journalctl --rotate sudo journalctl --vacuum-time=1s sudo rm -rf /tmp/* sudo rm -rf /var/tmp/* sudo rm -rf ~/.cache/* Clear bash history cat /dev/null > ~/.bash_history history -c Zero out free space (for better compression) sudo dd if=/dev/zero of=/zero.fill bs=1M sudo rm -f /zero.fill VMware Snapshot Strategy # Using vmrun command (VMware VIX) vmrun -T ws snapshot "Ubuntu-Dev-22.04" "Base-Install" "Clean base installation" vmrun -T ws snapshot "Ubuntu-Dev-22.04" "Dev-Tools" "Development tools installed" vmrun -T ws snapshot "Ubuntu-Dev-22.04" "Project-Ready" "All configurations complete" GUI approach: VM → Snapshot → Take Snapshot - Name: "Stage-1-Base" - Description: "Fresh Ubuntu with updates and VMware tools" Part 7: Clone & Deploy Images Clone Methods Linked Clone (Saves space):
(Portable):
This guide provides a complete foundation for developing and managing Ubuntu images in VMware. Adjust specifications based on your specific development needs and available hardware resources. ubuntu image vmware