KVM very, very slow with RedHat and Solaris guests

Bug #239355 reported by James Rankin
24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kvm (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: kvm

Hello,
I'm using a 32 bit Hardy 8.04 desktop with an Intel Core2Quad processor, and I've come across a problem with KVM.

VT is enabled in my computer's BIOS, and the kvm modules are loaded:
$ lsmod | grep kvm
kvm_intel 36032 1
kvm 115252 1 kvm_intel

I am able to create a new Ubuntu Hardy guest using KVM, and it works very well.

If I try to create other guests based on Red Hat or Solaris, then guest runs extremely slowly and eventually hangs. I've tried a CentOS 5 guest install several times now. With each install, I've been booting the guest from a local DVD ISO file. The guest does boot the iso, but runs extremely slowly. I left a CentOS 5 guest install running for 18 hours now... during that time, I still haven't made it to anaconda. So far, I've only made it past the text based media check used by RHEL.
Same with Solaris - the guest hangs right after the installer starts.

I've attached a screenshot of Console 4 output inside a CentOS 5 guest during install. If I left this running overnight, the "DSC: timeout" messages would stack up and fill the screen. Console 1 will simply be frozen at "Starting anaconda..."

During these very slow guest installs and hangs, guest CPU utilization is about 1%, and the host CPU utilization has been very low as well.

Pleas let me know what other info I can provide.

Thanks!

Revision history for this message
James Rankin (rankin-james) wrote :
Revision history for this message
Vivek Kapoor (marquivon) wrote :

I am having the exact same problem. I am trying to install AsteriskNOW 1.0.2 (32-bit) on a virtual machine. The case here is

1. I already have a Virtual Machine with /dev/sda5 as its primary storage. That machine is shutdown.
2. Through virt-manager I add a Storage Drive to it (an IDE CDROM), and point it to the AsteriskNOW ISO file.
3. I make the CDROM as the bootable device.
4. It does boot without any problems, but gets stuck while loading anaconda (as in the message above), and gives the message of "hda: DSC Timeout" in VT4.

Revision history for this message
Chuck Short (zulcss) wrote :

I get the same if I am using the dapper cd-roms as well. 2.6.24-19.28 and kvm-1:62+dfsg-0ubuntu7

chuck

Changed in kvm:
status: New → Confirmed
Revision history for this message
Steven Wagner (stevenwagner) wrote :

Same problem here. Centos 5.2 DVD iso.

Revision history for this message
Steven Wagner (stevenwagner) wrote :

netinstall works fine. Good work around.

Revision history for this message
Frank Wang (gladandong) wrote :

Same problem trying CentOS-4.6-i386-binDVD and CentOS-5.2-i386-binDVD.

Revision history for this message
Ted (tedks) wrote :

I seemed to get this with Ututo XS 2007.1. Another workaround is converting the virtual hard disk to a scsi bus instead of ide.

Revision history for this message
Doug Schaefer (doug-schaefer) wrote :

Ditto on CentoS 4.6. I had not problem with an RHEL 4 disk image I copied over so it must be the CDROM driver. As confirmed by the successful network install.

Revision history for this message
gator (waltons4) wrote :

I have the same error on CentOS5.2
hdc:DSC timeout
- after searching around it seems this command might fix the problem
echo "dsc_overlap:0">/proc/ide/ide0/hdc/settings

but the problem for me is how do i get a console from the installer to issue the command - can anyone help/check this out

Revision history for this message
gator (waltons4) wrote :

OK, success !! - here's what i did
 first i created my image hard drives and started kvm with the following command - adjust to suit your VM

steve@kubuntu:~$ kvm -boot d -m 512 -hda '/home/steve/Desktop/REDHAT TRAINING/VM/disk1' -hdb '/home/steve/Desktop/REDHAT TRAINING/VM/disk2' -hdd '/home/steve/Desktop/REDHAT TRAINING/VM/disk3' -cdrom '/home/steve/Desktop/REDHAT TRAINING/VM/CentOS-5.2-i386-bin-DVD.iso' -net nic,vlan=0 -net user,vlan=0 -localtime

i skipped the media check and waited and waited.... after a while i get the normal errors appearing on console 4 ( ALT F4 ) -
hdc DSC timeout

after a longer time you'll be able to access the console with ( ALT F2 ) then i issued the following command about 5 times with a minute between them ( maybe once is enough )

echo "dsc_overlap:0">/proc/ide/ide1/hdc/settings

The system console shows that the command is obsolete... soon and ' device is busy ' or something like that. Also notice that the command is ide1 not ide0 like my previous post. It looks like its not going to work but after a while you can switch back to the install screen ( ALT F1) it should say "Welcome to CentOS"
proceed with install as usual, partition, select desktop, password. I skipped setting up the network but i was connected when i rebooted the VM
worked for me.. good luck

Revision history for this message
gator (waltons4) wrote :

sorry i forgot to say that i used the text installer.. not sure if it makes a difference

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hello,

I tried to reproduce this on an Intrepid host (amd64), where I installed CentOS 4.7 (x86_64).

The installation proceeded quickly and smoothly, and completed without error.

And it's running without a problem.

I did, however, use a qcow disk image, created with:
 * qemu-img create -f qcow2 centos4.7.img 4G
rather than the dedicated disk partition that others have tried.

I will attempt to reproduce this again with that setup.

:-Dustin

Revision history for this message
Frank Wang (gladandong) wrote : Re: [Bug 239355] Re: KVM very, very slow with RedHat and Solaris guests

Hi All

The problem seems has been fixed in Intrepid, I have successfully install
CentOS 5.2 :-)

