Contents

Booting from ISO file on KVM guest

Here is the steps required to boot from an ISO file after installation.

Edit guest XML file

1
# virsh edit vm02

Add add a boot dev line for cd-rom

1
2
3
4
5
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
  </os>

Add source file line and specify the location of the ISO file

1
2
3
4
5
6
7
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/kvm-pool/iso/CentOS-7-x86_64-DVD-1908.iso'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

Power off and start again the KVM guest

1
2
# virsh shutdown vm02
# virsh start vm02