Neil Aggarwal's picture

I would like to capture the output of the installer to a file.

I use virt-install to install an appliance on my server.  According to the man page:

 --nographics
   No graphical console will be allocated for the guest. Fully virtualized 
   guests will need to have a text console configured on the first serial 
   port in the guest (this can be done via the --extra-args option)

I tried this command:

virt-install -n v1092 -r 512 --vcpus=1 --check-cpu --os-type=linux --os-variant=ubuntuhardy 
-v --accelerate -c /tmp/turnkey-lamp-2009.10-hardy-x86.iso 
-f /var/lib/libvirt/images/v1092.img -s 15 -b br0 --nographics -x "console ttyS0"

I get this output:

Starting install...
Creating domain... 

Connected to domain v1092
Escape character is ^]

And then it just sits there doing nothing.

Any ideas on how I can do this?

Thanks,
  Neil

Forum: 
Liraz Siri's picture

I feel I'm probably not understanding what you are trying to do. I've used KVM before in my testing but not via libvirt. As you probably realize the ISO installation is interactive so how do you complete installation if you disable the console?

If you're trying to automate installation you might want to try a different direction such wrapping around tklpatch to extract the filesystem from the ISO and then applying changes as required.

Neil Aggarwal's picture

I am not trying to disable the console, just tell it to use text mode instead of graphical mode and to interact on ttyS0.

Is that possible?

Liraz Siri's picture

I'm guessing you are trying to figure out how to let your users go through the installation process themselves. If you can make it work that would be pretty neat!

A couple of tips:

  1. Use qemu directly while you are experimenting. It's more low level than libvirt which may be making some options harder to access.
  2. I think gfxboot may be getting in your way though if the virtual serial console you are connecting doesn't support that graphics mode. Perhaps you should try tweaking the bootloader's configuration parameters to try and make it use text mode. Look in cdroot/isolinux/isolinux.cfg.
Neil Aggarwal's picture

I think you are correct that gfxboot interferes with what I am doing.  I will investigate how to edit the bootloader config to tell it to use a text console.  Thanks for the pointer.

Regarding what I am doing, I am playing around with a few ideas.  If I can figure out how to get a working serial console, I am pretty sure something like ShellInABox can connect to it.  Lets see where this investigation goes, you never know what you end up with when you start!

Add new comment