[et-mgmt-tools] [PATCH] HVM 3rd disk name don't use "hdc"
Tatsuro Enokura
fj7716hz at aa.jp.fujitsu.com
Thu Mar 22 11:23:41 UTC 2007
Hi
I try that making the HVM domain with 3+ disks by the virt-install command,
but the command says following error message:
# virt-install --name=HVM_3DISKS --file=/dev/sda6 --file=/dev/sda7 \
--file=/dev/sda8 --hvm --vnc --ram=376 --cdrom=/dev/cdrom
libvir: Xen Daemon error : POST operation failed: (xend.err 'Error
creating domain: Device hdc (5632, vbd) is already connected.')
Traceback (most recent call last):
File "/usr/bin/virt-install", line 584, in <module>
main()
File "/usr/bin/virt-install", line 544, in main
dom = guest.start_install(conscb,progresscb)
File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 626,
in start_install
return self._do_install(consolecb, meter)
File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 643,
in _do_install
self.domain = self.conn.createLinux(install_xml, 0)
File "/usr/lib/python2.5/site-packages/libvirt.py", line 429, in
createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed',
conn=self)
libvirt.libvirtError: virDomainCreateLinux() failed POST operation
failed: (xend.err 'Error creating domain: Device hdc (5632, vbd) is
already connected.')
I think that the 3rd disk's name "hdc" is conflicted CDROM device name.
I make the patch resolve this issue.
Signed-off-by: Tatsuro Enokura <fj7716hz at aa.jp.fujitsu.com>
Thanks,
Tatsuro Enokura
------------------------------------------------------------
diff -r aec5777422c0 virtinst/Guest.py
--- a/virtinst/Guest.py Wed Mar 21 13:46:29 2007 -0400
+++ b/virtinst/Guest.py Thu Mar 22 15:34:06 2007 +0900
@@ -552,8 +552,12 @@ class Guest(object):
if d.transient and not install:
continue
if d.device == VirtualDisk.DEVICE_CDROM and count != 2:
- count = 2
- disknode = "%(disknode)s%(dev)c" % { "disknode":
self.disknode, "dev": ord('a') + count }
+ disknode = "%(disknode)s%(dev)c" % { "disknode":
self.disknode, "dev": ord('a') + 2 }
+ elif d.device != VirtualDisk.DEVICE_CDROM and self.disknode
== "hd" and count == 2:
+ count += 1
+ disknode = "%(disknode)s%(dev)c" % { "disknode":
self.disknode, "dev": ord('a') + count }
+ else:
+ disknode = "%(disknode)s%(dev)c" % { "disknode":
self.disknode, "dev": ord('a') + count }
ret += d.get_xml_config(disknode)
count += 1
return ret
------------------------------------------------------------
More information about the et-mgmt-tools
mailing list