[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: installing virtual guest via ssh on console based remote host



Nelson Green <nelsongreen84@hotmail.com> wrote:
> I've got some more progress to report if you'll bear with me. First
> of all, I did install the libvirt-bin and qemu-kvm packages. A bit of
> history as to why I say this has been a nightmare is because the basic
> problem has been a lack of straight-forward documentation, but that
> could be my inability to find it

To be honest it's an absolute nightmare. I forgot until I saw your reply
that I've also needed to perform the following tweaks when using libvirt
in a true client/server model:

EITHER
 1. Carry the libvirt/qemu protocol across an ssh tunnel to the
    server. This requires you to have a login account on the server
 2. Add the user account from #1 to the libvirt group on the server
 3. In the client GUI, create a connection to "nelson@server" (or
    whatever) rather than just to "server"

OR
 4. Edit /etc/libvirt/qemu.conf and /etc/libvirt/libvirtd.conf on the
    server to allow non-local connections to the daemon. Ideally with
    authentication (but this isn't essential if you are on a controlled
    and/or restricted network).
    
I've never found SASL an enjoyable experience, so I would recommend that
you go for the first option. However, you have have a policy dictating
otherwise.


> The first error I got was "Failed to connect socket to
> '/var/run/libvirt/libvirt-sock': No such file or directory"

I think this may be a consequence of omitting #2


> So, I am now installing an OS on my VM. That leaves one final item,
> but this is really low on the priority list. How do I clean up after
> those failed initial attempts?

The nasty but effective way is to shut down the libvirt daemon and delete
the relevant xml files from /etc/libvirtd/qemu/.

Chris


Reply to: