virtinst ... proper API way to add a floppy drive?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm working on adding scripted Windows install support (ISO + answer file on floppy) support to koan.

I'm getting the following when trying to attach a floppy image.

=======================

Here's the error:

libvir: QEMU error : Domain not found
libvir: QEMU error : Domain not found
libvir: Domain Config error : internal error Invalid floppy device name: hda
<class 'libvirt.libvirtError'>
internal error Invalid floppy device name: hda
 File "app.py", line 193, in main
   k.run()
  File "app.py", line 298, in run
   self.virt()
  File "app.py", line 586, in virt
   return self.net_install(after_download)
  File "app.py", line 505, in net_install
   after_download(self, profile_data)
  File "app.py", line 584, in after_download
   self.virt_net_install(profile_data)
  File "app.py", line 1055, in virt_net_install
   virt_auto_boot =  virt_auto_boot
  File "/home/mdehaan/cg/koan/koan/qcreate.py", line 203, in start_install
   guest.start_install()
File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 732, in start_install
   return self._do_install(consolecb, meter, removeOld, wait)
File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 767, in _do_install
   self.domain = self.conn.createLinux(install_xml, 0)
File "/usr/lib/python2.5/site-packages/libvirt.py", line 915, in createLinux if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)

========================

Here's the extended log:

9 16:12:12 koan 31039] DEBUG (DistroManager:152) DistroInstaller location is a local file/path: /opt/images/win2008.iso [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:397) Using self.path for VirtualDisk. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:407) VirtualDisk storage exists. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:271) Detected storage as type 'file' [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:397) Using self.path for VirtualDisk. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:415) VirtualDisk storage does not exist. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:397) Using self.path for VirtualDisk. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:415) VirtualDisk storage does not exist. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:348) Didn't find path '/opt/images/win2008.iso' managed on connection: None [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:397) Using self.path for VirtualDisk. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:407) VirtualDisk storage exists. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:271) Detected storage as type 'file' [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:397) Using self.path for VirtualDisk. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:407) VirtualDisk storage exists. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:271) Detected storage as type 'file' [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:397) Using self.path for VirtualDisk. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:407) VirtualDisk storage exists. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:271) Detected storage as type 'file' [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:397) Using self.path for VirtualDisk. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:407) VirtualDisk storage exists. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:271) Detected storage as type 'file' [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:348) Didn't find path '/opt/images/win2008.iso' managed on connection: None [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:397) Using self.path for VirtualDisk. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:407) VirtualDisk storage exists. [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (VirtualDisk:271) Detected storage as type 'file' [Tue, 31 Mar 2009 16:12:13 koan 31039] DEBUG (Guest:765) Creating guest from '<domain type='kvm'>
 <name>Tue_Mar_31_16_12_12_2009</name>
 <currentMemory>524288</currentMemory>
 <memory>524288</memory>
 <uuid>ada7fd37-949a-7511-e41a-33da4ef6fe14</uuid>
 <os>
   <type>hvm</type>
   <boot dev='cdrom'/>
 </os>
 <features>
   <acpi/><apic/><pae/>
 </features>
 <clock offset="localtime"/>
 <on_poweroff>destroy</on_poweroff>
 <on_reboot>destroy</on_reboot>
 <on_crash>destroy</on_crash>
 <vcpu>1</vcpu>
 <devices>
   <emulator>/usr/bin/qemu-kvm</emulator>
   <console type='pty'/>
   <disk type='file' device='floppy'>
     <source file='/tmp/tmpkmVdz3.floppy'/>
     <target dev='hda' bus='ide'/>
   </disk>
   <disk type='file' device='disk'>
     <source file='/opt/qemu/Tue_Mar_31_16_12_12_2009-disk0'/>
     <target dev='hdb' bus='ide'/>
   </disk>
   <disk type='file' device='disk'>
     <source file='/opt/qemu/Tue_Mar_31_16_12_12_2009-disk0'/>
     <target dev='hdd' bus='ide'/>
   </disk>
   <disk type='file' device='cdrom'>
     <source file='/opt/images/win2008.iso'/>
     <target dev='hdc' bus='ide'/>
     <readonly/>
   </disk>
   <interface type='bridge'>
     <source bridge='xenbr0'/>
     <mac address='00:16:3e:4d:41:8f'/>
   </interface>
   <input type='tablet' bus='usb'/>
   <graphics type='vnc' port='-1' keymap='en-us'/>
 </devices>
</domain>
'

==========================

Here's the code I'm using to add the floppy:

guest.disks.append(virtinst.VirtualDisk(device=virtinst.VirtualDisk.DEVICE_FLOPPY, path=floppy_path))

=============================

Here's what version of everything I have:

[mdehaan@mdehaan koan]$ rpm -q libvirt python-virtinst qemu kvm
libvirt-0.5.1-2.fc10.i386
python-virtinst-0.400.0-5.fc10.noarch
qemu-0.9.1-10.fc10.i386
kvm-74-10.fc10.i386

==============================

Any idea on why it may be trying to call it "hda" ? This is obviously not right for a floppy but when reading "pydoc virtinst.VirtualDisk" I didn't see what
I was missing.

Help would be much appreciated.

Thanks!

--Michael




_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux