virt-customize -a disk.qcow2 \ --delete /etc/ssh/ssh_host_* \ --run-command 'ssh-keygen -A'

virt-sparsify --compress disk.qcow2 disk_sparsed.qcow2 This removes zeroed blocks and compresses the image, reducing its footprint for KT SO storage backends. If KT SO requires VMDK (for vSphere environments), convert back:

virt-customize -a disk.qcow2 \ --mkdir /opt/kt_agent \ --upload kt_monitor.sh:/opt/kt_agent/ \ --chmod 0755 /opt/kt_agent/kt_monitor.sh \ --run-command 'echo "@reboot root /opt/kt_agent/kt_monitor.sh" >> /etc/crontab'

By mastering the process outlined in this guide, you ensure that your virtual network functions deploy seamlessly within Korea Telecom’s Service Orchestrator, perform optimally, and maintain security integrity. Whether you are a lab engineer, a VNF developer, or an NFV consultant, repacking remains an indispensable arrow in your quiver. Have you performed a KT SO repack with a unique challenge? Share your experience or ask for troubleshooting tips in the comments below.

virt-customize -a disk.qcow2 \ --hostname kt-so-vnf-01 After modifications, the disk may have free space. Optimize:

sha1sum *.ovf *.vmdk > new_image.mf tar -cvf kt_vnf_repacked.ova *.ovf *.vmdk *.mf You now have a virtual KT SO repacked image ready for onboarding. Advanced Repack Scenarios Repacking for Multi-Node KT SO Deployments Sometimes KT SO expects a chain of VNFs (e.g., vCPE, vRouter, vFirewall). In that case, repack each with identical base but unique roles. Use environment variables inside the repacked image to differentiate nodes upon first boot. Adding Custom Cloud-Init for KT SO If KT SO uses cloud-init, inject a user-data script: