vrms at netcologne.de
2016-Sep-01 02:11 UTC
[libvirt-users] installing and accessing a VM? - newbie question maybe
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 at 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. ? ? ... ? ? <console type='pty'> ? ? ? <target type='serial' port='0'/> ? ? </console> ? ? ... 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 thanks & best> On August 29, 2016 at 2:44 PM Martin Kletzander <mkletzan at redhat.com> wrote: > > Please don't use HTML messages for the list, or at least configure your > MUA to send both plaintext and HTML messages. > > So, here are some pointers: > > * When you are connected you don't see anything because the VM doesn't > have console properly set up, I'd guess. > > * The string "^]" means "Hold Ctrl and press ]", that's the usual > escape character, for more info why it's done this way, you can read > a bit about terminals if you're interested. > > * The command "virsh connect something vm_name" means run virsh, and in > it execute command "connect something vm_name", but 'connect' means > connecting to the daemon (or a driver) and takes one argument, so the > 'vm_name' there doesn't make sense. You could do virsh console > vm_name, but that's essentially what virt-install did at the end of > the installation. > > * You might try using virt-manager instead if you're not familiar with > the terminal (I'm guessing that by the fact that it doesn't look like > you tried reading the man pages). virt-manager is able to do > everything virt-install does and it also offers graphics console and > other options. For you the benefit would be that it is GUI. > > * Or if you just want to see the guest, virt-viewer is a lightweight > viewer that does not have any options to configure the vm, but you > can use it for accessing the graphics displays. > > Hope that helped, have a nice day. > > Martin
Martin Kletzander
2016-Sep-01 05:31 UTC
[libvirt-users] installing and accessing a VM? - newbie question maybe
On Thu, Sep 01, 2016 at 10:11:38AM +0800, vrms at 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 at 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. > >? ? ... >? ? <console type='pty'> >? ? ? <target type='serial' port='0'/> >? ? </console> >? ? ... > >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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: Digital signature URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20160901/4868ecd2/attachment.sig>
vrms@netcologne.de
2016-Sep-05 05:54 UTC
Re: [libvirt-users] installing and accessing a VM? - newbie question maybe
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@redhat.com> wrote: > > On Thu, Sep 01, 2016 at 10:11:38AM +0800, vrms@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@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
vrms@netcologne.de
2016-Sep-05 05:59 UTC
Re: [libvirt-users] installing and accessing a VM? - newbie question maybe
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? --devname sounds promising but: virsh console --devname 'console=tty0 console=ttyS0,115200n8 serial' [my_domain] only gets me internal error: cannot find character device console=tty0 console=ttyS0,115200n8 serial (same with variations of the above)> On September 1, 2016 at 1:31 PM Martin Kletzander <mkletzan@redhat.com> wrote: > > On Thu, Sep 01, 2016 at 10:11:38AM +0800, vrms@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@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