Thanks for the help. I could able to get that from EPEL.
I also tried below procedure which also works. This might help to the ppl who wants to get the package only from Redhat.
pointed my system to redhat setalite server. Installed qemu-kvm package.
yum install qemu-kvm.
Dependencies Resolved
================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================
Updating:
qemu-kvm x86_64 10:1.5.3-160.el7_6.2 rhel-7-server-rpms 1.9 M
Updating for dependencies:
qemu-img x86_64 10:1.5.3-160.el7_6.2 rhel-7-server-rpms 695 k
qemu-kvm-common x86_64 10:1.5.3-160.el7_6.2 rhel-7-server-rpms 432 k
Transaction Summary
Upgrade 1 Package (+2 Dependent packages)
Total download size: 3.0 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for rhel-7-server-rpms
(1/3): qemu-img-1.5.3-160.el7_6.2.x86_64.rpm | 695 kB 00:00:00
(2/3): qemu-kvm-common-1.5.3-160.el7_6.2.x86_64.rpm | 432 kB 00:00:00
(3/3): qemu-kvm-1.5.3-160.el7_6.2.x86_64.rpm | 1.9 MB 00:00:01
--------------------------------------------------------------------------------------------------------------------------------
Total 1.8 MB/s | 3.0 MB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : 10:qemu-kvm-common-1.5.3-160.el7_6.2.x86_64 1/6
Updating : 10:qemu-img-1.5.3-160.el7_6.2.x86_64 2/6
Updating : 10:qemu-kvm-1.5.3-160.el7_6.2.x86_64 3/6
Cleanup : 10:qemu-kvm-1.5.3-160.el7_6.1.x86_64 4/6
Cleanup : 10:qemu-img-1.5.3-160.el7_6.1.x86_64 5/6
Cleanup : 10:qemu-kvm-common-1.5.3-160.el7_6.1.x86_64 6/6
Verifying : 10:qemu-img-1.5.3-160.el7_6.2.x86_64 1/6
Verifying : 10:qemu-kvm-1.5.3-160.el7_6.2.x86_64 2/6
Verifying : 10:qemu-kvm-common-1.5.3-160.el7_6.2.x86_64 3/6
Verifying : 10:qemu-img-1.5.3-160.el7_6.1.x86_64 4/6
Verifying : 10:qemu-kvm-common-1.5.3-160.el7_6.1.x86_64 5/6
Verifying : 10:qemu-kvm-1.5.3-160.el7_6.1.x86_64 6/6
Updated:
qemu-kvm.x86_64 10:1.5.3-160.el7_6.2
Dependency Updated:
qemu-img.x86_64 10:1.5.3-160.el7_6.2 qemu-kvm-common.x86_64 10:1.5.3-160.el7_6.2
Complete!
Later edited the packer json file and used as below
{
"builders":
[
{
"type": "qemu",
"iso_url": "/home/xyx/tmp/rhel-test.iso",
"iso_checksum": "34983jhadhfaksf9asfsaifakj",
"iso_checksum_type": "md5",
"output_directory": "/home/xyx/tmp/image",
"disk_size": 307200,
"cpus": 1,
"memory": 16500,
"format": "qcow2",
"headless": false,
"accelerator": "kvm",
"ssh_username": "root",
"ssh_password": "sonus",
"disk_compression": "true",
"qemu_binary": "qemu-kvm",
"ssh_port": 22,
"ssh_wait_timeout": "60m",
"vm_name": "testvm",
"net_device": "virtio-net",
"disk_interface": "virtio",
"boot_wait": "2s",
"boot_command": [
"1-force<enter>"
]
}
}