hostnamectl; # tested with
   Static hostname: debian9
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 532eabca552b4075a8679094397c8dba
           Boot ID: 56c17320171e4ca2aed93998357ce1d2
    Virtualization: microsoft
  Operating System: Debian GNU/Linux 9 (stretch)
            Kernel: Linux 4.12.0cuztom
      Architecture: x86-64

apt-get install genisoimage
genisoimage --help
genisoimage -r -J -l -ldots -o etc.iso /etc; # turn folder /etc into an etc.iso image

mkdir /mnt/cdrom
mount -t iso9660 -o loop etc.iso /mnt/cdrom/
mount: /dev/loop0 is write-protected, mounting read-only

df -Th|grep iso
/dev/loop0     iso9660   4.8M  4.8M     0 100% /mnt/cdrom

theoretically you could burn this etc.iso now with wodim on cd/dvd-r (double-layer dvd and blueray is not supported)