From: "Wangpan" Subject: live attached disk cannot be found in the guest VM sometimes Date: Tue, 9 Oct 2012 12:37:56 +0800 Message-ID: <1630852833.52804.1349757479507.JavaMail.hzwangpan@corp.netease.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit To: "kvm" Return-path: Received: from m31-109.vip.163.com ([220.181.31.109]:34336 "EHLO corp.netease.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750941Ab2JIEiE (ORCPT ); Tue, 9 Oct 2012 00:38:04 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Hi all, I got a issue when attach disk to a qemu-kvm guest(kernel version: Linux debian 3.2.0-3-amd64 #1 SMP Thu Jun 28 09:07:26 UTC 2012 x86_64 GNU/Linux) The steps are: 1. using libvirt API start a guest 2. 'ping' the IP address of the guest once each time 3. when 'ping' return OK, I attach a ISCSI LVM disk into the guest by libvirt API, and the disk appears in the guest this works successfully most of the time, BUT sometimes I cannot see the disk in the guest(by 'fdisk -l') evenif the libvirt API return OK and I can see the disk is in the XML configuration dumped by 'virsh dumpxml'. I check the syslog of the guest, and guess the reason may be that, the attach operation is before the kernel module loaded(pci_hotplug/acpiphp), so the attached disk doesn't appear in the guest. Is this right? Log messages: qemu log: 2012-10-08 09:47:31.753+0000: starting up(guest starts time, UTC should +8 to CST) libvirt API call log: 2012-10-08 17:47:36,931 INFO Attach volume 1449 into virtual machine device 11606f9e-98ee-4857-99ea-14a576037bfc begin... 2012-10-08 17:47:37,757 INFO Successfully attach volume 1449 into 11606f9e-98ee-4857-99ea-14a576037bfc, virtual machine device: /dev/ebs/xdey syslog: Oct 8 17:47:42 debian kernel: imklog 5.8.11, log source = /proc/kmsg started Any suggestion is welcome, thanks in advance. Wangpan