Assigning storage space fails if acceleration enabled

Bug #221746 reported by Eric Shattow
48
Affects Status Importance Assigned to Milestone
virtinst (Ubuntu)
Invalid
High
Unassigned
Hardy
Fix Released
Low
Unassigned
Intrepid
Won't Fix
High
Unassigned

Bug Description

Binary package hint: virt-manager

$ egrep '(model name|vmx)' /proc/cpuinfo | head -n 2
model name : Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm ida

Fresh install of Hardy 8.04 LTS on Dell 1402n laptop computer

1. $ sudo apt-get install virt-manager libvirt-bin kvm

2. $ adduser $USER kvm; # log out and log back in again

3. $ virt-manager --no-fork

# Open connection... ; Hypervisor = QEMU, Connection = local; connect.
a. New; Forward
b. Name system; Forward
c. [x] Fully Virtualized, [i686], [x] Enable kernel / hardware acceleration; Forward
d. Pick ISO location of WinXPSP2 ISO, OS Type = Windows, OS Variant = Microsoft Windows XP; Forward
e. [x] Simple File, defaults are okay; Forward # <--- Nothing happens? Let's check the terminal output...

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 295, in forward
    if(self.validate(notebook.get_current_page()) != True):
  File "/usr/share/virt-manager/virtManager/create.py", line 915, in validate
    self._disk.virtio = self._guest.get_virtio_blk()
  File "/usr/lib/python2.5/site-packages/virtinst/FullVirtGuest.py", line 206, in get_virtio_blk
    return FullVirtGuest.OS_TYPES[self.os_type]["virtio_blk"]
KeyError: 'virtio_blk'

4. As noted on the forum post: http://ubuntuforums.org/showthread.php?t=765712

I have tried this with un-checked '[ ] Enable kernel / hardware acceleration' option, and it does move past step 3:e. Confirming the report on the forum and submitting this bug.

Revision history for this message
Eric Shattow (eshattow) wrote :

Need to mention that this is for virt-manager version 0.5.3-0ubuntu9

Revision history for this message
Soren Hansen (soren) wrote :

Thanks for spotting this! I'll upload a fix in a minute. I'll post a link to the package so that you can test it.

Changed in virt-manager:
assignee: nobody → soren
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Soren Hansen (soren) wrote :
Revision history for this message
Soren Hansen (soren) wrote :

Uploaded to -proposed. Awaiting approval.

Revision history for this message
Pirouette Cacahuète (lissyx) wrote :

Just applied this patch by hand, and got my virtual machine created successfully :)

Revision history for this message
Soren Hansen (soren) wrote :

It's worth mentioning that the bug is actually in virtinst, but that's quite unobvious, so I'm keeping it here with virt-manager.

Revision history for this message
NiklasW (falken) wrote :

Same problem - How do I apply the patch?

Revision history for this message
Eric Shattow (eshattow) wrote :

For NikalasW, to apply the patch:

apt-get install build-essential
apt-get source virtinst

grab the patch

cd virtinst-0.300.2
patch -p1 < /path/to/patch.diff

Revision history for this message
NiklasW (falken) wrote :

Thx for the fast answer - next lame question... :)

Do I need to install virt-manager again? from the source?

Very greatful for the help.

Revision history for this message
Eric Shattow (eshattow) wrote :

@Soren

I've applied your patch locally and it does resolve my symptoms. I can now assign storage space successfully with checked '[x] acceleration enabled' option.

Revision history for this message
NiklasW (falken) wrote :

OK - Cannot get it sovled...

1. I did the patch command as stated above.
2. I have done a copy from the source files to the accuall diffrent catalogs
3. I ran ./autobuild.py
4. tested with and without kernel / HW acceleration

Still cannot get passed the storage step.

Ps. I have sucssesfully created a virtual mashine with qemu and started it with kvm outside of virt-manager (my CPU is a AMD X2 4400+, and I am running x86_64 version of Hardy)

Uname -a
Linux amanda 2.6.24-16-generic #1 SMP Thu Apr 10 12:47:45 UTC 2008 x86_64 GNU/Linux

Revision history for this message
NiklasW (falken) wrote :

My output

virt-manager --no-fork
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 295, in forward
    if(self.validate(notebook.get_current_page()) != True):
  File "/usr/share/virt-manager/virtManager/create.py", line 915, in validate
    self._disk.virtio = self._guest.get_virtio_blk()
AttributeError: 'FullVirtGuest' object has no attribute 'get_virtio_blk'

Meaning - I do get a error ref to this file as Erik did:

/usr/lib/python2.5/site-packages/virtinst/FullVirtGuest.py

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into hardy-proposed, please test.

Revision history for this message
Linus_W (linus-wolter) wrote :

How to test? I have hardy-proposed checked in synaptic. But no new packages appear when i reload.

Revision history for this message
NiklasW (falken) wrote :

Work around until this is fixed:

use virt-install from the consol, this could be used for a Windows setup (update paths):

$>virt-install -n WinXP -r 1024 --file /home/user/virtual/winxp.img --file-size=5 --sdl --accelerate -c /path/to/install.iso --os-type=windows --os-variant=winxp

use man virt-install for more info

Revision history for this message
Eric Shattow (eshattow) wrote :

Filed bug #222191 which may or may not be related to the above fix.

Revision history for this message
Soren Hansen (soren) wrote :

222191 is unrelated to this.

Revision history for this message
mshu (shu-mark) wrote :

