I have been coming closer to what I want (at least for the installation process) using
this now
sudo virt-install --name=my_domain --ram=512 --vcpus=1 \
--location=/path/to/ubuntu-16.04.1-server-amd64.iso \
--disk /path/to/vm.qcow2,device=disk,bus=virtio,size=32 \
--network bridge:br0 \
--os-type=linux \
--nographics \
--extra-args='console=tty0 console=ttyS0,115200n8 serial'
I get a console view of the VM in the hosts console and can attend and guide the
installation process as hoped for. I guess --extra-args='console=tty0
console=ttyS0,115200n8 serial' is what enables this. This seems not to be persisting
though.
After the post-installation's reboot I am at the beginning again
Connected to domain ubn1604
Escape character is ^]
and the '--extra-args' are not supported by 'virsh console'
so, is there any way to get the 'console=tty0 console=ttyS0,115200n8 serial' up
again after a reboot?
I tried
virsh console --devname 'console=tty0 console=ttyS0,115200n8 serial' [my_domain]
On September 1, 2016 at 1:31 PM Martin Kletzander
<mkletzan(a)redhat.com> wrote:
On Thu, Sep 01, 2016 at 10:11:38AM +0800, vrms(a)netcologne.de wrote:
> wanted to follow up on that part (thanks about all comment suggestion regarding
virt-viewer and vcn, etc. I will test them as well but would prefer the 'console
way' if possible
>
> On August 29, 2016 at 2:44 PM Martin Kletzander <mkletzan(a)redhat.com> wrote:
>
> > * When you are connected you don't see anything because the VM
doesn't
> > have console properly set up, I'd guess.
>
> the xml file of my machines (all of them actually) have the below in the
'console' section.
>
> ...
>
>
>
> ...
>
> Is it this has to be adjusted in order to 'properly set up the console' ?
> any pointers what to put here? tried 'bash' for 'type' but that
didn't work
>
> best ...Gunnar
This is fine, there is no need to do anything here. As I said, the only
thing you need to do is convince the guest kernel to use that ttyS0 as a
console (by appending console=ttyS0 as a kernel cmdline parameter).
Details on how to do that are explained in my previous mail.
Also, there is no need to guess parts of the configuration, we have a
documentation for the XML [1], as well as bunch of other things [2] and
working man pages.
Martin
[1]
https://libvirt.org/formatdomain.html
[2]
https://libvirt.org/docs.html