[Libguestfs] virt-v2v should add kernel console= to Xen->KVM converted guest's grub.conf
Chuck Anderson
cra at WPI.EDU
Mon Jan 9 19:08:53 UTC 2012
On Mon, Jan 09, 2012 at 09:18:15AM +0000, Matthew Booth wrote:
> On 01/06/2012 11:48 PM, Chuck Anderson wrote:
>> On Thu, Jan 05, 2012 at 07:10:38PM -0500, Chuck Anderson wrote:
>> --- RedHat.pm.orig 2011-12-08 18:09:16.000000000 -0500
>> +++ RedHat.pm 2012-01-06 18:38:33.224309303 -0500
>> @@ -383,6 +383,15 @@
>> }
>> }
>>
>> + # Add console to any kernel line that doesn't have one
>> + foreach my $augpath
>> + ($g->aug_match("/files$grub_conf/title[count(kernel/console) = 0]"))
>> + {
>> + my $console_augpath = "$augpath/kernel/console";
>> + my $console = "ttyS0,115200";
>> + $g->aug_set($console_augpath, $console);
>> + }
>> +
>> eval {
>> $g->aug_save();
>> };
>>
>> Would you consider taking such a patch?
>
> We discussed this on IRC on Friday. I don't think we can be quite this
> simple, because this would be a surprising change for a user
> intentionally using the graphical console on Xen HVM or VMWare. This is
> pretty common (in fact I believe most users do this).
>
> We therefore need to special case a Xen PV guest with no kernel console
> line. This unfortunately won't be as straightforward as this patch
> because there are currently no hooks in V2V to direct particular
> features to be enabled during conversion. I agree that we should be
> doing something like this, though.
We could search for this line in /var/log/dmesg on the guest:
Xen virtual console successfully installed as xvc0
I don't know of any other way to detect the console device in Linux...
More information about the Libguestfs
mailing list