305-300 · Question #16
The command virsh vol-list vms returns the following error: error: failed to get pool 'vms' error: Storage pool not found: no storage pool with matching name 'vms ' Given that the directory /vms…
The correct answer is D. virsh pool-create-as vms dir --target /vms. The command virsh pool-create-as vms dir --target /vms creates and starts a transient storage pool named vms of type dir with the target directory /vms. This command resolves the issue of the storage pool not found error, as it makes the existing directory /vms visible to…
Question
Options
- Add if=/dev/zero of=/vms bs=1 count=0 flags=name:vms
- Blibvirt-poolctl new ?name=/vms ?type=dir ?path=/vms
- Cqemu-img pool vms:/vms
- Dvirsh pool-create-as vms dir --target /vms
- Etouch /vms/.libvirtpool
How the community answered
(27 responses)- B4% (1)
- C7% (2)
- D74% (20)
- E15% (4)
Explanation
The command virsh pool-create-as vms dir --target /vms creates and starts a transient storage pool named vms of type dir with the target directory /vms. This command resolves the issue of the storage pool not found error, as it makes the existing directory /vms visible to libvirt as a storage pool. The other commands are invalid because: dd if=/dev/zero of=/vms bs=1 count=0 flags=name:vms is not a valid command syntax. The dd command does not take a flags argument, and the output file /vms should be a regular file, not a libvirt-poolctl new --name=/vms --type=dir --path=/vms is not a valid command name. There is no such command as libvirt-poolctl in the libvirt package. qemu-img pool vms:/vms is not a valid command syntax. The qemu-img command does not have a pool subcommand, and the vms:/vms argument is not a valid image specification. touch /vms/.libvirtpool is not a valid command to create a storage pool. The touch command only creates an empty file, and the .libvirtpool file is not recognized by libvirt as a storage pool configuration file.
Topics
Community Discussion
No community discussion yet for this question.