Bug 1147720 - f20 virt-install Error validating install location for f21 alpha
Summary: f20 virt-install Error validating install location for f21 alpha
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1149603 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-29 23:42 UTC by Scott Poore
Modified: 2014-11-09 15:46 UTC (History)
7 users (show)

Fixed In Version: virt-manager-1.0.1-5.fc20
Clone Of:
Environment:
Last Closed: 2014-11-09 15:46:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Scott Poore 2014-09-29 23:42:39 UTC
Description of problem:

On my Fedora 20 desktop (failed when it was at Fedora 19 as well), I'm having a problem using virt-install to build Fedora 21 alpha VM.

[root@spoore-desktop ~]# virt-install --connect=qemu:///system --network=bridge:virbr0 --initrd-inject=./f21-1.ks --extra-args="ks=file:/f21-1.ks console=tty0 console=ttyS0,115200" --name=f21-1 --disk path=/data/VirtualMachines/f21-1.img,format=qcow2,size=8 --ram 1024 --vcpus=1 --check-cpu --hvm --location=http://dl.fedoraproject.org/pub/alt/stage/21_Alpha_RC1/Workstation/x86_64/os/ --nographics
ERROR    Error validating install location: invalid literal for int() with base 10: '21_Alpha'


Version-Release number of selected component (if applicable):
virt-install-1.0.1-4.fc20.noarch
virt-manager-1.0.1-4.fc20.noarch


How reproducible:
always in my setup

Steps to Reproduce:
1.  setup kickstart config (see below)
2.  qemu-img create -f qcow2 -o preallocation=metadata <img_file> 8G
3.  virt-install (see below for full args list)

Actual results:
ERROR    Error validating install location: invalid literal for int() with base 10: '21_Alpha'


Expected results:
builds VM with no errors.

Additional info:

#### Create disk image for VM:

[root@spoore-desktop ~]# qemu-img create -f qcow2 -o preallocation=metadata /data/VirtualMachines/f21-1.img 8G
Formatting '/data/VirtualMachines/f21-1.img', fmt=qcow2 size=8589934592 encryption=off cluster_size=65536 preallocation='metadata' lazy_refcounts=off 


#### Setup Kickstart config:

[root@spoore-desktop ~]# cat f21-1.ks 
install
#cdrom
url --url=http://dl.fedoraproject.org/pub/alt/stage/21_Alpha_RC1/Server/x86_64/os/
text
reboot
lang en_US.UTF-8
keyboard us
timezone  America/Chicago
network --device=eth0 --onboot=yes --bootproto=static --ip=192.168.122.211 --netmask=255.255.255.0 --gateway=192.168.122.1 --nameserver=192.168.122.1
firewall --disabled
selinux --permissive
bootloader --location=mbr --append="console=tty0 console=ttyS0,115200"
clearpart --all
autopart --type=lvm
%packages
wget
%end
rootpw redhat


#### Create VM with virt-install

