Solved

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

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

If we need to check who deleted a Virtual Machine from our vCenter. Looking this task in logs can be painful and spend lot of time, so the best way to check this is in the vCenter DB. Just connect to vCenter DB(default DB should be VCDB and using…
This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…

828 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