I'm experiencing the same problem in here when creating a new VM (Win XP).
I just did some additional testing this morning and found out that the Virtual Machine Manager (GUI) only stall if you choose the OS type = Windows && Kernel/hardware acceleration check box is checked. Any idea / methods that will allow VM to be created as Windows type and enable Kernel / hardware acceleration ?

Cheers

Revision history for this message
Devrdander (devrdander) wrote :

Tried proposed and it fixed my problem,

BTW for the question above, I enabled proposed, reloaded my repositories, then in Synaptic I searched for virtinst and right-click/upgrade.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

0.300.2-0ubuntu6 from -proposed works fine and fixes the problem for me.

Revision history for this message
Peter C. Norton (spacey-launchpad-net) wrote :

mshu, it will fail when selecting OS type == unix and subtype == solaris10, and probably others, too. That's just what I ran into.

I'm using the package from -proposed, and it also fixes the problem for me.

Thanks,

-Peter

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to hardy-updates. Soren, please upload to intrepid ASAP.

Changed in virtinst:
status: Fix Committed → Fix Released
Revision history for this message
mshu (shu-mark) wrote :

Thanks Peter, the package from -proposed is working for me, but I still experience problem installing VM, not sure if it's related.
Upon installing Win XP, after the first stage, the installation will restart your computer. In my case the VM simply not restarting but shut down instead. Any idea?
Thanks

Revision history for this message
zadkeo (zpetterborg) wrote :

Thanks! The proposed package fixed my problem. I've been running fine now for a few days after upgrading it.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

I've tried to install SNV89 and OpenSolaris2008/05 as KVMs with patched virt-mnager.
Install runs fine, but both systems immediately panics at first boot:-
No dump device.
Notice that HVM SNV89 DomU works at Ubuntu 8.04 Desktop(Server) Dom0 (amd64)
I've also tried FreeBSD 7.0 (amd64) .Install runs fine, but both systems immediately panics at first boot:-
Cannot mount root fs.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

I've also added Hardy-proposed to Repos. Reload and make sure
that python-virtinst 0.300.2-0ubuntu6 is installed and cannot be upgraded.
I am just wondering what kind of guest are supposed to run as KVMs ?
Solaris (Nevada) is definitely not.

Revision history for this message
Leon (leonbo) wrote :

Hi,

I still think I'm having this error.

Here's the output of virt-install:
http://pastie.org/211020

And here's how I installed it:
http://pastie.org/211021

Revision history for this message
Leon (leonbo) wrote :

When I use virt-install on the xen host itself, it gives me the same error:

root@xen:~# virt-install
What is the name of your virtual machine? pxe
 How much RAM should be allocated (in megabytes)? 256
 What would you like to use as the disk (file path)? /media/sdablaat/
 ERROR: The disk path must be a file or a device, not a directory
What would you like to use as the disk (file path)? /media/sdablaat/pxe.img
 How large would you like the disk (/media/sdablaat/pxe.img) to be (in gigabytes)? 4
Sun, 08 Jun 2008 17:19:25 ERROR 'ParaVirtGuest' object has no attribute 'get_virtio_blk'
Traceback (most recent call last):
  File "/usr/bin/virt-install", line 519, in <module>
    main()
  File "/usr/bin/virt-install", line 438, in main
    guest, hvm, conn)
  File "/usr/bin/virt-install", line 139, in get_disks
    get_disk(disk, size, sparse, guest, hvm, conn)
  File "/usr/bin/virt-install", line 108, in get_disk
    d.virtio = guest.get_virtio_blk()
AttributeError: 'ParaVirtGuest' object has no attribute 'get_virtio_blk'

root@xen:~#

Revision history for this message
Soren Hansen (soren) wrote :

The attached patch should fix it. I don't have any Xen boxes around to test this, though. If someone can take it for a spin, we can get it pushed to hardy-proposed.

Soren Hansen (soren)
Changed in virtinst (Ubuntu Hardy):
status: Fix Released → In Progress
importance: High → Low
Soren Hansen (soren)
Changed in virtinst (Ubuntu):
assignee: Soren Hansen (soren) → nobody
Changed in virtinst (Ubuntu Hardy):
assignee: Soren Hansen (soren) → nobody
Changed in virtinst (Ubuntu Intrepid):
assignee: Soren Hansen (soren) → nobody
Changed in virtinst (Ubuntu):
status: Fix Committed → Triaged
Changed in virtinst (Ubuntu Intrepid):
status: Fix Committed → Triaged
Changed in virtinst (Ubuntu Hardy):
status: In Progress → Triaged
Revision history for this message
Sergio Zanchetta (primes2h) wrote :

Thank you for reporting this bug to Ubuntu. Intrepid Ibex 8.10 reached EOL on 30 March 2010.
Please see this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

Please feel free to report any other bugs you may find.
Thank you.

Changed in virtinst (Ubuntu Intrepid):
status: Triaged → Won't Fix
Revision history for this message
Sergio Zanchetta (primes2h) wrote :

I've just realized I made a mistake, Intrepid Ibex 8.10 "will reach" EOL on 30 "APRIL" 2010.

Sorry for this.

Anyway, I think that one month doesn't make any difference now.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Intrepid is now end of life. I am closing this bug. If you still have this issue with a current version of Ubuntu, please file a new bug. Thanks.

Changed in virtinst (Ubuntu Hardy):
status: Triaged → Fix Released
Changed in virtinst (Ubuntu):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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