From Fedora Project Wiki

(Drop note about F19 host)
(Minor tweaks)
Line 28: Line 28:
 
=== Change media with virsh ===
 
=== Change media with virsh ===
 
* With the guest still running as above, stay connected to the guest with virt-manager
 
* With the guest still running as above, stay connected to the guest with virt-manager
* In a terminal, insert media to the cdrom: <code>sudo virsh change-media test-day-vm hdc /path/to/my.iso</code>
+
* In a terminal, insert media to the cdrom: <code>sudo virsh change-media test-day-vm hda /path/to/my.iso</code>
 
* Verify the media is usable in the guest
 
* Verify the media is usable in the guest
* Eject the media: <code>sudo virsh change-media test-day-vm hdc --eject</code>
+
* Eject the media: <code>sudo virsh change-media test-day-vm hda --eject</code>
 
* Verify the media is no longer present in the guest.
 
* Verify the media is no longer present in the guest.
  

Revision as of 00:08, 25 September 2014

Description

Change ISO media for a running guest.

Setup

Functioning virt host and VM. All VM OS welcome.

How to test

Add an empty CDROM device

If the guest does not have a CDROM device attached to it, add one:

  • Open virt-manager. Start with a shutoff VM.
  • Details->Add Hardware->Storage
  • Select 'Select managed or existing storage' but leave the text field blank. This creates a CDROM device with no media attached.
  • Select Device type: IDE CDROM
  • Select Finish

Change media in virt-manager

  • Start the VM. Log in to the desktop environment.
  • In virt-manager, select the CDROM device in the Details window.
  • Click 'Connect'. Specify ISO media of your choice. Click 'OK'.
  • Verify that the media is accessible in the guest.
  • In virt-manager, click 'Disconnect'.
  • Verify the media is no longer present in the guest.

Change media with virsh

  • With the guest still running as above, stay connected to the guest with virt-manager
  • In a terminal, insert media to the cdrom: sudo virsh change-media test-day-vm hda /path/to/my.iso
  • Verify the media is usable in the guest
  • Eject the media: sudo virsh change-media test-day-vm hda --eject
  • Verify the media is no longer present in the guest.

Expected Results

No obvious errors occur.