...
- Login to the virtual machine with root, and run
apt update && apt upgrade
. Reboot if necessary. - Install cloud-init:
apt install cloud-init
- Run
dpkg-reconfigure cloud-init
and for metadata services, select only Config Drive, EC2 and Openstack.
- Add
datasource_list: [ OpenStack, ConfigDrive, Ec2 ]
to/etc/cloud/cloud.cfg
disable_root: true
todisable_root: false
- Run
- Run
systemctl enable cloud-init
- Run
systemctl enable cloud-final
- Edit the file
/etc/default/grub
, and make sure that the variableGRUB_CMDLINE_LINUX_DEFAULT
containsconsole=ttyS0 console=tty0
(if there's other content in this variable that's fine. Just add this to the end of the string.
NOTE: removequiet
- Run
update-grub
- Run
- Edit
/etc/lsb_release
to have the version number, notkali-rolling
inDISTRIB_RELEASE
- If this is not done, virt-sysprep will fail
Enable ssh server
systemctl enable ssh
Enable vncserver for
...
user "kali", and add it to upstart
- Install
tightvncserver
- Run
vncserver
- Enter the password "kaliVNC" twice
- When the command returns, kill the vncserver with
vncserver -kill :1
Create
/usr/local/bin/vncserv
and paste this contentCode Block language bash collapse true #!/bin/bash PATH="$PATH:/usr/bin" DISPLAY="1" DEPTH="24" GEOMETRY="1280x960" OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}" case "$1" in start) /usr/bin/vncserver ${OPTIONS} ;; stop) /usr/bin/vncserver -kill :${DISPLAY} ;; restart) $0 stop $0 start ;; esac exit 0
Create
/lib/systemd/system/vncserv.service
and paste this contentCode Block language bash collapse true [Unit] Description=VNC Server [Service] Type=forking ExecStart=/usr/local/bin/vncserv start ExecStop=/usr/local/bin/vncserv stop ExecReload=/usr/local/bin/vncserv restart User=rootkali [Install] WantedBy=multi-user.target
Run
systemctl daemon-reload; systemctl enable vncserv
...