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

    Hello,
    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)
    https://www.ovirt.org/documentation/...hap-Templates/

    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.
    https://forums.kali.org/showthread.p...t-each-boot-up
    https://forums.kali.org/showthread.p...zation-in-Kali

    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
    https://en.wikibooks.org/wiki/Changi..._Address/Linux
    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
    [connection]
    id=Wired connection 1
    uuid=xxx-xxxxxx-xxxxxx-xxxxxx-xxx
    *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. Replies: 0
    Last Post: 2016-12-10, 04:59
  2. AWS HVM AMI - Packer template
    By ctarwater in forum Building Archive
    Replies: 6
    Last Post: 2016-08-21, 08:53
  3. [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
  •