Solved

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

Posted on 2013-05-25
2
468 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 20

Accepted Solution

by:
Daniel McAllister earned 500 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
 

Author Comment

by:nachtmsk
ID: 39206175
Thank you Dan!
0

Featured Post

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Setting Permissions within vCenter 3 73
bash: ./Facebooker.pl :Permission Denied 9 53
How many VMs can run 7 76
Backup of vCenter Server 16 36
In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
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 …
Teach the user how to configure vSphere Replication and how to protect and recover VMs Open vSphere Web Client: Verify vsphere Replication is enabled: Enable vSphere Replication for a virtual machine: Verify replicated VM is created: Recover replica…
Teach the user how to install and configure the vCenter Orchestrator virtual appliance Open vSphere Web Client: Deploy vCenter Orchestrator virtual appliance OVA file: Verify vCenter Orchestrator virtual appliance boots successfully: Connect to the …

738 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