Fedora 14 has version of Libvirt 0.8.7 and qemu-0.13.0-1 installed via Rawhide Preview Repo. However, straightforward attempt to virt-install Windows 7 on virtio boot device fails to detect device after viostor.sys gets preloaded. It’s a known bug [1]. Actually, thread at Red Hat Bugzilla – Bug 656353 contains required patch , but doesn’t contain any explanation how to rebuild and reinstall required package python-virtinst-0.500.4-1.fc14.noarch.rpm. Detailed workaround for this issue follows bellow as well as build of new package python-virtinst-0.500.5-1.fc14.noarch.rpm based on recent release virtinst 0.500.5 (Friday January 14, 2011)
Download and install python-virtinst-0.500.4-1.fc14.src.rpm. Apply patch bellow to /root/rpmbuild/SOURCES/virtinst-0.500.4/virtinst/Installer.py per Red Hat Bugzilla – Bug 656353 ( [1] ) and recreate /root/rpmbuild/SOURCES/virtinst-0.500.4.tar.gz. Then
# cd ../SPECS
# rpmbuild -bb ./python-virtinst.spec
--- aaa/virtinst/Installer.py 2010-08-24 00:05:33.000000000 +0400 +++ bbb/virtinst/Installer.py 2011-01-24 23:03:13.142553167 +0300 @@ -236,6 +236,20 @@ # Private methods def _get_bootdev(self, isinstall, guest): raise NotImplementedError + def _build_boot_order(self, isinstall, guest): + bootorder = [self._get_bootdev(isinstall, guest)] + + # If guest has an attached disk, always have 'hd' in the boot + # list, so disks are marked as bootable/installable (needed for + # windows virtio installs, and booting local disk from PXE) + for disk in guest.get_devices("disk"): + if disk.device == disk.DEVICE_DISK: + bootdev = self.bootconfig.BOOT_DEVICE_HARDDISK + if bootdev not in bootorder: + bootorder.append(bootdev) + break + + return bootorder def _get_osblob_helper(self, guest, isinstall, bootconfig): def get_param(obj, paramname): @@ -287,6 +301,8 @@ @type isinstall: C{bool} """ bootdev = self._get_bootdev(isinstall, guest) + bootorder = self._build_boot_order(isinstall, guest) + if isinstall: bootconfig = self._install_bootconfig else: @@ -298,7 +314,7 @@ bootconfig = copy.copy(bootconfig) if not bootconfig.bootorder: - bootconfig.bootorder = [bootdev] + bootconfig.bootorder = bootorder return self._get_osblob_helper(guest, isinstall, bootconfig)
Now reinstall python-virtinst-0.500.4-1.fc14.noarch.rpm
# cd ../RPMS/noarch
# yum reinstall python-virtinst-0.500.4-1.fc14.noarch.rpm
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Reinstall Process
Examining python-virtinst-0.500.4-1.fc14.noarch.rpm: python-virtinst-0.500.4-1.fc14.noarch
Resolving Dependencies
–> Running transaction check
—> Package python-virtinst.noarch 0:0.500.4-1.fc14 set to be reinstalled
–> Finished Dependency Resolution
Dependencies Resolved
===================================================================================================================
Package Arch Version Repository Size
===================================================================================================================
Reinstalling:
python-virtinst noarch 0.500.4-1.fc14 /python-virtinst-0.500.4-1.fc14.noarch 1.7 M
Transaction Summary
===================================================================================================================
Reinstall 1 Package(s)
Total size: 1.7 M
Installed size: 1.7 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : python-virtinst-0.500.4-1.fc14.noarch 1/1
Installed:
python-virtinst.noarch 0:0.500.4-1.fc14
Complete!
Another option based on virtinst 0.500.5 released on Friday January 14, 2011 :-
# cd ../SOURCES
# wget http://virt-manager.org/download/sources/virtinst/virtinst-0.500.5.tar.gz
# cd ../SPECS
# Update in python-virtinst.spec
Version: 0.500.5
Save
# rpmbuild -ba ./python-virtinst.spec
# cd ../RPMS/noarch
# yum install python-virtinst-0.500.5-1.fc14.noarch.rpm
New version of python-virtinst-0.500.5-1.fc14.src.rpm should be available for download
via https://bugzilla.redhat.com/show_bug.cgi?id=656353
Now run virt-install :-
virt-install --connect qemu:///system --virt-type kvm \
--name W7VIRT64 --ram 4096 --disk path=/dev/vg_virtuals/vm01,bus=virtio \
--disk /usr/tmp/virtio-win-1.1.16.vfd,device=floppy \
--os-variant win7 \
--cdrom /usr/tmp/Win7_64.iso --vcpus 2
References
1.https://bugzilla.redhat.com/show_bug.cgi?id=656353