How to (re)attach VirtIO iso image


thany
Go to solution Solved by SimonF,

Recommended Posts

So I had ejected the virtio iso image from a VM because it wasn't needed. But now that I do need it for something, how do I reattach it without shutting down the VM?

 

When I click on the bullseye icon next to "No CD image inserted into drive" I get a popup where I can presumably select an iso image. This does not list the previously attached iso. See attachment.

 

Where is it looking for isos? Clearly not where I set it to look for isos, which in my case happens to be `/mnt/ssd/vm/iso/` and the terminal reveals that the virtio iso is definitely in there, and with `-rwxrwxrwx` permissions at that. So it must be looking elsewhere for isos, but where? And why not in the isos directory?

Screenshot 2022-10-09 163646.png

Edited by thany
typo
Link to comment
  • Solution
9 minutes ago, thany said:

So I had ejected the virtio iso image from a VM because it wasn't needed. But now that I do need it for something, how do I reattach it without shutting down the VM?

 

When I click on the bullseye icon next to "No CD image inserted into drive" I get a popup where I can presumably select an iso image. This does not list the previously attached iso. See attachment.

 

Where is it looking for isos? Clearly not where I set it to look for isos, which in my case happens to be `/mnt/ssd/vm/iso/` and the terminal reveals that the virtio iso is definitely in there, and with `-rwxrwxrwx` permissions at that. So it must be looking elsewhere for isos, but where? And why not in the isos directory?

Screenshot 2022-10-09 163646.png

It should take the path from the settings and show the ISOs. 

 

manual options is as follows

 

root@computenode:/mnt/disk1/@Documents/Virtio/Downloads# virsh domblklist "Windows 10"  --details
 Type   Device   Target   Source
-------------------------------------------------------------------
 file   disk     hdc      /mnt/user/domains/Windows 10/vdisk1.img
 file   cdrom    hda      /mnt/user/isos/Windows10.iso
 file   cdrom    hdb      /mnt/user/isos/virtio-win-0.1.221-1.iso

root@computenode:/mnt/disk1/@Documents/Virtio/Downloads# virsh change-media "Windows 10"  hdb --eject
Successfully ejected media.
root@computenode:/mnt/disk1/@Documents/Virtio/Downloads# virsh change-media "Windows 10"  hdb /mnt/user/isos/virtio-win-0.1.221-1.iso --insert
Successfully inserted media.
root@computenode:/mnt/disk1/@Documents/Virtio/Downloads# 

 

Link to comment

I guess then maybe I've found a bug. Too bad I cannot see where it's actually looking for isos in that dropdown... Maybe that would give the author a hint towards a fix, assuming it's a bug and not my mistake somehow.

 

Manual command works a charm. Brilliant. Thanks for the reply :)

Link to comment
2 minutes ago, thany said:

I guess then maybe I've found a bug. Too bad I cannot see where it's actually looking for isos in that dropdown... Maybe that would give the author a hint towards a fix, assuming it's a bug and not my mistake somehow.

 

Manual command works a charm. Brilliant. Thanks for the reply :)

That would be me; Yes I have found a Bug I will create a PR.

  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.