On Mon, Aug 29, 2016 at 07:29:36AM +0000, Dominique Ramaekers wrote:
...
>
> virt-viewer again ... I am on a GUI less server, so that's not a option. I think
> setting up the console is the thing one needs to figure out.
>
...
I also have 'GUI-less' servers. You can use tightvncserver to get a graphical
desktop trough vnc. Like that, I can login to my servers from any client from my lasy seat
;) Don't forget to install a window-manager of your choice...
Having a Gui to use virt-manager is, according to me, no excess luxury for
non-harcore-terminal-administrators...
Well, you don't need to have the GUI on that server, but you can use
virt-manager anyway (and anything that uses libvirt, really). You just
need to setup connection to the remote libvirtd instance. For example
if you use ssh, it could be s simple as
qemu+ssh://root@that_server/system, in virt-manager you can set it up as
connection, for virsh and virt-viewer you can use it as an argument to
-c parameter, and so on.
If you're still craving that pure-terminal pleasure, though, you just
need to setup serial console in the guest. I don't think you need to
setup anything in libvirt for the VM, because otherwise 'virsh start
--console' wouldn't work then. Quick "ubuntu serial console" [1] shows
what looks like chicken and egg problem. The thing you need to do is
make sure the console is used by the installation process. It is
usually done automatically by most distros, but it looks like ubuntu
doesn't do that. I have no idea how the installation process can be
configured on ubuntu, my guess is just that it won't be there merely due
to the target audience of the distribution. Again, as Google is your
friend, even with bad words used for the search, some old guide [2] is
still around fourth result. And that's something virt-install can do
for you as well, just open the manual and look for "location allows
things like --extra-args". To try it out, I had to run it with DISPLAY=
nad --graphics none so that it does what you wanted, of course you
can/should remove those options. But this works for me:
DISPLAY= virt-install --os-variant ubuntu16.04 -n ubuntu --memory 4096 -l \
http://mirror.vutbr.cz/ubuntu/archive/dists/yakkety/main/installer-amd64/ \
--disk none --extra-args console=ttyS0 --graphics none
Just so you know, you can use libvirt as a non-root user as well
(without sudo) if configured properly. And you might need it if trying
to remotely connect to the daemon. Here are some links that might help
(at least to start):
http://wiki.libvirt.org/page/SSHSetup
http://wiki.libvirt.org/page/SSHPolicyKitSetup
https://libvirt.org/remote.html
Have a nice day,
Martin
[1]
https://help.ubuntu.com/community/SerialConsoleHowto
[2]
http://www.fantaghost.com/ubuntu-server-10-10-headless-installation-via-s...