ubuntu image vmware
ubuntu image vmware

Ubuntu Image Vmware _verified_ Official

# Command line vmware-vdiskmanager -c -s 50GB -a lsilogic -t 2 "linked-clone.vmdk"

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): ubuntu image vmware

# Preseed file for Ubuntu 22.04/24.04 d-i debian-installer/locale string en_US.UTF-8 d-i keyboard-configuration/xkb-keymap select us d-i netcfg/choose_interface select auto d-i netcfg/get_hostname string ubuntu-vm d-i netcfg/get_domain string local d-i mirror/country string manual d-i mirror/http/hostname string archive.ubuntu.com d-i mirror/http/directory string /ubuntu d-i mirror/http/proxy string Partitioning d-i partman-auto/method string regular d-i partman-auto/choose_recipe select atomic d-i partman-partitioning/confirm_write_new_label boolean true d-i partman/choose_partition select finish d-i partman/confirm boolean true d-i partman/confirm_nooverwrite boolean true User account d-i passwd/root-login boolean false d-i passwd/user-fullname string Developer d-i passwd/username string developer d-i passwd/user-password password developer123 d-i passwd/user-password-again password developer123 Package selection tasksel tasksel/first multiselect ubuntu-server d-i pkgsel/include string openssh-server build-essential git curl vim Boot loader d-i grub-installer/only_debian boolean true d-i grub-installer/bootdev string /dev/sda Finish installation d-i finish-install/reboot_in_progress note Manual Installation Steps 1. Boot from ISO → Select "Install Ubuntu" 2. Keyboard layout: Select your region 3. Updates: "Minimal installation" (for base image) 4. Installation type: "Erase disk and install Ubuntu" 5. Account setup: Create developer account 6. Enable "Install third-party software" 7. Wait for installation completion Part 4: Post-Installation Optimization Install VMware Tools/Open VM Tools # For Ubuntu 22.04+ sudo apt update sudo apt install -y open-vm-tools open-vm-tools-desktop For older versions (14.04-20.04) VMware Tools is included in ISO Enable services sudo systemctl enable vmtoolsd sudo systemctl start vmtoolsd Enable copy-paste and drag-drop sudo vmware-user-suid-wrapper Essential Development Tools # System updates sudo apt update && sudo apt upgrade -y Development essentials sudo apt install -y build-essential cmake gcc g++ python3 python3-pip python3-venv git curl wget vim nano htop net-tools dnsutils software-properties-common apt-transport-https ca-certificates Version control git config --global user.name "Developer" git config --global user.email "dev@example.com" Docker Installation # Add Docker repository curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null Install Docker sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin Add user to docker group sudo usermod -aG docker $USER newgrp docker Programming Languages Setup # Node.js curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt install -y nodejs Python packages pip3 install --upgrade pip pip3 install virtualenv poetry pytest black flake8 Go language wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc Rust curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source ~/.bashrc Part 5: VMware-Specific Optimizations Performance Tuning # /etc/sysctl.d/99-vmware.conf vm.swappiness = 10 vm.dirty_ratio = 30 vm.dirty_background_ratio = 5 Apply settings sudo sysctl -p /etc/sysctl.d/99-vmware.conf Disable unnecessary services sudo systemctl disable bluetooth.service sudo systemctl disable cups.service sudo systemctl disable avahi-daemon.service Optimize GRUB for virtualization Edit /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1 processor.max_cstate=1" # Command line vmware-vdiskmanager -c -s 50GB -a