[root@spoore-desktop ~]# virt-install --connect=qemu:///system \
> --network=bridge:virbr0 \
> --initrd-inject=./f21-1.ks \
> --extra-args="ks=file:/f21-1.ks console=tty0 console=ttyS0,115200" \
> --name=f21-1 \
> --disk path=/data/VirtualMachines/f21-1.img,format=qcow2,size=8 \
> --ram 1024 \
> --vcpus=1 \
> --check-cpu \
> --hvm \
> --location=http://dl.fedoraproject.org/pub/alt/stage/21_Alpha_RC1/Server/x86_64/os/ \
> --nographics \
> --debug
[Mon, 29 Sep 2014 18:20:03 virt-install 16465] DEBUG (cli:187) Launched with command line: /usr/share/virt-manager/virt-install --connect=qemu:///system --network=bridge:virbr0 --initrd-inject=./f21-1.ks --extra-args=ks=file:/f21-1.ks console=tty0 console=ttyS0,115200 --name=f21-1 --disk path=/data/VirtualMachines/f21-1.img,format=qcow2,size=8 --ram 1024 --vcpus=1 --check-cpu --hvm --location=http://dl.fedoraproject.org/pub/alt/stage/21_Alpha_RC1/Server/x86_64/os/ --nographics --debug
[Mon, 29 Sep 2014 18:20:03 virt-install 16465] DEBUG (cli:195) Requesting libvirt URI qemu:///system
[Mon, 29 Sep 2014 18:20:03 virt-install 16465] DEBUG (cli:199) Received libvirt URI qemu:///system
[Mon, 29 Sep 2014 18:20:03 virt-install 16465] DEBUG (virt-install:193) Requesting virt method 'hvm', hv type 'default'.
[Mon, 29 Sep 2014 18:20:03 virt-install 16465] DEBUG (virt-install:432) Received virt method 'kvm'
[Mon, 29 Sep 2014 18:20:03 virt-install 16465] DEBUG (virt-install:433) Hypervisor name is 'hvm'
[Mon, 29 Sep 2014 18:20:03 virt-install 16465] DEBUG (cli:515) --graphics compat generated: none
[Mon, 29 Sep 2014 18:20:04 virt-install 16465] DEBUG (distroinstaller:403) DistroInstaller location is a network source.
[Mon, 29 Sep 2014 18:20:04 virt-install 16465] DEBUG (urlfetcher:302) Finding distro store for location=http://dl.fedoraproject.org/pub/alt/stage/21_Alpha_RC1/Server/x86_64/os/
[Mon, 29 Sep 2014 18:20:04 virt-install 16465] DEBUG (urlfetcher:99) Fetching URI: http://dl.fedoraproject.org/pub/alt/stage/21_Alpha_RC1/Server/x86_64/os/.treeinfo
[Mon, 29 Sep 2014 18:20:04 virt-install 16465] DEBUG (urlfetcher:110) Saved file to /var/tmp/virtinst-.treeinfo.5SDfAt
[Mon, 29 Sep 2014 18:20:04 virt-install 16465] DEBUG (cli:234)   File "/usr/share/virt-manager/virt-install", line 876, in <module>
    sys.exit(main())
  File "/usr/share/virt-manager/virt-install", line 861, in main
    guest = build_guest_instance(conn, options, parsermap)
  File "/usr/share/virt-manager/virt-install", line 471, in build_guest_instance
    get_install_media(guest, options.location, options.cdrom)
  File "/usr/share/virt-manager/virt-install", line 236, in get_install_media
    fail(_("Error validating install location: %s" % str(e)))
  File "/usr/share/virt-manager/virtinst/cli.py", line 234, in fail
    logging.debug("".join(traceback.format_stack()))

[Mon, 29 Sep 2014 18:20:04 virt-install 16465] ERROR (cli:235) Error validating install location: invalid literal for int() with base 10: '21_Alpha'
[Mon, 29 Sep 2014 18:20:04 virt-install 16465] DEBUG (cli:237) 
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-install", line 234, in get_install_media
    validate_install_media(guest, location, cdpath, cdinstall)
  File "/usr/share/virt-manager/virt-install", line 244, in validate_install_media
    guest.installer.check_location(guest)
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 471, in check_location
    urlfetcher.detectMediaDistro(guest, self.location)
  File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 360, in detectMediaDistro
    store = getDistroStore(guest, fetcher)
  File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 311, in getDistroStore
    dist = _distroFromTreeinfo(fetcher, arch, _type)
  File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 295, in _distroFromTreeinfo
    ob.isValidStore()
  File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 681, in isValidStore
    vernum = int(str(ver).split("-")[0])
ValueError: invalid literal for int() with base 10: '21_Alpha'

Comment 1 Cole Robinson 2014-09-30 13:06:57 UTC
Thanks for the report. This is already fixed in upstream/f21, patch needs to be backported to f20 though

