Change the mounted CD image from within the guest..?

Discussions about using Windows guests in VirtualBox.
Post Reply
spinjector
Posts: 50
Joined: 29. Jun 2009, 22:05
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Windows XP

Change the mounted CD image from within the guest..?

Post by spinjector »

Is it possible to change the mounted ISO in the virtual CD drive from within a guest VM..? Like by dos commands through the Guest Additions drivers or something like that..?

I checked the manual and didn't see anything, and Google search results weren't useful because the search keywords are too common. Thanks.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Change the mounted CD image from within the guest..?

Post by BillG »

Yes you can. From the toolbar at the top click Devices>Optical Drive>Choose disk image... then select the image you want to use. You can release the current image from the same menu.
Bill
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Change the mounted CD image from within the guest..?

Post by socratis »

Bill, the actions you describe are from the host menu. I believe what the OP is asking, is if there is anything completely from within the guest. Example follows:

@spinjector
If you're thinking of a VirtualBox command to change the VM settings (that's what a mounted image is), then no. Thankfully no, if I may add, as I wouldn't want my guest to have any control and/or affecting the host or its own configuration. None.

You can go as far as the guest OS can permit you, if a native command for such an action exists. For example, I can eject a CD on my OSX guest by issuing the command:
  • hdiutil detach [options] <devname>
and similarly I can mount accessible disk images with a similar command:
  • hdiutil attach <image>
I'm sure something like that exists under Linux, don't know the exact command and/or syntax. Not sure at all about Windows (but I'm not that optimistic).

Note what I said about accessible. If I see it in the guest, I can mount it. I cannot mount something that is on the host. So, for example, that means I cannot programmatically mount the guest additions CD from within the guest. Host intervention is required, therefore it is not addressing your question.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
spinjector
Posts: 50
Joined: 29. Jun 2009, 22:05
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Windows XP

Re: Change the mounted CD image from within the guest..?

Post by spinjector »

socratis wrote:I wouldn't want my guest to have any control and/or affecting the host or its own configuration. None.
Thanks, I hadn't thought about the security aspect of it.
socratis wrote:similarly I can mount accessible disk images
Can you explain what you mean about accessible images..?

The reason this issue came up, I started thinking about an old CD-Changer I used to have (which may in fact still be a one of my various boxes of computer junk). It looked like a standard 5-1/4" CD drive, but it was a slot-loader, and you could stuff it with 6 different CDs. It was pretty slick. Then...you could select them in various ways, such as a Systray app, or it could even tag each CD with its own drive letter. And that being said, I recall there were MONSTER changers back in the 90s that could hold like 250 CD or DVD discs, but I don't know how they were selected.

And now that I've typed that last paragraph, I'm working through this in my head and thinking I could accomplish this simply in software. There are apps such as CDImage and Alcohol 120 that have their own virtual CD drive software, where you select an ISO file and it auto-magically pops up as a vCD drive. I could restrict the "available" images by putting them in a read-only VHD (immutable?), or better yet, a VBox Shared Machine Folder set to read-only.

Thanks for the ideas. =-)
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Change the mounted CD image from within the guest..?

Post by socratis »

spinjector wrote:Can you explain what you mean about accessible images..?
It's explained in the paragraph following that rhetorical statement in that same post of mine.
spinjector wrote:better yet, a VBox Shared Machine Folder set to read-only.
That would qualify them as accessible... ;)
Yes, if you can achieve it from the guest via Alcohol or simple scripting, even better. You didn't mention your guest, but Win > 8 has that capability built-in. Good luck with the endeavor...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
spinjector
Posts: 50
Joined: 29. Jun 2009, 22:05
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Windows XP

Re: Change the mounted CD image from within the guest..?

Post by spinjector »

Thank you. No, not Win8. These are guests with 2000 and XP. :lol:
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Change the mounted CD image from within the guest..?

Post by BillG »

socratis wrote:Bill, the actions you describe are from the host menu. I believe what the OP is asking, is if there is anything completely from within the guest. Example follows:

.
Umm... no they are not. I admit that they are not from within the guest OS but they are from the Devices tab on the guest window toolbar.
Bill
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Change the mounted CD image from within the guest..?

Post by socratis »

BillG wrote:they are from the Devices tab on the guest window toolbar
... which are on the host: toolbar, window and menu. And you have no access whatsoever from the guest, thank Zeus! ;)

In fact, the only "menu items" that you might have control over from the guest side, are the ones exposed from 'VBoxControl':
VBoxControl takesnapshot
VBoxControl savestate
VBoxControl suspend
VBoxControl poweroff
PS. What I just realized, you know, hmm? No documentation there is for "VboxControl". File a bug report, I will. Yeesssssss....
PPS. Filed, bug report #16176 was. Yes, hmmm...
</yoda_speak>
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply