Removing CD/DVD iso while VM is running - Is this not possible?


Go to solution Solved by SimonF,

Recommended Posts

I've been searching if this feature exists. I'm a vmware guy at heart, and from that experience it is possible to just click-click-click and boom the cd/dvd drive iso is "ejected" from a running VM. But in Unraid, all these settings are grayed out while it's running.

Am I missing something, or this seemingly simple feature really not possible in Unraid?

 

Thanks

Link to comment
  • Solution
On 6/29/2022 at 3:14 AM, JonathanM said:

Not possible from the GUI right now. However, you should be able to accomplish it at the Unraid console with a well formed virsh command. Google virsh change iso for some ideas.

 

Should be scriptable, and probably fairly easy to create a plugin, maybe @SimonF could throw something together?

Example commands are as follows

 

root@computenode:~# virsh change-media
error: command 'change-media' requires <domain> option
error: command 'change-media' requires <path> option
root@computenode:~# virsh change-media Debian
error: command 'change-media' requires <path> option
root@computenode:~# virsh change-media Debian hdc
error: No disk found whose source path or target is hdc

root@computenode:~# virsh domblklist Debian --details
 Type   Device   Target   Source
--------------------------------------------------------------------------
 file   disk     hdc      /mnt/user/domains/Debian/vdisk1.img
 file   cdrom    hda      /mnt/user/isos/debian-11.1.0-amd64-netinst.iso

root@computenode:~# virsh change-media Debian hda
error: New disk media source was not specified

root@computenode:~# virsh change-media Debian hda --eject
Successfully ejected media.
root@computenode:~# virsh domblklist Debian --details
 Type   Device   Target   Source
---------------------------------------------------------------
 file   disk     hdc      /mnt/user/domains/Debian/vdisk1.img
 file   cdrom    hda      -

root@computenode:~# virsh change-media Debian hda /mnt/user/isos/debian-11.1.0-amd64-netinst.iso --insert
Successfully inserted media.
root@computenode:~# virsh domblklist Debian --details
 Type   Device   Target   Source
--------------------------------------------------------------------------
 file   disk     hdc      /mnt/user/domains/Debian/vdisk1.img
 file   cdrom    hda      /mnt/user/isos/debian-11.1.0-amd64-netinst.iso

root@computenode:~# 

I am not able to do anything in the short term.

 

Could be two options one like USB hotplug or embedded option in VM Manager.

image.thumb.png.b9d0a5912d9ad1208332be39eb45b572.png

  • Thanks 2
Link to comment
21 minutes ago, SimonF said:

I am not able to do anything in the short term.

Even though it sounded like it, I really wasn't meaning to volunteer your time. I just knew you had good experience with the USB hotplug, and figured if there was enough interest you could put it on the list of things to think about.

 

I honestly doubt it's going to show up in the VM manager, there are much higher priority items that have been left by the wayside for years.

 

Your USB hotplug fills a gap that honestly should have been dealt with in the VM manager a long time ago. The core Unraid team just doesn't have enough time keep everything current that lots of people want, let alone all the little niche projects. Without community support we wouldn't have nearly as many nice toys. 👍

Link to comment
5 minutes ago, JonathanM said:

Even though it sounded like it, I really wasn't meaning to volunteer your time. I just knew you had good experience with the USB hotplug, and figured if there was enough interest you could put it on the list of things to think about.

 

Not problem at all.

 

I did create the PR for adding IPs, So i can look at seeing if possible to add function to the existing disks to eject and insert but likely would not appear until 6.11 if accepted.

 

image.thumb.png.6f4f98b8d93a14c096e3137c26df3749.png

Link to comment
2 minutes ago, SimonF said:

So i can look at seeing if possible to add function to the existing disks to eject and insert but likely would not appear until 6.11 if accepted.

Fixing the boot order issue is more important to me. Unless that was already fixed and I missed it.

 

I've always had to manually change the boot order in the XML, form view always messed it up.

  • Like 1
Link to comment
  • 1 month later...
On 6/30/2022 at 8:39 PM, JonathanM said:

Fixing the boot order issue is more important to me. Unless that was already fixed and I missed it.

 

I've always had to manually change the boot order in the XML, form view always messed it up.

Started adding Boot order onto the Template as view only at present, what do you normally change in the XML?

 

image.thumb.png.3921d7537aaefe86539aa8c40ae66dc0.png

Link to comment
  • 3 weeks later...
On 6/30/2022 at 8:39 PM, JonathanM said:

Fixing the boot order issue is more important to me. Unless that was already fixed and I missed it.

 

I've always had to manually change the boot order in the XML, form view always messed it up.

PRs have been created for the following:

 

@chaosclarity Added options to eject and insert CDs from the GUI. 

 

View of boot order added also and can be seen in the template view as above.

 

image.thumb.png.d6813491555a7457e5d4b58512a1c4ae.png

 

And I have just completed a new PR to allow update of the boot order via the GUI for review.

 

https://github.com/limetech/webgui/pull/1157

  • 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.