Comment 2 Scott Poore 2014-09-30 15:09:28 UTC
Awesome.  When it's available in updates-testing, I'll be glad to check it out and give karma.

Thanks

Comment 3 Cole Robinson 2014-10-06 15:39:01 UTC
*** Bug 1149603 has been marked as a duplicate of this bug. ***

Comment 4 Dean Hunter 2014-10-16 03:32:19 UTC
(In reply to Cole Robinson from comment #1)
> Thanks for the report. This is already fixed in upstream/f21, patch needs to
> be backported to f20 though

Is there a work-around you could recommend until the correction is backported to f20?  I would like to start testing f21 server but I do not know how to get around this problem.

Comment 5 Dean Hunter 2014-10-20 01:14:54 UTC
One work-around is to expand a local copy of the ISO and edit .treeinfo.  Replace the value assigned to version in the general section with the two digit fedora version number; ie. 21.

[general]
name = Fedora-Server-21_Beta_TC4
family = Fedora-Server
timestamp = 1413574682.38
variant = Server
version = 21
packagedir = 
arch = x86_64

In this case it started with the value: 21_Beta_TC4

Comment 6 Mat Booth 2014-10-23 10:55:20 UTC
Applying only the first hunk of the following patch was enough to get it working for me:

https://git.fedorahosted.org/cgit/virt-manager.git/commit/virtinst/urlfetcher.py?id=2e7d477156e9d0f6fb218fa19fc00d6229d33e85

Comment 7 Fedora Update System 2014-10-29 18:16:20 UTC
virt-manager-1.0.1-5.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/virt-manager-1.0.1-5.fc20

Comment 8 Scott Poore 2014-10-29 19:00:11 UTC
Looks like it's working:

[root@spoore-desktop ~]# virt-install --connect=qemu:///system --network=bridge:virbr0 --initrd-inject=./f21-1.ks --extra-args="ks=file:/f21-1.ks console=tty0 console=ttyS0,115200" --name=f21-1 --disk path=/data/VirtualMachines/f21-1.img,format=qcow2,size=8 --ram 1024 --vcpus=1 --check-cpu --hvm --location=http://dl.fedoraproject.org/pub/alt/stage/21_Alpha_RC1/Workstation/x86_64/os/ --nographics

Starting install...
Retrieving file .treeinfo...                                                      | 2.3 kB  00:00:00 !!! 
Retrieving file vmlinuz...                                                        |  11 MB  00:00:03 !!! 
Retrieving file initrd.img...                                                     |  85 MB  00:00:21 !!! 
Creating domain...                                                                |    0 B  00:00:00     
Connected to domain f21-1

...trunc...

I gave karma also.


Thanks!

Comment 9 Fedora Update System 2014-11-01 01:31:14 UTC
Package virt-manager-1.0.1-5.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing virt-manager-1.0.1-5.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-14000/virt-manager-1.0.1-5.fc20
then log in and leave karma (feedback).

Comment 10 Dean Hunter 2014-11-08 17:18:42 UTC
When testing this update to virt-install in a script with a location of http://dl.fedoraproject.org/pub/alt/stage/21_TC1/Server/x86_64/os/ the progress information is the largest part of the redirected output file:

Starting install...

Retrieving file .treeinfo...                                | 2.2 kB  00:00 !!! 

Retrieving file vmlinuz...  1% [                 ]  0.0 B/s |  93 kB  --:-- ETA 

Retrieving file vmlinuz...  2% [                 ]  90 kB/s | 152 kB  01:00 ETA 

Retrieving file vmlinuz...  4% [-                ]  99 kB/s | 226 kB  00:54 ETA 

Retrieving file vmlinuz...  5% [-                ] 108 kB/s | 305 kB  00:49 ETA 

Is there a way to suppress just the progress output?

Comment 11 Fedora Update System 2014-11-09 15:46:39 UTC
virt-manager-1.0.1-5.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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