On Tue, Sep 23, 2008 at 7:00 AM, Dustin Kirkland
<email address hidden>wrote:

> Hello,
>
> I tried to reproduce this on an Intrepid host (amd64), where I installed
> CentOS 4.7 (x86_64).
>
> The installation proceeded quickly and smoothly, and completed without
> error.
>
> And it's running without a problem.
>
> I did, however, use a qcow disk image, created with:
> * qemu-img create -f qcow2 centos4.7.img 4G
> rather than the dedicated disk partition that others have tried.
>
> I will attempt to reproduce this again with that setup.
>
>
> :-Dustin
>
> --
> KVM very, very slow with RedHat and Solaris guests
> https://bugs.launchpad.net/bugs/239355
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "kvm" source package in Ubuntu: Confirmed
>
> Bug description:
> Binary package hint: kvm
>
> Hello,
> I'm using a 32 bit Hardy 8.04 desktop with an Intel Core2Quad processor,
> and I've come across a problem with KVM.
>
> VT is enabled in my computer's BIOS, and the kvm modules are loaded:
> $ lsmod | grep kvm
> kvm_intel 36032 1
> kvm 115252 1 kvm_intel
>
> I am able to create a new Ubuntu Hardy guest using KVM, and it works very
> well.
>
> If I try to create other guests based on Red Hat or Solaris, then guest
> runs extremely slowly and eventually hangs. I've tried a CentOS 5 guest
> install several times now. With each install, I've been booting the guest
> from a local DVD ISO file. The guest does boot the iso, but runs extremely
> slowly. I left a CentOS 5 guest install running for 18 hours now... during
> that time, I still haven't made it to anaconda. So far, I've only made it
> past the text based media check used by RHEL.
> Same with Solaris - the guest hangs right after the installer starts.
>
> I've attached a screenshot of Console 4 output inside a CentOS 5 guest
> during install. If I left this running overnight, the "DSC: timeout"
> messages would stack up and fill the screen. Console 1 will simply be frozen
> at "Starting anaconda..."
>
> During these very slow guest installs and hangs, guest CPU utilization is
> about 1%, and the host CPU utilization has been very low as well.
>
> Pleas let me know what other info I can provide.
>
> Thanks!
>

