-
-
Notifications
You must be signed in to change notification settings - Fork 498
How to create a DietPi image for VMware
MichaIng edited this page Sep 10, 2020
·
9 revisions
- Download the latest VMware player: https://www.vmware.com/products/workstation-player.html
- Debian netboot/mini.iso: https://deb.debian.org/debian/dists/buster/main/installer-amd64/current/images/netboot/mini.iso
-
Create a New Virtual Machine
>Installer disc image file (iso)
> select the just downloadedmini.iso
>Next
- Guest operating system:
Linux
> Version:Debian 10.x 64-bit
>Next
- Name:
DietPi_VMware-x86_64-Buster
>Next
- Maximum disk size (GB):
8
>Store virtual disk as a single file
>Next
-
Customize Hardware
:- Memory:
1024 MB
- Processors:
Virtualize Intel VT-x/EPT or AMD-V/RVI
:[x]
check - Network Adapters:
Bridged
>Configure Adapter
: select your hosts internet network adapter - USB Controller:
USB compatibility
>USB 3.1
, uncheckShare Bluetooth devices with the virtual machine
- Remove
Sound Card
andPrinter
to have a most light VM. Everything can be re-added/changed at any time later.
- Memory:
-
Close
>Finish
>Play virtual machine
- NB: The following steps can be automated, however the effort on netboot installers is too high to have any benefit over manually going through the installation for a single VM: https://www.debian.org/releases/stable/amd64/apbs01.html.en#preseed-methods
-
Advanced options
>Expert install
-
Choose language
>English
>United Kingdom
>en_GB.UTF-8
>Continue
(select NO additional locales) -
Configure the keyboard
>British English
Detect network hardware
-
Deselect any
Modules to load
as we don't require them. -
Configure the network
>Yes
(auto-configure) >3
secon - Hostname:
DietPi
- Domain name:
<leave empty>
- APT mirror: Just use one near to your location or
deb.debian.org
. It will be overwritten anyway by DietPi-PREP, as actually most other settings as well 😉. - Debian version to install:
buster - stable
-
Download installer components
: Deselect everything >Continue
-
Set up users
> Enable shadow passwords?Yes
> Allow root login?Yes
> Root password:dietpi
- Create a normal user account now?
No
-
Configure the clock
> Use NTP?Yes
> leave default mirror0.debian.pool.ntp.org
> time zone:UTC
-
Detect disks
> Deselect anyModules to load
>Partition discs
>Manual
> SelectSCSI (sda) VMware
(or similar) > Create new empty partition table?Yes
>msdos
> SelectFREE SPACE
>Create a new partition
> New partition size:max
>Primary
- Verify:
Ext4
and mount point/
>Done setting up the partition
>Finish partitioning
>No
return due to missing swap partition >Yes
write to disk Install the base system
- Select kernel package:
linux-image-amd64
- Select
targeted
since no generic driver installation is required for virtual machines. -
Configure the package manager
>No
nonfree, contrib and especiallyNo
source repository! - Select
security updates
andrelease updates
and skipbackported software
for now, which will be re-added by DietPi-PREP later. -
Select and install software
>No automatic updates
>No
virtualbox-guest extension andNo
survey (user should decide this oneself later) - Deselect all additional software
-
Install the GRUB boot loader
>Yes
to master boot record > to the only available partition (/dev/sda
) >Not
to the EFI removable media path, actually no idea why it detects EFI, as it was not selected on machine and is definitely not available afterwards... -
Finish the installation
> set to UTC?Yes
-
BEFORE
Continue
: Unplug the optical drive (Player
>Removable Devices
>CD/DVD
>Disconnect
> override lock), to prevent reboot into installer >Continue
- Login as root:dietpi
- apt update; apt install -y ca-certificates curl dropbear-run
- Connect via SSH (IP:
ip a
) for easier copy&paste etc.
bash -c "$(curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/master/PREP_SYSTEM_FOR_DIETPI.sh)"
- Git branch:
master
- Enter your name to be shown as image creator within DietPi banner credits.
- Enter
Debian mini.iso
as this was our base image above. - Device:
20 : x86_64 Virtual Machine
- Deselect WiFi functionality for VMs as they virtualise Ethernet adapters for network only.
- Distro version:
5: Buster
shutdown now
- Mount virtual drive (vmdk) to another VM or machine, use
zerofree -v /dev/sdx1
to reduce final image size. In case:apt -y install zerofree
- Compact the image size e.g. with
vmware-vdiskmanager.exe -k /path/to/DietPi_VMware-x86_64-Buster.vmdk
, part of VMware Virtual Disk Development Kit (VDDK).- Compacting the image from VMware player (Select VM >
Edit virtual machine settings
>Hard Disk
>Defragment
>Compact
) should do the same but did not work until the most recent VMware version.
- Compacting the image from VMware player (Select VM >
- Remove all files but the
.vmdk
and.vmx
. - Edit the
.vmx
to lower the hardware revision tovirtualhw.version = "10"
to make it compatible with older VMware/ESXi versions: https://github.com/MichaIng/DietPi/issues/3637- Additionally remove local system related info like the path of the mounted installer
.iso
and such.
- Additionally remove local system related info like the path of the mounted installer
- Create hashes of those two, e.g. using HashMyFiles, saving the report to
hash.txt
. - Download the current README.md: https://raw.githubusercontent.com/MichaIng/DietPi/master/README.md
- Pack the
.vmdk
,.vmx
+README.md
+hash.txt
with 7zip for high compression rate.
Project management
Extend
- DietPi-Software list
- DietPi TCP/UDP port usage list
- How to add a new software title
- How to create a DietPi image for Raspberry Pi
- How to create a DietPi image for VirtualBox
- How to create a DietPi image for VMware
- How to create a DietPi image for Parallels (macOS)
- How to create a DietPi image for x86_64 PCs (BIOS)
- How to create a DietPi image for x86_64 PCs (UEFI)
Knowledge Base