1. 启动kvm后,进入 monitor 模式 alt+ctl+2 返回 alt+ctl+1
2. 进入后 help
cdrom 的 device名为:ide1-cd0 而不是cdrom 了.
"the naming of certain block devices has changed in the newer qemu
releases (for example, cdrom has been changed to ide1-cd0)."
Test VM is started by virt-manager using kvm with option -cdrom /path/cd1.iso .
Now in virsh:
virsh # attach-disk 1 /path/cd2.iso hdc --type cdrom
(nothing happens)
.libvirt/qemu/log/testvm.log says:
change cdrom "/path/cd2.iso"
device not found
That's because cdrom device name in kvm/qemu now is ide1-cd0.
This is on current hardy.
attach-disk 虚拟机名字 /home/kvm/soft/RHEL4.7.iso hdc --driver file --type cdrom --mode readonly