[libvirt-users] insert ISO into a KVM guest

Pete Ashdown pashdown at xmission.com
Tue Jul 26 15:37:50 UTC 2011


On 07/26/2011 08:07 AM, Jeff wrote:
> There's got to be a simple way to attach an ISO to a KVM guest. I just haven't yet discovered it.
>
> I've tried adding the following stanza to my guest XML file, under the <devices> stanza and starting the guest:
>
> <disk type='file' device='cdrom'>
>    <driver name='qemu' type='raw' />
>    <source file='/etc/libvirt/qemu/isos/kvm1.iso' />
>    <target dev='hda' bus='ide' />
>    <readonly />
> </disk>
>
>
> But I get the following:
>
> error: Failed to start domain rhel6guest
> error: internal error process exited while connecting to monitor: char device redirected to /dev/pts/3
> qemu: could not open disk image /etc/libvirt/qemu/isos/kvm1.iso: Permission denied
>
What about the parent directory perms?

> A perms issue should be easy to address one would think, but I've tried every possible combination of perms changes including 777. Changed ownership from root to qemu:qemu (though I'm running as root). I'm not running SELinux. 
>
> Anyone have any insights on how to mount a simple ISO into a KVM guest?  Both at build time AND while the guest is running?
>
Use the loop device on the guest itself?  IE: mount -o loop filename.iso /mnt


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20110726/1016ef95/attachment.sig>


More information about the libvirt-users mailing list