Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to:

  1. Place the .iso of a live CD in a directory.
  2. Use qemu (kvm or kqemu) to run the .iso
  3. Put a 2nd live CD .iso in the same directory.
  4. Have the 1st live CD mount the 2nd .iso.

Say, I have 2 .iso files in the same directory,
how can I emulate one and mount the 2nd
from within the 1st?

--
Wishing you Happiness, Joy, and Laugher,
Drew Brown

share|improve this question
add comment

2 Answers

I assume that both the ISO images are located outside the virtual file-system. From the KVM man pages, the option that you are looking for is -drive instead of -cdrom.

Instead of -cdrom you should be able to define even multiple cd-roms and mount them from within the live-cd. They should appear as /dev/hda to /dev/hdd in the VM.

qemu -drive file=file,index=0,media=cdrom
qemu -drive file=file,index=1,media=cdrom
qemu -drive file=file,index=2,media=cdrom
qemu -drive file=file,index=3,media=cdrom
share|improve this answer
add comment

To run from a live CD, you just need to specify it when starting quemu, as in

qemu -cdrom myiso.iso

To mount a second live CD, that in principle works as under regular Linux:

mount -o loop disk1.iso /mnt/disk

(must be done as root, mountpount /mnt/disk is arbitrary, but must exist).

You just need to arrange to put your 2nd iso into a directory where the QEMU VM can see it (or copy it over the net etc.).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.