Results 1 to 2 of 2

Thread: Prepare Kali for use as a template vm in ovirt hypervisor

  1. #1

    Prepare Kali for use as a template vm in ovirt hypervisor

    This is my first post here. I am hoping someone can help clarify the procedure I need to follow to create a Kali template.

    I am following the general guidance for creating templates specific to my hypervisor distribution (ovirt)

    The template process defines several steps that need to be accomplished:
    1. Flag the system for re-configuration
    2. Remove ssh host keys:
    3. Set HOSTNAME=localhost.localdomain
    4. Remove /etc/udev/rules.d/70-*:
    5. Remove the HWADDR line and UUID line from /etc/sysconfig/network-scripts/ifcfg-eth*.
    6. Optionally, delete all the logs from /var/log and build logs from /root.

    I know how to do each item in the above list except #5, remove the HWADDR and UUID.

    I did review the forums here and found two posts related to changing the MAC address.

    It is my understanding that the techniques in the two posts I listed don't meet the objective needed to create a template. The posts mention the use of the mac changer tool. I understand that the mac changer tool is used for spoofing while the objective I need to achieve is to actually remove a MAC address.

    How do I actually remove a MAC address?

    Lastly, I realize my understanding of several points above could be incorrect. I appreciate your clarification if I don't have the proper understanding of a subject area.

    Thank you for your input and advice.

  2. #2
    So I did some extensive researching. I was able to answer my question. I found a good guide here
    In short, if you only have a single NIC in your system you won't have the HWADDR parameter.

    Sealing a Kali Linux 2017.3 Virtual Machine

    1. Log in to the virtual machine.
    2. Flag the system for re-configuration:
    # touch /.unconfigured
    3. Remove ssh host keys:
    # rm -rf /etc/ssh/ssh_host_*
    4. Set HOSTNAME=localhost.localdomain in /etc/sysconfig/network
    5. Remove /etc/udev/rules.d/70-*:
    # rm -rf /etc/udev/rules.d/70-*
    6. Remove the HWADDR line and UUID line from /etc/NetworkManager/system-connections/
    # nano /etc/NetworkManager/system-connections/name-of-connection
    edit this section and comment out UUID
    id=Wired connection 1
    *Note* HWADDR parameter is only present if there are multiple NICs
    7. Optionally, delete all the logs from /var/log and build logs from /root.
    8. Flush all ARP cache
    # ip -s -s neigh flush all
    8. Shut down the virtual machine:
    # poweroff

    The virtual machine is sealed and can be made into a template. You can deploy Linux virtual machines from this template without experiencing configuration file conflicts.

Similar Threads

  1. Installing Kali Linux as Guest OS in KVM Hypervisor
    By kaushalshriyan in forum Installing Archive
    Replies: 0
    Last Post: 2020-12-02, 02:20
  2. Is Kali image compatible with Nutanix AHV hypervisor ?
    By suman_rak in forum General Archive
    Replies: 3
    Last Post: 2018-07-05, 14:34
  3. Replies: 0
    Last Post: 2016-12-10, 04:59
  4. [Request] LXC template for Kali
    By MehranNZ in forum Development Archive
    Replies: 0
    Last Post: 2014-02-08, 06:30

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts