4

I'm having an issue with viewing output from a virtual machine installed via virt-install.

I first used this method, but it left me with the following immediately after running:

Starting install...
Connected to domain ApacheServer
Escape character is ^]

It sits here forever and no input is accepted into the terminal at this point. After some googling around the web, I ended up destroying/deleting my guest, and starting over with the install, but this time, I had added --console pty,target_type=serial to the arguments being passed to virt-install. For some clarity, below is the complete install command I used last:

virt-install \
-n ApacheServer \
--description "CENTOS7 for Apache Server" \
--os-type=Linux \
--os-variant=rhel6 \
--ram=2048 \
--vcpus=1 \
--disk path=/var/lib/libvirt/images/CentOS7-Apache.img,bus=virtio,size=10 \
--graphics none \
--console pty,target_type=serial \
--cdrom /home/server/Downloads/CentOS-7-x86_64-Minimal-1810.iso \
--network bridge:virbr0

This doesn't change anything for me. I am still stuck at Escape character is ^] after the install. I even closed this console window out, and tried to get into the guest via $ virsh console ApacheServer. This leaves me with:

Connected to domain ApacheServer
Escape character is ^]
error: operation failed: Active console session exists for this domain

My current expectation is that after the install, or after issuing the virsh console <domain name> command, I should see the console/terminal output that the guest is putting out.

2
  • I see the down vote here, but without any sort of critique, I'm not sure what to make of that, or how to change my question to be better. I posted my issue, the expected output, the actual output, and what I've done to get this far. I'm open to hearing about how I can make my question better. Commented Feb 23, 2019 at 21:26
  • 2
    Some people are just hard to please. Commented Mar 25, 2019 at 4:41

1 Answer 1

6

So, it turns out that specifying your boot device with --cdrom /path/to/bootmedia.iso can be problematic when it comes to viewing output during boot up. Trying to install again, I noticed this warning pop up before the Starting install... text:

WARNING CDROM media does not print to the text console by default, so you likely will not see text install output. You might want to use --location. See the man page for examples of using --location with CDROM media

I searched for this warning and found suggestions for adding the following to the virt-install args: --location /path/to/bootmedia.iso en lieu of --cdrom and --extra-args console=ttyS0.

After making these two changes, everything worked. The complete working install command is as follows:

virt-install \
-n ApacheServer \
--description "CENTOS7 for Apache Server" \
--os-type=Linux \
--os-variant=rhel6 \
--ram=2048 \
--vcpus=1 \
--disk path=/var/lib/libvirt/images/CentOS7-Apache.img,bus=virtio,size=10 \
--graphics none \
--console pty,target_type=serial \
--location /home/server/Downloads/CentOS-7-x86_64-Minimal-1810.iso \
--network bridge:virbr0 \
--extra-args console=ttyS0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .