Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using KVM to create Virtual Machines -- how to access CD drive on local machine

Posted on 2013-05-25
2
Medium Priority
?
481 Views
Last Modified: 2013-05-29
Hi,
I'm using KVM on CentOS to create Virtual machines and it's working very well.
I'm connecting to those VM's using remote desktop on my local PC, actually it's a Mac running remote desktop but the same difference.

I want/need to be able to install something on the VM from a CD. But if I put the CD into my local machine running remote desktop, it's not showing up on the desktop.
I checked the settings for Remote Desktop and it doesn't seem to have an option to mount the CD from the client machine (my mac). Maybe this is different if I was using  PC as the client, I don't know.
But my basic question is, can I use the CD/DVD player on the client that is connecting to a VM to mount the contents of the CD/DVD on the VM?
Thanks,
Nacht
0
Comment
Question by:nachtmsk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Accepted Solution

by:
Daniel McAllister earned 2000 total points
ID: 39198057
Your question is a common one about VMs in general -- specifically: how do I access HARDWARE on the PHYSICAL machine from the VIRTUAL machine.

The answer is actually kind of simple -- by assigning the hardware to the VM -- but it deserves a little background:

First: 2 definitions:
 - the VM Host is the physical hardware (and the OS that controls that hardware)
 - the VM Guests are the OSes that run in virtual environments (mostly "simulated" hardware)

Since by its nature, a VM Host has many VM Guests, it is unreasonable for any piece of hardware to be arbitrarily assigned to any one of them.

Thus, your answer lies in the VM Management Console, not in any single VM Guest.

Since you say you're using KVM, let me assume you're running RHEL (or CentOS) or something similar. If so, and you have a GUI installed, this will be simple:
 - Login to the VM Host's GUI Console (either physically or remotely)
    - I administer mine through VNC that is restricted - with IPtables - to my own IPs
 - Click on Applications -> System Tools -> Virtual Machine Manager
    - You will be prompted for the root password (unless you're silly and inexperienced enough to have logged in as root)
    - The Virtual Machine Manager window will show your configured machines
 - Double-click on the VM on which you want to be able to see the CD-ROM
    - By default, you will see the console of that VM -- but in the header area, there will be a blue i (actually, a white i in a blue circle).... click on it, and you'll be in the config screen for that VM.
 - You will likely already see in the left side list of settings, an entry for an IDE CDROM (that's probably how you installed the guest vm to begin with)
    - You have an option of changing the file it points to (it's most likely disconnected now), or creating a new CD-ROM and pointing to the physical device.

For me, I prefer to work solely with images -- so on the Linux Host, I would insert the CD (or DVD), then copy it into an ISO file with dd

dd if=/dev/cdrom of=sometitle.iso
Then, I would use the VM Manager & "Connect" the IDE CDROM device to that iso file:
 - Click on the IDE CDROM entry on the left
 - On the right side of the screen, you'll see the attributes -- which may already include the fact that it it connected to an image already (like your install media), or it may be mostly blank
    - If it says it is connected already, click on the Disconnect button on the right & confirm
 - Once there is nothing connected, there will be a Connect button on the right
 - Within the popup window, you can connect to an image, or to the device (like /dev/cdrom, or /dev/sr0).

This should be more than enough to get you where you want to be!

Best of luck!

Dan
IT4SOHO
0
 
LVL 1

Author Comment

by:nachtmsk
ID: 39206175
Thank you Dan!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
Advanced tutorial on how to run the esxtop command to capture a batch file in csv format in order to export the file and use it for performance analysis. He demonstrates how to download the file using a vSphere web client (or vSphere client) and exp…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question