--

Best Regards !

Frank Wang (王洪源)

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Marking fix released, as this is working for me, and at least one other previous reporter.

:-Dustin

Changed in kvm:
status: Confirmed → Fix Released
Revision history for this message
Joe (joesaland) wrote :

I don't know how this can be considered fixed. It is certainly still a problem in Hardy. I can't really do a RHEL4 install without waiting 10+ minutes for a timeout on an alternate console so I can get in and echo a command to change the ide settings for a device. That's a pretty hefty work around for most users.

There is a problem with the cdrom driver for kvm, that on hardy is not fixed. Upgrading to intrepid is not an option for most users.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Thanks for the update Joe.

I'm not asking most users to upgrade to Intrepid. I simply trying to
verify that the problem is fixed in Intrepid.

I, for one, cannot reproduce this issue on my Hardy machines, and I'm
definitely not seeing it in Intrepid (where several advances have
happened that might solve this issue).

Before considering a backport of a fix to Hardy, we would like to
confirm that the issue has been fixed in Intrepid.

:-Dustin

Revision history for this message
MarkUK (mar29) wrote :

Surely, if this is listed as fixed, nobody is going to investigate further into Hardy (long term support) which must take precedence over Intrepid.

I'm getting this issue trying Gentoo minimal (hdc issue) and Debian Etch (hda issue) net install. I didn't get it with Ubuntu Hardy install under kvm.
It may be that certain Kernels are most resilient to this problem when run under kvm.

Mark

Revision history for this message
Jamin W. Collins (jcollins) wrote :

I had been suffering from the same problem, slow installation of Debian Etch within a virtual machine and DSC timeouts. However, after installing the kvm and virt-manager packages from TJ's PPA site (listed here: http://ubuntuforums.org/showthread.php?t=876695) the problem appears to be completely resolved.

Revision history for this message
wondermike (wondermike) wrote :

Hi, is there any update on this topic? Will there be a fix in 8.04 for the next time?
I tried echo "dsc_overlap:0">/proc/ide/ide1/hdc/settings but it was no use in my case, tried with both hdc and with hda.
I haven't tried the kvm and virt-manager packages from TJ's PPA site yet. Can they be used for a stable production system? Will the system be updateable with these packages?
BTW, using a dual cpu 64 bit machine with intel-vt.
TIA, Regards, Michael

Revision history for this message
Carlos Campderrós (carlos-campderros) wrote :

I run accross this bug on hardy, trying to install debian etch 4.0_r7 i386 as guest. The echo 'dsc_overlap:0' thing didn't help. I shutted down the machine and modified its xml file (/etc/libvirt/name-of-machine.xml) to use scsi bus instead of ide, for both cdrom and disk. After doing so, run virsh define /etc/libvirt/name-of-machine.xml and then power on the vm.

Here's a snip of my xml config file that worked well. I only replace 'ide' for 'scsi' in bus attribute in <target> node for each <disk>, leaving dev as 'hd*' instead of 'sd*' (as virsh complained if I did so).

<devices>
   [...]
    <disk type='block' device='disk'>
      <source dev='/dev/raid/debian'/>
      <target dev='hda' bus='scsi'/>
    </disk>
    <disk type='file' device='cdrom'>
      <source file='/path/to/debian-cd1.iso'/>
      <target dev='hdc' bus='scsi'/>
      <readonly/>
    </disk>
   [...]
</devices>

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

FYI: I got the EXACT SAME issue running CentOS 5.3 and Xen in HVM mode... Not sure how to fix yet. This looks like a CentOS bug to me.

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Just solved it by using sda / sdb for the cdrom images instead of using hdc / hdd. Maybe you guys can do the same with KVM?

Revision history for this message
wondermike (wondermike) wrote :

Hi, no, sorry, can't tickle out that effect again as the machine is
already in production with debian 5 as the kvm host.
Sorry
Regards
Michael

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.