Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Download the latest Kali Linux image. Download here
  2. Create a new VM on your local Linux computer running KVM/libvirt, and install Kali from the ISO. 15GB 20GB disk should be sufficient. Use the qcow2 format. Make sure to select the virtio driver both for disk and NIC. The VM also need internet connectivity.
  3. During the installation, use manual partitioning. Create just one partition, with / mounted, and enable the bootable flag. Disable swap.
  4. When prompted, create the user "kali" with "kali" as password. The password will be overwritten by cloud-init later.

...

  1. Login to the virtual machine with kali user, and run sudo apt update && sudo apt upgrade. Reboot if necessary.
  2. Install cloud-init: apt install cloud-init
    1. Add datasource_list: [ OpenStack, ConfigDrive, Ec2 ] to /etc/cloud/cloud.cfg.d/99_openstack.cfg
  3. Run systemctl enable cloud-init
  4. Run systemctl enable cloud-final
  5. Edit the file /etc/default/grub, and make sure that the variable GRUB_CMDLINE_LINUX_DEFAULT contains console=ttyS0 console=tty0 (if there's other content in this variable that's fine. Just add this to the end of the string.
    NOTE: remove quiet
    1. Run update-grub

Enable ssh server

  1. systemctl enable ssh
  2. Ensure that password logon is disabled

Enable vncserver for user "kali", and add it to upstart

...

  1. Shutdown the virtual machine
  2. Unmount the ISO file (if still mounted)
  3. Run (on your local machine) virt-sysprep -d <vm-name>
  4. Convert the qcow2 disk to raw format, and upload it to glance. (howto)

 

...