Booting KVM VM from CD image



You may list Your all KVM VM with command:

[root@kvm3 qemu]# virsh list --all
 Id    Name                           State
 -     vm1.server.tld               shut off

Edit the config file:

[root@kvm3 qemu]# virsh edit vm1.server.tld

Add the following lines to the ‘devices’ part:

<disk type='file' device='cdrom'>
  <driver name='qemu' type='raw'/>
  <source file='/tmp/CentOS-7.0-1406-x86_64-Minimal.iso'/>
  <target dev='hdb' bus='ide'/>
  <address type='drive' controller='0' bus='1' unit='0'/>


Then find the OS part:

    <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
    <boot dev='hd'/>

And insert the

    <boot dev='cdrom'/>

to look like

    <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>

That’s it.
Save the config and boot the VM :)


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.