[libvirt] problems using virt-manager with qemu-kvm to boot a windows from floppy

John Lumby johnlumby at hotmail.com
Fri Jul 23 15:14:37 UTC 2010


Background :   
   I have an existing win2K system which consists of one boot-floppy image (boot device) and one hard-disk partition /dev/sdc1).    Previously I got this running with virt-manager and qemu-0.11 with kqemu  -    after hitting one bug in virtinst concerning name of the floppy and applying fix from Cole 
            http://hg.fedorahosted.org/hg/python-virtinst/rev/4d0ea2274ffd

Yesterday:
  tried running same win2k but on a different system  -  the machine has the Intel VT-x   -    OS still Fedora 13,  using qemu-kvm.

   I applied the above patch to this system's virt-inst,  and tried basically same virt-install command other than to select virt-type of kvm instead of kqemu

virt-install --connect qemu:///system --name=OCFwin2k --ram=392 --cpuset=0 --description="win2k on OCFed disk on usb, nat network" --import --network=network=default,model=pcnet --virt-type=kvm --accelerate --vnc --vncport=5905 --video=cirrus --disk=/home/lumby/Downloads/win2k_boot.floppage,device=floppy --disk=/dev/sdc,device=disk --os-type=windows --os-variant=win2k

But this time I hit two new problems  :
    .   another (different) one relating to the floppy  -   qemu-kvm couldn't find it
    .   wrong syntax for the usb tablet in qemu-kvm command meant no tablet.

The qemu-kvm command that virt-manager came up with was this:

/usr/bin/qemu-kvm -S -M fedora-13 -cpu n270,+x2apic -enable-kvm -m 392 -smp 1,sockets=1,cores=1,threads=1 -name OCFwin2k -uuid 8a63ef02-cea8-cc23-5a31-f98a1b0bdea1 -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/OCFwin2k.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=localtime -boot a -drive file=/home/lumby/Downloads/win2k_boot.floppage,if=none,id=drive-fdc0-0-0 -global isa-fdc.driveA=drive-fdc0-0-0 -drive file=/dev/sdc,if=none,id=drive-ide0-0-0 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -device pcnet,vlan=0,id=net0,mac=52:54:00:97:f6:b9,bus=pci.0,addr=0x4 -net tap,fd=45,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc 127.0.0.1:5 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3

I've attached at the bottom the xml that virst-inst built for this machine.

I then looked back at what qemu command the virt-manager on my other system had come up with, merged bits of that with the above, and came up with this one which worked ok.  It's a whole lot simpler!

/usr/bin/qemu-kvm -M fedora-13 -m 392 -smp 1 -name OCFwin2k -localtime -boot a -drive file=/home/lumby/Downloads/win2k_boot.floppage,if=floppy,unit=0 -drive file=/dev/sdc,if=ide,bus=0,unit=0 -net nic,macaddr=52:54:00:d7:84:4e,vlan=0,name=net0 -net tap,fd=17,vlan=0,name=hostnet0 -serial pty -parallel none -usb -usbdevice tablet -vga cirrus

I think there must be a bug or two somewhere but whether in virt-manager or in virt-inst or both I don't know.     If you want more information just ask.

John Lumby

content of the xml generated by the above virt-install :

[Thu, 22 Jul 2010 19:39:02 virt-install 4709] DEBUG (cli:192) Launched with command line:
/usr/sbin/virt-install --connect qemu:///system --name=OCFwin2k --ram=392 --cpuset=0 --description=win2k on OCFed disk on usb, nat network --import --network=network=default,model=pcnet --virt-type=kvm --accelerate --vnc --vncport=5905 --video=cirrus --disk=/home/lumby/Downloads/win2k_boot.floppage,device=floppy --disk=/dev/sdc,device=disk --os-type=windows --os-variant=win2k
[Thu, 22 Jul 2010 19:39:02 virt-install 4709] DEBUG (cli:216) Requesting libvirt URI qemu:///system
[Thu, 22 Jul 2010 19:39:02 virt-install 4709] DEBUG (cli:218) Received libvirt URI qemu:///system
[Thu, 22 Jul 2010 19:39:03 virt-install 4709] DEBUG (virt-install:494) Requesting virt method 'default', hv type 'kvm'.
[Thu, 22 Jul 2010 19:39:03 virt-install 4709] DEBUG (virt-install:816) Received virt method 'hvm'
[Thu, 22 Jul 2010 19:39:03 virt-install 4709] DEBUG (virt-install:817) Hypervisor name is 'kvm'
[Thu, 22 Jul 2010 19:39:03 virt-install 4709] DEBUG (virt-install:351) parse_disk: returning {'format': None, 'bus': None, 'readOnly': False, 'volInstall': None, 'path': '/home/lumby/Downloads/win2k_boot.floppage', 'device': 'floppy', 'volName': None, 'conn': <libvirt.virConnect instance at 0x93ec6ec>, 'size': None, 'driverCache': None, 'shareable': False, 'sparse': True}
[Thu, 22 Jul 2010 19:39:03 virt-install 4709] DEBUG (virt-install:351) parse_disk: returning {'format': None, 'bus': None, 'readOnly': False, 'volInstall': None, 'path': '/dev/sdc', 'device': 'disk', 'volName': None, 'conn': <libvirt.virConnect instance at 0x93ec6ec>, 'size': None, 'driverCache': None, 'shareable': False, 'sparse': True}
[Thu, 22 Jul 2010 19:39:03 virt-install 4709] DEBUG (Guest:1012) Generated install XML: None required
[Thu, 22 Jul 2010 19:39:03 virt-install 4709] DEBUG (Guest:1030) Generated boot XML: 
<domain type='kvm'>
  <name>OCFwin2k</name>
  <currentMemory>401408</currentMemory>
  <memory>401408</memory>
  <uuid>8a63ef02-cea8-cc23-5a31-f98a1b0bdea1</uuid>
  <description>win2k on OCFed disk on usb, nat network</description>
  <os>
    <type arch='i686'>hvm</type>
    <boot dev='fd'/>
  </os>
  <features>
    <acpi/><apic/><pae/>
  </features>
  <cpu match='exact'>
    <model>n270</model>
    <feature policy='force' name='x2apic'/>
  </cpu>
  <clock offset="localtime"/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <vcpu cpuset='0'>1</vcpu>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='floppy'>
      <driver name='qemu'/>
      <source file='/home/lumby/Downloads/win2k_boot.floppage'/>
      <target dev='fda' bus='fdc'/>
    </disk>
    <disk type='block' device='disk'>
      <driver name='qemu'/>
      <source dev='/dev/sdc'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <mac address='52:54:00:97:f6:b9'/>
      <model type='pcnet'/>
    </interface>
    <input type='tablet' bus='usb'/>
    <graphics type='vnc' port='5905' keymap='en-us'/>
    <console type='pty'/>
    <video>
      <model type='cirrus'/>
    </video>
  </devices>
</domain>

[Thu, 22 Jul 2010 19:39:04 virt-install 4709] DEBUG (Guest:1070) Launching console callback

 		 	   		  
_________________________________________________________________
Look 'em in the eye: FREE Messenger video chat
http://go.microsoft.com/?linkid=9734386
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100723/e7f1362f/attachment-0001.htm>


More information about the libvir-list mailing list