Bug 240127 - libvirt.libvirtError: virDomainCreateLinux() failed internal error
libvirt.libvirtError: virDomainCreateLinux() failed internal error
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: python-virtinst (Show other bugs)
rawhide
i686 Linux
medium Severity urgent
: ---
: ---
Assigned To: Daniel Berrange
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-15 08:49 EDT by Robert Scheck
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version: 0.2.3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-12 12:56:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Robert Scheck 2007-05-15 08:49:42 EDT
Description of problem:
[root@linuxtag ~]# virt-install --name kvm --file /home/robert/kvm.img --file-
size 0.6 --bridge eth0 --vnc --connect qemu:///system --location /srv/pungi/
Fedora/development/LinuxTag/i386/iso/F-development-i386-DVD.iso --ram=512


Starting install...
libvir: QEMU error : internal error End-of-file while reading PTY startup output
Traceback (most recent call last):
  File "/usr/sbin/virt-install", line 629, in <module>
    main()
  File "/usr/sbin/virt-install", line 578, in main
    dom = guest.start_install(conscb,progresscb)
  File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 649, in 
start_install
    return self._do_install(consolecb, meter)
  File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 666, in 
_do_install
    self.domain = self.conn.createLinux(install_xml, 0)
  File "/usr/lib/python2.5/site-packages/libvirt.py", line 480, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', 
conn=self)
libvirt.libvirtError: virDomainCreateLinux() failed internal error End-of-file 
while reading PTY startup output
[root@linuxtag ~]# rpm -qf `which virt-install`
python-virtinst-0.103.0-3.fc7
[root@linuxtag ~]#

Version-Release number of selected component (if applicable):
kernel-2.6.21-1.3142.fc7
python-virtinst-0.103.0-3.fc7
libvirt-0.2.2-3.fc7

How reproducible:
Everytime.

Actual results:
Non-working virt-install :(

Expected results:
Working virt-install like in the past ;-)
Comment 1 Robert Scheck 2007-05-15 10:26:34 EDT
[root@linuxtag ~]# virt-install --name kvm --file /home/robert/kvm.img --file-
size 0.6 --bridge eth0 --vnc --connect qemu:///system --location /srv/pungi/
Fedora/development/LinuxTag/i386/iso/F-development-i386-DVD.iso --ram=512 --
debug


Starting install...
Tue, 15 May 2007 16:24:37 DEBUG    Creating guest from '<domain type='qemu'>
  <name>kvm</name>
  <currentMemory>524288</currentMemory>
  <memory>524288</memory>
  <uuid>88fd0b90-b8d7-7c28-c47a-48fdf0460c71</uuid>
  <os>
    <type>hvm</type>

    <boot dev='cdrom'/>
  </os>
  <features>
    <pae/>
  </features>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <vcpu>1</vcpu>
  <devices>
    <console device='pty'/>
    <disk type='file' device='disk'>
      <source file='/home/robert/kvm.img'/>
      <target dev='hda'/>
    </disk>
    <disk type='file' device='cdrom'>
      <source file='/srv/pungi/Fedora/development/LinuxTag/i386/iso/F-
development-i386-DVD.iso'/>
      <target dev='hdc'/>
      <readonly/>
    </disk>

    <interface type='bridge'>
      <source bridge='eth0'/>
      <mac address='XX:XX:XX:XX:XX:XX'/>
    </interface>

    <graphics type='vnc' port='-1' />
  </devices>
</domain>
'
libvir: QEMU error : internal error End-of-file while reading PTY startup output
Traceback (most recent call last):
  File "/usr/sbin/virt-install", line 629, in <module>
    main()
  File "/usr/sbin/virt-install", line 578, in main
    dom = guest.start_install(conscb,progresscb)
  File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 649, in 
start_install
    return self._do_install(consolecb, meter)
  File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 666, in 
_do_install
    self.domain = self.conn.createLinux(install_xml, 0)
  File "/usr/lib/python2.5/site-packages/libvirt.py", line 480, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', 
