Hello, I just put a second disk in my computer that I want to use as a storage pool for virtual machines. I followed the instructions to do so here: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/chap-Virtualization_Administration_Guide-Storage_Pools-Storage_Pools.html#idp30482576 and successfully made it through the first 3 steps. When I try to start the storage pool, though it gives me the errors:
error: Failed to start pool sdb
error: operation failed: Error checking for disk label, failed to get disk partition information
If I try to start the pool through virt-manager, it gives me the more elaborate:
Error starting pool ‘sdb’: operation failed: Error checking for disk label, failed to get disk partition information
Traceback (most recent call last):
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 88, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 124, in tmpcb
callback(*args, **kwargs)
File “/usr/share/virt-manager/virtManager/libvirtobject.py”, line 83, in newfn
ret = fn(self, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/storagepool.py”, line 164, in start
self._backend.create(0)
File “/usr/lib64/python2.7/site-packages/libvirt.py”, line 3315, in create
if ret == -1: raise libvirtError (‘virStoragePoolCreate() failed’, pool=self)
libvirtError: operation failed: Error checking for disk label, failed to get disk partition information
The system definitely sees the second disk, there is an sdb when I run lsblk. I couldn’t find anything useful when I put the error into google, so now I’m asking here. Thanks in advance for any help, I really hope to get this working.
Update: on a lark, I decided to plug a USB drive into the machine and add that as a disk to virt-manager, but got the same error, at which point I tried to add my main disk and got the same result. The problem isn’t with that specific disk, virt-manager isn’t seeing any of the disks on the computer.
I’m… pretty sure that’s not true? on my fedora laptop I’ve configured the internal disk as a storage pool, and it uses the space I left unformatted after the installation for VM images. screenshot: https://goo.gl/zgkQjA
I tired to replicate that setup on the current machine as well, but got the above errors again.
Well,
You <can> be right although I’ve never personally configured that way because IMO it’s wasteful to assign raw block storage.
Perhaps more to the point, most virtualization technologies do offer an option to point directly to a partition instead of creating a backing file that needs to be mounted for the VM’s “disk” but in all cases comes with warnings and usually hidden as a non-default way to set up a new machine.
If you want to support sparse files, and multiple pools and guest machines on a storage volume, it stands to reason that files can only be stored on a file system… Although maybe someone might point out something that could prove my thinking wrong.
In other words,
I can’t think of any good reason <not> to have a formatted file system to hold files unless maybe for a very specialized scenario it’s deemed not needed.
It’s something to keep in mind which <can> be done for special purpose but is not something to be done as Standard Operating Procedure.
If done correctly, the difference is almost impossible to detect.
And, if you’re using sparse files and your disk files are unfragmented you may even experience a very noticeable improvement in performance.
But,
In very few words,
The virtual disk blocks should line up exactly on top of physical disk blocks.
When that happens, then there is a direct translation through the I/O virtualization layer so there isn’t any significant difference compared to accessing the physical blocks directly.
Problems typically happen only when people manually dig into disk block offsets, or move between Windows and *NIX storage.
What is the best way to do this correctly? I’ve read the page you linked to, and the takeaway i managed to glean from it is ‘don’t move windows VM’s between machines.’ Beyond that, I know that BTRFS is a terrible filesystem for storing vm images, but I don’t know what a good filesystem would be, and I do plan to clone VM’s on the same machine which I don’t know if that would be a problem.
If you just create your Guests using libvirt (or the kvm or qemu commands), it should all be done correctly and automatically… No need to concern yourself with what’s happening at lower layers.
I haven’t looked closely at all the issues about BTRFS, but it’s probably not a good idea to be snapshotting your Guest storage using the default schedule (again, there is always an exception to any general rule). Besides, if you store multiple Guests in the partition, you probably wouldn’t ever want to roll back all of them to restore something in one.
Thanks for the help, I’ve made an ext4 partition and put the VM’s on it for now. however, going back to the original problem I still cant add any disk storage pool to virt-manager, which i have accomplished repeatedly on other distributions. Is this just something opensuse will not do, or what?
I have no experience with other distros, so I don’t know what is done on something that’s not openSUSE.
I also don’t know how much sense it would make to configure a “pool” as unformatted, free space and how that would affect using that space, because at some point you have to format and optionally further partition that space to use it.
Although I haven’t tried it,
I would expect that you could simply add a new virtual disk in your existing Guest’s properties, and configure that new disk to point to a partition.
The question then would be if the Guest would see the virtual disk’s disk as free space which could be formatted from within the Guest.
In other words, I doubt that it should be necessary to configure a storage pool which is what you have been trying to do.