[Fedora-xen] Attaching a virtual CD to an existing domu?

John Summerfield debian at herakles.homelinux.org
Thu Nov 15 22:11:12 UTC 2007


Pls note, you cannot reply off-list..

I have a Debian Etch system, I want to install more software and it's 
asking for the DVD.

I created the system a few days ago, I think this is the commaind I used:

virt-install --name=DebianEtch --ram=384 --vcpus=1 
--file=/var/lib/xen/images/DebianEtch.img  --file-size=3 --vnc --hvm 
--cdrom=/var/lib/xen/images/debian-40r1-i386-DVD-1.iso   --os-type=unix


I've tried various incantations:
[root at potoroo mail]# virsh attach-disk DebianEtch 
/var/lib/xen/images/debian-40r1-i386-DVD-1.iso /dev/hde --driver file 
--type cdrom --mode readonly
libvir: Xen Daemon error : POST operation failed: (xend.err 'Device 8448 
not connected')

[root at potoroo mail]# virsh attach-disk DebianEtch 
/var/lib/xen/images/debian-40r1-i386-DVD-1.iso /dev/hdc --driver file 
--type cdrom --mode readonly
libvir: Xen Daemon error : POST operation failed: (xend.err "Refusing to 
reconfigure device vbd:5632 to {'uname': 
'file:/var/lib/xen/images/debian-40r1-i386-DVD-1.iso', 'mode': 'r', 
'dev': '/dev/hdc:cdrom'}")

[root at potoroo mail]# virsh attach-disk DebianEtch 
/var/lib/xen/images/debian-40r1-i386-DVD-1.iso /dev/hdb --driver file 
--type cdrom --mode readonly
libvir: Xen Daemon error : POST operation failed: (xend.err 'Device 832 
not connected')

[root at potoroo mail]#


None of those messages gives me any idea of what's wrong.

I tried the xm command too:
This is based on the manual page. The man page is wrong:
xm block-attach DebianEtch 
file://var/lib/xen/images/debian-40r1-i386-DVD-1.iso  /dev/hdd ro


DebianEtch thinks its CD drive is /dev/hdc, so I really want the CD 
attached to that.
[root at potoroo mail]# xm block-attach DebianEtch 
file://var/lib/xen/images/debian-40r1-i386-DVD-1.iso  /dev/hdc r
Error: Device /dev/hdc (5632, vbd) is already connected.
Usage: xm block-attach <Domain> <BackDev> <FrontDev> <Mode> [BackDomain]

Create a new virtual block device.
[root at potoroo mail]#

This seems to work:
[root at potoroo mail]# xm block-attach DebianEtch 
file://var/lib/xen/images/debian-40r1-i386-DVD-1.iso  /dev/hdb r
[root at potoroo mail]#

but DebianEtch doesn't know about it.

How _should_ this work?

I note block-detach doesn't seem to do anything:
[root at potoroo mail]# xm block-detach DebianEtch  832
[root at potoroo mail]# xm block-detach DebianEtch  5696
[root at potoroo mail]# xm block-detach DebianEtch  5632
[root at potoroo mail]# xm list DebianEtch --long | less
[root at potoroo mail]# xm block-list DebianEtch
Vdev  BE handle state evt-ch ring-ref BE-path
768    0    0     1      -1     -1    /local/domain/0/backend/vbd/3/768
5632    0    0     1      -1     -1    /local/domain/0/backend/vbd/3/5632
5696    0    0     1      -1     -1    /local/domain/0/backend/vbd/3/5696
832    0    0     1      -1     -1    /local/domain/0/backend/vbd/3/832
[root at potoroo mail]#


Is there a particular reason the install DVD image doesn't, by default, 
remain attached?

-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

Please do not reply off-list




More information about the Fedora-xen mailing list