From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Wed, 14 Apr 2010 20:19:00 +0000 Subject: Re: hotplug virtual disk to a Linux guest virtual machine with udev Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wed, Apr 14, 2010 at 21:10, Shi Jin wrote: > I am running KVM virtual machines and with libvirt, I am able to > attach volumes to the running VM instance. > However, it turned out that different latest Linux distributions have > different results on getting the volume live. > > I've tried Fedora Core 12, Ubuntu 9.10 and CentOS 5.4. Only FC12 is > able to see the attached volume right away. > Ubuntu and CentOS need to be rebooted to see the newly attached volumes. > > In my understanding, all three distributions are running udev now and > I think udev is what is responsible for hot plug devices. > Am I right? > > I suspected this is caused by the udev kernel configurations. > Therefore, I obtained the FC12 kernel source and build them and > installed the newly built kernel onto my Ubuntu 9.10 and CentOS 5.4 > VMs and viola, they both work with live attached volumes seen > immediately, no need for reboot. > > So it is confirmed it is the kernel that matters here, instead of user > space software. However, I googled around and found that to enable > udev, we need the following kernel options: Check "dmsg" if the kernel sees the new device. If it does, it's probably a pure userspace issue. Kay