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'/> <readonly/> <address type='drive' controller='0' bus='1' unit='0'/> </disk>
Then find the OS part:
<os> <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type> <boot dev='hd'/> </os>
And insert the
<boot dev='cdrom'/>
to look like
<os> <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type> <boot dev='cdrom'/> <boot dev='hd'/> </os>
That’s it.
Save the config and boot the VM :)
Leave a Reply