Just received my new Nano and attempting to get up and working with the provided Raspbian LXC template. I've given it 2 cores and 2GB RAM. Upon performing a standard upgrade command, I'm seeing the following...
pi@PiHole:~ $ sudo apt update
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
pi@PiHole:~ $ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up dphys-swapfile (20100506-5+rpt2) ...
Job for dphys-swapfile.service failed because the control process exited with error code.
See "systemctl status dphys-swapfile.service" and "journalctl -xe" for details.
invoke-rc.d: initscript dphys-swapfile, action "restart" failed.
● dphys-swapfile.service - dphys-swapfile - set up, mount/unmount, and delete a swap file
Loaded: loaded (/lib/systemd/system/dphys-swapfile.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2021-04-02 00:57:27 EDT; 24ms ago
Docs: man:dphys-swapfile(8)
Process: 718 ExecStart=/sbin/dphys-swapfile setup (code=exited, status=0/SUCCESS)
Process: 741 ExecStart=/sbin/dphys-swapfile swapon (code=exited, status=255/EXCEPTION)
Main PID: 741 (code=exited, status=255/EXCEPTION)
Apr 02 00:57:27 PiHole systemd[1]: Starting dphys-swapfile - set up, mount/unmount, and delete a swap file...
Apr 02 00:57:27 PiHole dphys-swapfile[718]: want /var/swap=100MByte, checking existing: keeping it
Apr 02 00:57:27 PiHole dphys-swapfile[741]: swapon: /var/swap: swapon failed: Invalid argument
Apr 02 00:57:27 PiHole systemd[1]: dphys-swapfile.service: Main process exited, code=exited, status=255/EXCEPTION
Apr 02 00:57:27 PiHole systemd[1]: dphys-swapfile.service: Failed with result 'exit-code'.
Apr 02 00:57:27 PiHole systemd[1]: Failed to start dphys-swapfile - set up, mount/unmount, and delete a swap file.
dpkg: error processing package dphys-swapfile (--configure):
installed dphys-swapfile package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
dphys-swapfile
E: Sub-process /usr/bin/dpkg returned an error code (1)
pi@PiHole:~ $
Any suggestions?