I have a KVM virtual machine that is managed via libvirsh. Now I want to use a different ISO image inside the VM.

How do I change the DVD in the virtual drive using virsh?

link|improve this question

feedback

1 Answer

up vote 5 down vote accepted

Add CDROM:

attach-disk guest01 /root/disc1.iso hdc --driver file --type cdrom
--mode readonly

Change CDROM:

attach-disk guest01 /root/disc2.iso hdc --driver file --type cdrom
--mode readonly

Remove CDROM:

 attach-disk guest01 " " hdc --driver file --type cdrom
 --mode readonly
link|improve this answer
Thanks, rkthr. I test this next week and come back here. +1 anyway :-) – DerMike Jun 10 '11 at 8:24
Thanks for tip. For me it works but only if I remove '--driver file' from the command (version of virsh: 0.9.2). – Lukasz Stelmach Dec 23 '11 at 20:50
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.