0

I want to create a template for multiple vm deployment from a existing image. I basically have a "template" vm ready with image in qcow2 format at path "/kvm/template.qcow2". I have heard about "virt-sysprep" which can modify hostname, ssh host keys, and etc. -- all packages are installed.

When I try to run the basic "virt-sysprep" command, I get a "no operating system found" error. My Host Machine is Centos 6.9 , and guest vm is Centos7.

[root@ns0 kvm]# virt-sysprep --format qcow2 -a template.qcow2
Examining the guest ...
virt-sysprep: no operating systems were found in the guest image
[root@ns0 kvm]#
[root@ns0 kvm]#
[root@ns0 kvm]# ls -lh | grep template.qcow2
-rw-r--r-- 1 root root  16G Aug 16 05:27 template.qcow2

closed as off-topic by Jeff Schaller, Stephen Rauch, Archemar, sebasth, Satō Katsura Oct 9 '17 at 9:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, Stephen Rauch, Archemar, sebasth, Satō Katsura
If this question can be reworded to fit the rules in the help center, please edit the question.

0

Actually I resolved it, it basically requires your VM partition to be not on LVM. i.e it should be vda1, vda2, sda1, etc.

Not the answer you're looking for? Browse other questions tagged or ask your own question.