1 |
>> Do you need a virsh command, or is it enough to know libvirt supports? |
2 |
>> In the second case you might look at [1] |
3 |
> |
4 |
> Well, given that I'm on gentoo, USE flags start getting involved in |
5 |
> enabling and disabling functionality. Rather than actively examining |
6 |
> the compile-time factors, I was hoping for a way to simply ask |
7 |
> libvirtd via virsh. Going that route gives me an approach that works |
8 |
> weather I'm on Gentoo, Linux, Debian or whatever. |
9 |
> |
10 |
|
11 |
Good point. Virsh should at least tell you what storage pool support has |
12 |
been enabled while compiling. That would still leave you with another |
13 |
problem: Even if iSCSI or LVM support has been enabled, it doesn't mean |
14 |
you can actually use it on that host (maybe no kernel support, not |
15 |
configured, maybe no disk in node, ...) |
16 |
|
17 |
In virsh there's a find-storage-pool-sources command, sadly there's |
18 |
almost no documentation. On my testing machine it is at least able to |
19 |
discover the LVM. |
20 |
|
21 |
virsh # find-storage-pool-sources logical |
22 |
<sources> |
23 |
<source> |
24 |
<device path='/dev/sdb6'/> |
25 |
<name>kvm1</name> |
26 |
<format type='lvm2'/> |
27 |
</source> |
28 |
</sources> |
29 |
|
30 |
>> You also might take a look at virt-manager (in portage) which is a gui |
31 |
>> for libvirt that manages libvirt on your local machine an remote |
32 |
>> machines (via ssh tunnel for example). |
33 |
> |
34 |
> I've played with virt-manager before. I could use it again, but at |
35 |
> least part of this exercise is to learn libvirt and kvm using a |
36 |
> spartan toolchain. So I'm trying to do everything I can via CLI. (I'm |
37 |
> handy enough with Python that I could use the python API bindings, but |
38 |
> I presumed virsh would be easier, if not simpler.) |
39 |
|
40 |
Yeah, I was a hardcore kvm user once too :) No libvirt installed, just |
41 |
pure kvm, did everything on cli, creating images, setting up the virtual |
42 |
network, starting kvm vms by hand with a big-ass argument list, ... I |
43 |
guess I just got lazy :) |
44 |
|
45 |
>> I am really happy with virt-manager here, it work very well on you don't |
46 |
>> need to remember all the virsh commands (which becomes pretty handy when |
47 |
>> managing storage, virtual networks and creating vms) |
48 |
> |
49 |
> Yeah, I'm hoping to learn all those commands. I want to |
50 |
> proof-of-concept an approach for a high-availability NFS server using |
51 |
> VMs.[2] :) |
52 |
|
53 |
Sounds interesting, I'll bookmark that. |