Can't perform an HTTP VM install with virt-manager

Bug #1286500 reported by Łukasz Jernaś
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
virtinst (Ubuntu)
Fix Released
High
Unassigned

Bug Description

When trying to create a VM using HTTP Ubuntu sources I get:
Unable to complete install: ''virStream' object has no attribute 'upload''

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 1983, in do_install
    guest.start_install(False, meter=meter)
  File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 1229, in start_install
    self._prepare_install(meter, dry)
  File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 981, in _prepare_install
    meter=meter)
  File "/usr/lib/python2.7/dist-packages/virtinst/DistroInstaller.py", line 452, in prepare
    dev = self._prepare_kernel_and_initrd(guest, meter)
  File "/usr/lib/python2.7/dist-packages/virtinst/DistroInstaller.py", line 412, in _prepare_kernel_and_initrd
    kernelfn, initrdfn)
  File "/usr/lib/python2.7/dist-packages/virtinst/DistroInstaller.py", line 353, in _upload_media
    kvol = _upload_file(conn, meter, pool, kernel)
  File "/usr/lib/python2.7/dist-packages/virtinst/DistroInstaller.py", line 126, in _upload_file
    stream.upload(vol, offset, length, flags)
AttributeError: 'virStream' object has no attribute 'upload'

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: virt-manager 0.9.5-1ubuntu2
ProcVersionSignature: Ubuntu 3.13.0-13.33-generic 3.13.5
Uname: Linux 3.13.0-13-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.13.2-0ubuntu5
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Mar 1 11:35:02 2014
PackageArchitecture: all
SourcePackage: virt-manager
UpgradeStatus: Upgraded to trusty on 2014-02-01 (27 days ago)

Revision history for this message
Łukasz Jernaś (deejay1) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in virt-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Nicolai Mollerup (nicolai-mollerup) wrote :

Seems the same bug that affected RedHat:
https://bugzilla.redhat.com/show_bug.cgi?id=1058720

According to that report it is fixed in upstream code, so should reimported.

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

It renders essential functionality of the package (or a dependent one) broken.

Changed in virt-manager (Ubuntu):
importance: Undecided → High
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Looks like cherrypicking commit bd15cd3d6e should fix this

Changed in virt-manager (Ubuntu):
importance: High → Medium
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

It seems this actually is in the virtinst package.

affects: virt-manager (Ubuntu) → virtinst (Ubuntu)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I was going to push this patch, however while it gets us past the error reported in this bug, it proceeds to get the kernel and initrd then tell me: Unable to complete install: 'invalid stream pointer in virStorageVolUpload'

tags: added: patch
Revision history for this message
Peter Matulis (petermatulis) wrote :

FWIW, this is what I am getting on Trusty with virt-install:

===
.
.
.
[Mon, 07 Apr 2014 13:12:01 virt-install 8008] DEBUG (Storage:1196) Creating storage volume 'virtinst-linux.rG36ej' with xml:
<volume>
  <name>virtinst-linux.rG36ej</name>
  <capacity>4965840</capacity>
  <allocation>0</allocation>
  <target>
    <format type='raw'/>
  </target>
</volume>

Allocating 'virtinst-linux.rG36ej' | 4.7 MB 00:00
[Mon, 07 Apr 2014 13:12:01 virt-install 8008] DEBUG (Storage:1220) Storage volume 'virtinst-linux.rG36ej' install complete.
[Mon, 07 Apr 2014 13:12:01 virt-install 8008] ERROR (cli:445) 'virStream' object has no attribute 'upload'
[Mon, 07 Apr 2014 13:12:01 virt-install 8008] DEBUG (cli:448)
Traceback (most recent call last):
  File "/usr/bin/virt-install", line 636, in start_install
    noboot=options.noreboot)
  File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 1229, in start_install
    self._prepare_install(meter, dry)
  File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 981, in _prepare_install
    meter=meter)
  File "/usr/lib/python2.7/dist-packages/virtinst/DistroInstaller.py", line 452, in prepare
    dev = self._prepare_kernel_and_initrd(guest, meter)
  File "/usr/lib/python2.7/dist-packages/virtinst/DistroInstaller.py", line 412, in _prepare_kernel_and_initrd
    kernelfn, initrdfn)
  File "/usr/lib/python2.7/dist-packages/virtinst/DistroInstaller.py", line 353, in _upload_media
    kvol = _upload_file(conn, meter, pool, kernel)
  File "/usr/lib/python2.7/dist-packages/virtinst/DistroInstaller.py", line 126, in _upload_file
    stream.upload(vol, offset, length, flags)
AttributeError: 'virStream' object has no attribute 'upload'
[Mon, 07 Apr 2014 13:12:01 virt-install 8008] DEBUG (cli:457) Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start precise-6
otherwise, please restart your installation.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start precise-6
otherwise, please restart your installation.
===

I am available for testing.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

 virt-install -l http://ftp.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64 -r 1024 --accelerate -n x1 -f /home/ubuntu/x.img

is the command i'm using to reproduce.

Revision history for this message
Peter Matulis (petermatulis) wrote :

This is the command I used in comment #8. My gripe is how to continue using preseed since --extra-args is incompatible with --cdrom (i.e. when using the 'ISO workaround').

virt-install -d \
        --virt-type kvm \
        --hvm \
        --accelerate \
        --connect qemu:///system \
        --os-type linux \
        --noautoconsole \
        --graphics vnc \
        --network bridge=br0 \
        --vcpus $CPU \
        --os-variant $VARIANT \
        --name $NAME \
        --ram $RAM_SIZE_MB \
        --disk $DISK_DIR/$NAME.img,size=$DISK_SIZE_GB,bus=virtio,cache=writeback \
        --location http://ca.archive.ubuntu.com/ubuntu/dists/"$RELEASE"/main/installer-amd64/ \
        --extra-args="locale=en_US interface=eth0 DEBCONF_DEBUG=developer auto=true priority=critical $PRESEED"

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

(bumped prio given pmatulis' description of the need for this)

Changed in virtinst (Ubuntu):
importance: Medium → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virtinst - 0.600.4-3ubuntu2

---------------
virtinst (0.600.4-3ubuntu2) trusty; urgency=medium

  * cherrypick upstream patch to fix volume upload (LP: #1286500)
 -- Serge Hallyn <email address hidden> Mon, 07 Apr 2014 23:04:15 -0500

Changed in virtinst (Ubuntu):
status: Confirmed → Fix Released
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.