when creating a virtual machine
as follows:
#!/bin/sh
passwd root<<EOF
engine
engine
EOF
Replace huangyi with your password
Note that the following configuration driver must be checked, otherwise the virtual machine will fail to initialize the root password.