[libvirt] pool-create/pool-create-as should include build pool then start?

Hi all, According to https://bugzilla.redhat.com/show_bug.cgi?id=830056#c5, i think we should talk about this: Description If pool environment is not built, pool-create/pool-create-as will always fail. I think pool-create should build the pool. Version qemu-kvm-0.12.1.2-2.295.el6.x86_64 kernel-2.6.32-276.el6.x86_64 libvirt-0.9.10-21.el6.x86_64 Steps For example: dir pool virsh # pool-create dirpool.xml error: Failed to create pool from dirpool.xml error: cannot open path '/var/lib/libvirt/dir': No such file or directory disk pool virsh # pool-create diskpool.xml error: Failed to create pool from diskpool.xml error: internal error Child process (/usr/libexec/libvirt_parthelper /dev/sdb) status unexpected: exit status 2 fs pool virsh # pool-create fspool.xml error: Failed to create pool from fspool.xml error: internal error Child process (/bin/mount -t ext4 /dev/sda7 /var/lib/libvirt/images/fspool) status unexpected: exit status 32 Steps are the same of other pools

On 06/18/2012 03:12 AM, Zhimou Peng wrote:
Hi all,
According to https://bugzilla.redhat.com/show_bug.cgi?id=830056#c5, i think we should talk about this:
Description If pool environment is not built, pool-create/pool-create-as will always fail. I think pool-create should build the pool.
Version qemu-kvm-0.12.1.2-2.295.el6.x86_64 kernel-2.6.32-276.el6.x86_64 libvirt-0.9.10-21.el6.x86_64
Steps For example: dir pool virsh # pool-create dirpool.xml error: Failed to create pool from dirpool.xml error: cannot open path '/var/lib/libvirt/dir': No such file or directory
What are the contents of dirpool.xml? I think that it might make sense to add a new option to pool-create[-as] to additional build the pool; but I think it needs to be an explicit option rather than the default behavior, so that we don't break back-compat. Maybe: pool-create --build dirpool.xml being what you would use to build as well as start the directory pool mentioned in your xml. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Well, that's my pool xml: https://bugzilla.redhat.com/attachment.cgi?id=590335 https://bugzilla.redhat.com/attachment.cgi?id=590336 https://bugzilla.redhat.com/attachment.cgi?id=590337 Yes, i agree with you, i think we should support option like --build. BR zhpeng ----- Original Message ----- From: "Eric Blake" <eblake@redhat.com> To: "Zhimou Peng" <zhpeng@redhat.com> Cc: libvir-list@redhat.com Sent: Tuesday, June 19, 2012 12:27:20 AM Subject: Re: [libvirt] pool-create/pool-create-as should include build pool then start? On 06/18/2012 03:12 AM, Zhimou Peng wrote:
Hi all,
According to https://bugzilla.redhat.com/show_bug.cgi?id=830056#c5, i think we should talk about this:
Description If pool environment is not built, pool-create/pool-create-as will always fail. I think pool-create should build the pool.
Version qemu-kvm-0.12.1.2-2.295.el6.x86_64 kernel-2.6.32-276.el6.x86_64 libvirt-0.9.10-21.el6.x86_64
Steps For example: dir pool virsh # pool-create dirpool.xml error: Failed to create pool from dirpool.xml error: cannot open path '/var/lib/libvirt/dir': No such file or directory
What are the contents of dirpool.xml? I think that it might make sense to add a new option to pool-create[-as] to additional build the pool; but I think it needs to be an explicit option rather than the default behavior, so that we don't break back-compat. Maybe: pool-create --build dirpool.xml being what you would use to build as well as start the directory pool mentioned in your xml. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Zhimou Peng