Below is a (one of many) procedure to install WindowsXP on fedora 9 in KVM Virtualization.
The article located at techotopia is very helpful, but the virt-manager used there is not the latest one (at least at the time of making this post)
OS:Fedora 9 -32 bit (Linux Kernel : 2.6.25-14.fc9.i686)
Processor: Intel(R) Core(TM)2 Duo CPU E8200 @ 2.66GHz (Intel VT)
Procedure:
1) Check if you have IntelVT enabled
I got thisCode:grep vmx /proc/cpuinfo
You may need to enable IntelVT from BIOS.Code:flags : fpu vme de pse tsc msr pae mce cx8 apic 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 smx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm flags : fpu vme de pse tsc msr pae mce cx8 apic 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 smx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
2)Then run this.
I installed following versionsCode:yum install kvm qemu virt-manager
3) After installation, I opened Applications->System Tools->Virtual Machine Managerkvm i386 65-7.fc9
qemu i386 0.9.1-6.fc9
virt-manager i386 0.5.4-4.fc9
and right click on "localhost" and click "connect" from context menu and got error message
4) It seems libvertd is not started. I could have made it started from System->Administration->Services. But I decided to restart the machine and re-run the step 2. This time qemu gets connected on localhost without any problem.Unable to open a connection to the libvirt management daemon.
Verify that:
- The 'libvirtd' daemon has been started
5) Then right click on "localhost" and click "New" to create new virtualized OS and follow the simple straight-forward procedures. At the end it starts creating the machine by showing "Creating Virtual Machine" progress box. But at the end it throws me error messages.
6) I went to "/usr/lib/python2.5/site-packages/libvirt.py", line 841 and found the following function.Unable to complete install: 'virDomainCreateLinux() failed internal error Timed out while reading monitor startup output'
Unable to complete install '<class 'libvirt.libvirtError'> virDomainCreateLinux() failed internal error Timed out while reading monitor startup output
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/create.py", line 651, in do_install
dom = guest.start_install(False, meter = meter)
File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 845, in start_install
return self._do_install(consolecb, meter)
File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 866, in _do_install
self.domain = self.conn.createLinux(install_xml, 0)
File "/usr/lib/python2.5/site-packages/libvirt.py", line 841, in createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: virDomainCreateLinux() failed internal error Timed out while reading monitor startup output
'
The comment present on the function caught my eye. So this is about privilege! By some permutation and combination, I got to know that this is something related to SELinux. So go to System->Administration->SELinux Management. From there I changed the "Status" as follows,def createLinux(self, xmlDesc, flags):
"""Launch a new Linux guest domain, based on an XML
description similar to the one returned by
virDomainGetXMLDesc() This function may requires privileged
access to the hypervisor. """
ret = libvirtmod.virDomainCreateLinux(self._o, xmlDesc, flags)
if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
__tmp = virDomain(self,_obj=ret)
return __tmp
7) I ticked on "Relabel on Next reboot" and restarted the machine and rerun the step 5. This time I selected the previously created image file (as I am not using normal disk partition) but got same error message. I again rerun the step 5 and got it working. This time I saw a splash of SELinux AVC message. May be that's why I needed to try twice before make it working.System Default Enforcing Mode: Permissive
Current Enforcing Mode:Permissive
System Default Policy Type:targeted
8) After that just follow simple procedure to install Windows. But you will probably get error messages after restarting the virtual machine after Windows asked you to do so. You need to add the CD Drive to the virtual machine. Do it in following way , -
a) On Virtual Machine Manager , righ click on newly added virtual machine and click "Details".
b) Then on the new dialog box , click "Hardware" tab and select "Disk hdc".
c) You will see a "connect" button, clicking it will open another dialog box. Select from "CD-ROM o DVD" list and click "Ok".
d) After that, run the virtualized machine. Now the installation should get complete.
I just forgot to mention that you need to place the Windows installer CD in your CD drive at the time of virtual machine creation and installation (I guess that is pretty obvious).


.
Reply With Quote
