Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Teach the user how to use configure the vCenter Server storage filters Open vSphere Web Client:  Navigate to vCenter Server Advanced Settings: Add the four vCenter Server storage filters: Review the advanced settings: Modify the values of the four v…
Teach the user how to configure vSphere clusters to support the VMware FT feature Open vSphere Web Client: Verify vSphere HA is enabled: Verify netowrking for vMotion and FT Logging is in place or create it: Turn On FT for a virtual machine: Verify …

785 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