1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Inserting a CDROM iso

Discussion in 'Proxmox VE: Installation and configuration' started by Daniel U. Thibault, May 18, 2017 at 17:14.

  1. Daniel U. Thibault

    Daniel U. Thibault New Member

    Joined:
    Apr 26, 2017
    Messages:
    5
    Likes Received:
    0
    How do you simulate inserting a CDROM (or DVD) into a virtual machine? I can edit the CDROM device to change it from 'no disk' to some iso I pick, but this is not detected by the running VM (an old RHEL 5.3 in this case). The VM is configured to mount removable drives when hot-plugged, mount removable media when inserted, and browse removable media when inserted.
     
  2. LnxBil

    LnxBil Well-Known Member

    Joined:
    Feb 21, 2015
    Messages:
    1,746
    Likes Received:
    93
    If you talk about KVM/QEMU VM then just add a cd-drive and change it virtually over the GUI, no console action required. The CD/DVD drive is default if you create a VM so unless you removed it deliberately, it is still there and can be used:

    example.png
     
  3. Daniel U. Thibault

    Daniel U. Thibault New Member

    Joined:
    Apr 26, 2017
    Messages:
    5
    Likes Received:
    0
    That's precisely what I'm doing: editing the VM's CD/DVD Drive to change its ISO image from "no media" to something. But the VM is not picking up on it. I can manually mount the CD/DVD from within the VM (and access its contents, etc.), but if I then try to eject it, RHEL/CentOS complains that it wasn't mounted by HAL (Hardware Abstraction Layer).

    The problem may be peculiar to older OSes like RHEL/CentOS 5, in which case I could live with having to use a "refresh" command from within it, except that I've had little luck finding such a command for RHEL/CentOS 5.
     
  4. jim.bond.9862

    jim.bond.9862 Member

    Joined:
    Apr 17, 2015
    Messages:
    69
    Likes Received:
    1
    I would check the fstab and see if "mount -a" works.
    as far as I can tell CD roms and floppy(!) are mounted in fstab by default.
    but automount might not work for some reason so mount -a does a refresh...
     
  5. Daniel U. Thibault

    Daniel U. Thibault New Member

    Joined:
    Apr 26, 2017
    Messages:
    5
    Likes Received:
    0
    Sadly, mount -a does not do the trick. The CD/DVD drive is not in fstab. RHEL/CentOS 5 must proceed some other way.
     
  6. jim.bond.9862

    jim.bond.9862 Member

    Joined:
    Apr 17, 2015
    Messages:
    69
    Likes Received:
    1
    as far as I can tell RHEL/CENTOS5 uses 2 files

    /etc/auto.misc.
    and
    /etc/fstab


    the auto.misc should have something like " cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom"

    and fstab "/dev/cdrom /mnt/cdrom auto defaults 0 0"


    most newer system mount removable drives in "/media" rather than "/mnt" so you might want to adjust the code.
     
  7. LnxBil

    LnxBil Well-Known Member

    Joined:
    Feb 21, 2015
    Messages:
    1,746
    Likes Received:
    93
    Just do a check with df and umount the disk. I've done it literally hundreds of times with RHEL/CentOS/Oracle and it is always the same. But you're right, it's not a Proxmox VE problem, but a guest OS one.
     

Share This Page