||After successful installation, power off the VM, edit settings and remove the serial port from the VM. |
The reason you needed to initially attach a tmp file to the serial port is because during boot-up of linux, a few garbage characters (terminal escape sequences) get output to that port. These characters corrupt the tar format of the file, if you dump the logs into that file. So to create a valid .tar file, you must connect the serial port to a new and empty file just before you dump the logs.