FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 04-22-2011, 05:33 PM
Jussi Hirvi
 
Default KVM, virsh attach-disk error

I try to add a fresh, unformatted disk partition to a KVM guest. I
follow the directions given here:

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html-single/Virtualization/index.html#proc-Virtualization-Adding_storage_devices_to_guests-Adding_physical_block_devices_to_virtualized_guest s

First I check that the module acpiphp is present on the guest. It is.

On the host I write:

virsh attach-disk test1 /dev/sdb1 sda --driver tap --mode shareable

- test1 is my guest domain
- /dev/sdb1 is the name of the unformatted partition on the host
- sda is what it is supposed to be called on the guest (the name is
unused on the guest)
- the example in RHEL Virtualization guide says "--mode readonly". This
does not sound right for a hard disk; hence I try "--mode shareable";
the error (see below) however is the same, whichever I use

Now, the command above produces this error. I find no google results
with this error text. Can someone tell, what causes the error?

> error: Failed to attach disk error: operation failed: adding scsi
> disk controller failed: type scsi not a hotpluggable PCI device.
> failed to add if=scsi

- Jussi

--
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hirvi@greenspot.fi * http://www.greenspot.fi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-22-2011, 07:36 PM
Jussi Hirvi
 
Default KVM, virsh attach-disk error

I found another post (2009, on fedora-virt list), which is relevant:

http://www.redhat.com/archives/fedora-virt/2009-December/msg00032.html

> I have a CentOS 5.4 guest x86_64.
> If I remember well
(...)
> hot add of scsi disk should
> work if there is already a scsi disk into the guest (and if the guest
> supports it).

Well, in my system there is no scsi disk on the guest (the guest only
sees the img on which it runs), and I don't know how I could get one
there. :-/

- Jussi

--
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hirvi@greenspot.fi * http://www.greenspot.fi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-23-2011, 09:19 AM
Jussi Hirvi
 
Default KVM, virsh attach-disk error

Now I could attach a disk to the KVM guest, using a virtio driver:

> [root@113 info]# virsh attach-disk test1 /dev/sdd1 vdb
> --driver virtio --mode shareable
> Disk attached successfully

I have not seen any mention anywhere about using virtio drivers like this.

Here /dev/sdd is a separate disk, not used directly by either kvm host
or guests. Before the operation, sdd1 was created with fdisk as a Linux
partition. After the operation, I did mkfs.ext3 on the guest and then
mounted the new filesystem.

But the Bonnie benchmark results for the KVM guest are not promising -
they are about the same for the new external partition and for the
guest's native filesystem.

Reads are in fact much slower on the external partition (27500 vs. 70000
k/s). (CPU load 4 vs. 12 %.)
Writes are faster (121000 vs 98000 k/s). (CPU load 12 vs. 10 %.)

If these results are weighed with the cpu load, the differences even out.

Maybe the evennes is because the external partition is used with virtio
drivers, same as the guest's native disk image.

So why bother? I think I will give each guest one disk image to run on,
and that's it. Unless I find a better way to attach partitions to guests.

- Jussi

--
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hirvi@greenspot.fi * http://www.greenspot.fi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-23-2011, 10:31 AM
Kai Schaetzl
 
Default KVM, virsh attach-disk error

FYI: there is a list centos-virt.

Kai


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-23-2011, 02:03 PM
Jussi Hirvi
 
Default KVM, virsh attach-disk error

On 23.4.2011 13.31, Kai Schaetzl wrote:
> FYI: there is a list centos-virt.

Thanks for the tip! I am going to cross-post (sorry) my current
questions, but I still welcome answers on this list.

- Jussi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 10:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org