1. install virtualbox & guest-additions
apt-get install virtualbox virtualbox-guest-additions-iso
2. install ubuntu or some other linux distribution
3. setup shared directory:
https://www.virtualbox.org/manual/ch04.html
or
Perfect tutorial !
Anyhow I have to remind you that guest-additions is a kernel module, which means it won't take effect any more after you updated your kernel. You will need to recompile it.
4. start vm directly
vboxmanage startvm <vm-name>
5. run background
vboxheadless -s <vm-name>
6. setup host-only network
If no adapter selected: 点击打开链接
Then you can ssh the hell in.
Allow root for ssh: 点击打开链接
7. Using mother fucking VRDP ( not necessary, but you might need it one day )
8. Still you might fail to ssh in after poweroff?
Caused by grub 2+ recordfail feature. good feature, but not what we want.