[xen-tools-dev] xen-create-image: allow xvc0 in --serial_device option.
Jorge Armando Medina
jmedina at e-compugraf.com
Tue Sep 21 04:25:55 CEST 2010
On 09/20/2010 12:23 PM, Dmitry Nedospasov wrote:
> Hello Jorge,
Hi everyone,
>
> On Mon, Sep 20, 2010 at 11:43:36AM -0500, Jorge Armando Medina wrote:
>> Hi there,
>> 1. hvc0 is the default hardcoded in /usr/bin/xen-create-image, I think
>> it is better to default it in xen-tools.conf.
>
> The reason for this is actually that hvc0 is the recommended setting for
> xen, and it should be the default for all "newer" domUs. Xen
> unfortunately used several "default" serial devices before ariving at
> today's hvc0.
You are right about hvc0 and newer versions, I still have a few servers
with with ubuntu 8.04 (LTS), both dom0 and domu, with xen 3.2 from
packages or xen 3.4 from source and linux-image-2.6.24-28-xen, and I
would like to use a recent version of xen-tools that allows me to set
default parameters like this:
dist = hardy
arch = amd64
serial_device = xvc0
and be able to use xen-create-image --dist=lenny --serial_device=hvc0
--pygrub ...
Or the oposite for my customers with lenny as dom0 and domU:
dist = lenny
arch = amd64
serial_device = hvc0
and be able to use xen-create-image --dist=hardy --serial_device=xvc0
--pygrub ...
My point is that, most people I asked is that we prefer to set the
serial_device default parameter in the the global configuration file (as
stated in xen-create-image(8)) /etc/xen-tools/xen-tools.conf
insted that modifying /usr/bin/xen-create-image and changing the line:
$CONFIG{ 'serial_device' } = 'hvc0';
I think that the change involves uncommenting the line:
# serial_device = hvc0 #default
in xen-tools.conf
and change xen-create-image to:
$CONFIG{ 'serial_device' } = '';
And also the help:
--serial_device=serialname
Install a getty on the specified serial device instead
of the default device.
To:
--serial_device=serialname
Install a getty on the specified serial device instead
of the default device, the default value hvc0.
We already have instructions about defining/changing default values in
the global configuration file xen-tools.
>
>> I change it to
>>
>> serialDev => {
>> check => qr/^(?:\/dev\/)?(?:tty|[xh]vc)[0-9]+$/,
>> message => "must be a serial device (tty*, hvc* or xvc*).\n",
>> },
>
> Looks simple enough.
>
>> Another note, probably would be good to have this same validation for
>> xen-tools.conf, because it accepts what ever value you use.
>
> Will have to investigate, but this is an interesting point that i forgot
> to test :P AFAIK the options will still get parsed and checked though.
>
>> Best regards and I hope you can include this simple fix because xvc0 is
>> used in a few hooks.
>
> Okay agreed, though I'm not entirely sure that we shouldn't just use
> hvc0 and remove xvc0 from the scripts. If you have legacy vms that you
> are importing, it is still possible to set them via .cfg file. Again,
> new machines *SHOULD NOT* use anything other than hvc0 acording to the
> xen documentation.
Yes, but editing the .cfg file will remove the flexibility described
above for new and legacy versions.
Another point, not me but I know people that use xen-tools in centos 5
with xen 3.1 and 2.6.18 kernels, they will benefit from this change :).
Best regards.
>
> Thanks,
>
> D.
--
Compugraf
More information about the xen-tools-dev
mailing list