conn=self)
libvirt.libvirtError: virDomainCreateLinux() failed internal error End-of-file 
while reading PTY startup output
[root@linuxtag ~]# 
Comment 2 Robert Scheck 2007-05-15 15:41:55 EDT
I was using http://people.redhat.com/berrange/libvirt-0.2.2-
4.fc7.2dantest.src.rpm - with the following result:

You do not have enough space in '/dev/shm' for the 512 MB of QEMU virtual RAM.
To have more space available provided you have enough RAM and swap, do as root:
umount /dev/shm
mount -t tmpfs -o size=528m none /dev/shm
Or disable the accelerator module with -no-kqemu

Can we please put this error message into something better like a dumb python 
exception?
Comment 3 Robert Scheck 2007-05-15 15:46:18 EDT
You do not have enough space in '/dev/shm' for the 512 MB of QEMU virtual RAM.
You do not have enough space in '/dev/shm' for the 512 MB of QEMU virtual RAM.
To have more space available provided you have enough RAM and swap, do as root:
umount /dev/shm
mount -t tmpfs -o size=528m none /dev/shm
You do not have enough space in '/dev/shm' for the 512 MB of QEMU virtual RAM.
To have more space available provided you have enough RAM and swap, do as root:
umount /dev/shm
mount -t tmpfs -o size=528m none /dev/shm
Or disable the accelerator module with -no-kqemu
Comment 4 Deependra Singh Shekhawat 2007-06-11 04:43:03 EDT
This bug hasn't been solved yet.
It remains in fedora 7 final release also.

I can't install Fedora7 via Qemu/KVM in a Fedora 7 host.

Please put some comments.
Comment 5 Robert Scheck 2007-06-11 04:45:06 EDT
Well, nobody of Red Hat worked at this bug report yet - so it can't be solved. 
Daniel, how do we do?
Comment 6 Daniel Veillard 2007-06-11 04:57:24 EDT
I find the "--file-size 0.6" option quite suspicious, if you expect to be able to
install in 600MB I can see how this could raise a serious problem.
You don't say either how much memory is available in the system, so independantly
of the PTY specific point there, the 
"You do not have enough space in '/dev/shm' for the 512 MB of QEMU virtual RAM."
seems indicative of a severe lack of resource, and well you don't indicate what
is available on the node.

Daniel
Comment 7 Robert Scheck 2007-06-11 05:01:27 EDT
Daniel, you didn't get the main problem: The error message ITSELF (e.g. from 
comment #2) has to be passed to the user trying to do this action. Failing with 
a python error and having a backtrace is the wrong way.
Comment 8 Daniel Veillard 2007-06-11 05:12:29 EDT
The title of the bug seems to indicate the problem you are raising is 
the fact that there is an error. If your complain is about how the 
error is raised, please update the title, thanks.
To me:

>Actual results:
>Non-working virt-install :(
>
>Expected results:
>Working virt-install like in the past ;-)

was indicative of a request to have this command working.
It fails with an error message about not being able to allocate the
512MB of memory needed for the KVM host.
So please provide the complete set of informations, 

   thanks in advance,

Daniel
Comment 9 Robert Scheck 2007-06-11 05:18:32 EDT
virt-install fails with "libvirt.libvirtError: virDomainCreateLinux() failed 
internal error" instead of printing the error message I got with your debug 
package. So please change virt-install to show the REAL error message instead 
of this end-user-unusable backtrace...feel free to change the title, but it 
IMHO fits to the problem.
Comment 10 Daniel Berrange 2007-06-11 07:17:31 EDT
We have a new libvirt release 0.2.3 which has much much improved error
reporting. It will report the exact error back to the user as well as logging
the problem in a per-VM logfile. This will be pushed in Fedora 7 updates in the
near future.
Comment 11 Deependra Singh Shekhawat 2007-06-12 12:51:24 EDT
Thanks for the new libvirt release 0.2.3

The PTY error earlier has gone and now I have installed fedora7 on fedora7 host
via KVM.

Also the Livecd of Fedora7 is working great with the KVM.

Once again many thanks!

Note You need to log in before you can comment on or make changes to this bug.