How to modify first boot script in the TDN KVM template in SolusVM?

Have more questions? Submit a request

Applicable to:

  • SolusVM

Question

How to modify the first boot script in the TDN KVM template in SolusVM?

Answer

Warning: Modifying first boot template can break the template. Perform the modification with caution.

  1. Connect to the KVM Slave Node via SSH
  2. Open the firstboot script for editing with virt-edit utility and modify it in necessary way:

    # virt-edit -a <path-to-template> <path-to-firstboot-script>

    Replace <path-to-template> and <path-to-firstboot-script> with the actual path to corresponding template and firstboot script accordingly.
    All the templates are located at /home/solusvm/kvm/template

    <path-to-firstboot-script> depends on template OS.

    • For Ubuntu 20, Centos 7, Centos 8 and Almalinux 8:

      CONFIG_TEXT: /usr/lib/virt-sysprep/scripts/0001-swapoff--dev-vda2-mkswap--dev-vda2-swapon--dev-vda2-resize2f

    • for Ubuntu 18, Debian 9 and Debian 10:

      CONFIG_TEXT: /usr/lib/virt-sysprep/scripts/0001-mkswap--dev-vda2-update-initramfs--u-resize2fs--dev-vda1-apt

    Command examples:

    # virt-edit -a /home/solusvm/kvm/template/linux-debian-9-x86_64-minimal-latest.gz /usr/lib/virt-sysprep/scripts/0001-swapoff--dev-vda2-mkswap--dev-vda2-swapon--dev-vda2-resize2f
    # virt-edit -a /home/solusvm/kvm/template/linux-centos-8-x86_64-gen2-v1.gz /usr/lib/virt-sysprep/scripts/0001-swapoff--dev-vda2-mkswap--dev-vda2-swapon--dev-vda2-resize2f

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.