Solved

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

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

#Citrix #XenApp #Citrix Scout #Citrix Insight Services #Microsoft VMMAP #Microsoft ADEXPLORE #Microsoft RAMMAP #Microsoft TCPVIEW #Microsoft AUTORUNS #Microsoft PROCESS EXPLORER #Microsoft PROCESS MONITOR
This article is an update and follow-up of my previous article:   Storage 101: common concepts in the IT enterprise storage This time, I expand on more frequently used storage concepts.
Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now