boot VM on virtual CD

For test purpose, we would like to boot a VM on a CD.

Is it possible to boot on an iso ?

Is it possible to boot on one of Cloudmin's System Images ?

Didn't find a procedure in Cloudmin's documentation.

Status: 
Closed (fixed)

Comments

Yes, this is possible - on the Create System page, you can select the Empty System tab and then choose an ISO image to boot from. This is typically used when installing a VM from a cd or DVD.

Yes, I know that, and that's how we created our KVM guests.

But What I want to know is how to boot an existing VM on a CD. Is that possible ?

Ok, in that case you can do the following :

  1. Shut down the VM
  2. Go to Resources -> Manage Disks -> Add existing file or device as a disk.
  3. Enter the path to your CD image, and select "CD or DVD" as the media type
  4. Click Save
  5. Go to System State -> Change Boot Method
  6. Select "CD or DVD drive", then click Save
  7. Start up the VM

You should then be able to use the Graphical Console page to access the console..

To be complete, I must say that before asking here, I tried this :

  • I added an iso as virtual disk through "Ressources / Manages disks", specifying the file's path on the host, and "CD or DVD drive" as disk Media.
  • Then I changed the boot method to "CD or DVD drive".

But when I boot the VM, I get a "No bootable device" message.

So I guess it's not possible to boot a VM on a plain old iso.

What's the best way to do that ?

Thanks.

Our comments got posted on the same minute... Lol...

Did I miss something ? Should an iso do the trick ?

That should work .. at least, it does for me.

Is this a KVM or Xen VM? If Xen, is it using paravirtualization or HVM? You can see this on the Edit System page.

Unfortunately a Xen VM using paravirtualization cannot be booted from a CD.

IT's a KVM guest running on a CentOS 5.7 host, with virtio_blk.

The complete message is :

"Booting from CD-Rom... CDROM boot failure code : 0003 Boot failed: could not read the boot disk

Fatal: no bootable device."

The boot disk is an official CentOS6 boot CD iso.

I wonder if perhaps KVM doesn't support booting from a CD when virtIO is in use..

What is the command line of the KVM process for this VM?

Here's the process line :

/usr/libexec/qemu-kvm -name xxxx.yyyy.net -m 1024 -drive file=/dev/VolGroup00/xxxx_yyyy_net_img,media=disk,index=0,if=virtio,boot=on -drive index=1,media=disk,file=/dev/VolGroup00/xxxx_yyyy_net_2_img,if=virtio -drive index=2,media=cdrom,file=/root/CentOS-6.0-x86_64-netinstall.iso,if=virtio -boot d -net tap,vlan=0,script=/kvm/xxxx.yyyy.net-eth0.sh -net nic,vlan=0,macaddr=xx:xx:xx:xx:xx:xx,model=virtio -vnc :2,password -monitor tcp:127.0.0.1:40001,server

It has 2 lvm drives (dev/vda and /dev/vdb).

Ok, it looks like the CD being on virtIO is the issue - this is really a Cloudmin bug, as it should always use IDE for CDs.

The work-around to fix this is as follows :

  1. Login to the Cloudmin master system as root
  2. Get the VM's unique ID with the command cloudmin list-systems --host xxxx.yyyy.net --id-only
  3. Edit the file under /etc/webmin/servers with that ID
  4. Find the kvm_drives line, and in the section for the CD drive change if=virtio to if=ide
  5. Shut down and then re-start the VM.

Yep. it works...

Thanks !

Great - I will include a proper fix for this in the 6.0 Cloudmin release.

Automatically closed -- issue fixed for 2 weeks with no activity.