3.1.3 (and ??) timer_mode fix in xend for virt-install
PATCH 1/1 3.1.3 (and ??) timer_mode fix in xend for virt-install
We have found that virt-install fails to create a domain with 3.1-testing since the timer_mode patches went in.
This patch allows virt-install to run properly again.
Please apply prior to 3.1.3 release. Though untested, it appears from source examination that the patch is also required on 3.2 and -unstable.
Dan
tools/python/xen/xend/XendConfig.py +1 -0
@@ -319,6 +319,7 @@ 'shadow_memory': 0, 'memory_static_max': 0, 'memory_dynamic_max': 0, + 'timer_mode': 0, 'devices': {}, 'security': None, 'on_xend_start': 'ignore',
tools/python/xen/xend/XendDomainInfo.py +1 -1
@@ -1542,7 +1542,7 @@ # Set timer configration of domain if hvm: xc.hvm_set_param(self.domid, HVM_PARAM_TIMER_MODE, - long(self.info["platform"].get("timer_mode"))) + long(self.info['timer_mode'])) # Set maximum number of vcpus in domain xc.domain_max_vcpus(self.domid, int(self.info['VCPUs_max']))
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
What¹s virt-install? I¹ve been able to create domains no problem.
-- Keir
Quoted 8 lines · Dan Magenheimer
We have found that virt-install fails to create a domain with 3.1-testing since the
timer_modepatches went in.This patch allows virt-install to run properly again.
Please apply prior to 3.1.3 release. Though untested, it appears from source examination that the patch is also required on 3.2 and -unstable.
Quoted 8 lines
Dan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Re: [Xen-devel] [PATCH] 3.1.3 (and ??) timer_mode fix in xend for virt-installvirt-install is a tool on the Red Hat distribution and on Oracle VM that uses virtlib and primarily through a management gui. I'm no expert but it uses the XendServer
interface, which probably results in a slightly different sequence of calls when
creating a domain.
Without the (small) patch, virt-install fails whenever trying to create an hvm domain.
Perhaps Daniel or someone at RedHat can confirm?
Thanks,
Dan
-----Original Message-----
From: Keir Fraser [mailto:[email protected]]
Sent: Friday, January 18, 2008 2:29 PM
To: [email protected]; [email protected]
Subject: Re: [Xen-devel] [PATCH] 3.1.3 (and ??) timer_mode fix in xend for virt-install
What's virt-install? I've been able to create domains no problem.
-- Keir
On 18/1/08 21:22, "Dan Magenheimer" <[email protected]> wrote:
We have found that virt-install fails to create a domain with 3.1-testing since the timer_mode patches went in.
This patch allows virt-install to run properly again.
Please apply prior to 3.1.3 release. Though untested, it appears from source examination that the patch is also required on 3.2 and -unstable.
Dan
----------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 8 lines · Dan Magenheimer
virt-install is a tool on the Red Hat distribution and on Oracle VM that uses virtlib and primarily through a management gui. I'm no expert but it uses the XendServer interface, which probably results in a slightly different sequence of calls when creating a domain.
Without the (small) patch, virt-install fails whenever trying to create an hvm domain.
Perhaps Daniel or someone at RedHat can confirm?
I've not seen any problems on Xen 3.2 release with creating domains, but have not had any time to test the 3.1-testing tree since the 3.1.2 release came out so can't confirm that yet. I'll try and reproduce it - what error were you getting when trying to create a VM ? libvirt doesn't specify any timer_mode parameter when creating VMs, so it should use whatever XenD's default is for that.
Dan.
Signature · 4 lines
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
Quoted 6 lines · Daniel P. Berrange
I've not seen any problems on Xen 3.2 release with creating domains, but have not had any time to test the 3.1-testing tree since the 3.1.2 release came out so can't confirm that yet. I'll try and reproduce it - what error were you getting
when trying to create a VM ? libvirt doesn't specify anytimer_modeparameter when creating VMs, so it should use whatever XenD's default is for that.
In Dan's patch, I don't know about the change to XendConfig.py, but the change from ['platform'].get('timer_mode') to ['timer_mode'] doesn't look very likely. All other HVM config parameters handed down from xm create end up in the 'platform' dict.
Is the change to XendConfig.py to specify a default for timer_mode actually ending up putting that default value in the wrong place: in the vmconfig as a first-class entry in its own right, rather than as a sub-key of 'platform'?
If the problem is lack of a default value for timer_mode in some cases, I'd rather fix XendDomainInfo.py to handle non-existent timer_mode key.
-- Keir
Quoted 6 lines
so can't confirm that yet. I'll try and reproduce it - what error were you getting
when trying to create a VM ? libvirt doesn't specify anytimer_modeparameter
when creating VMs, so it should use whatever XenD's default is for that.
Traceback below.
Yeah, I'm no parseltongue but I think the default wasn't specified properly.
Note also that I am using python-virtinst-0.99 so maybe the interface to the XendServer has changed in more recent releases and wouldn't provoke the problem?
Dan
Starting install...
libvir: Xen Daemon error : GET operation failed:
libvir: Xen Daemon error : POST operation failed: (xend.err 'Error creating doma
in: long() argument must be a string or a number')
Failed to create domain foo
Traceback (most recent call last):
File "/usr/sbin/virt-install", line 476, in ?
main()
File "/usr/sbin/virt-install", line 440, in main
dom = guest.start_install(conscb)
File "/usr/lib/python2.4/site-packages/virtinst/XenGuest.py", line 382, in start_install
self.domain = self.conn.createLinux(cxml, 0)
File "/usr/lib/python2.4/site-packages/libvirt.py", line 249, in createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed')
libvirt.libvirtError: virDomainCreateLinux() failed
Quoted 8 lines · Dan Magenheimer
Traceback below.
Yeah, I'm no parseltongue but I think the default wasn't specified properly.
Note also that I am using python-virtinst-0.99 so maybe the interface to the XendServer has changed in more recent releases and wouldn't provoke the problem?
Yes. I'll commit a fix for it.
-- Keir
Quoted 16 lines · Dan Magenheimer
Quoted 6 lines
so can't confirm that yet. I'll try and reproduce it - what error were you getting
when trying to create a VM ? libvirt doesn't specify anytimer_modeparameter
when creating VMs, so it should use whatever XenD's default is for that.Traceback below.
Yeah, I'm no parseltongue but I think the default wasn't specified properly.
Note also that I am using python-virtinst-0.99 so maybe the interface to the XendServer has changed in more recent releases and wouldn't provoke the problem?
Quoted 7 lines
Dan
Starting install...
libvir: Xen Daemon error : GET operation failed:
libvir: Xen Daemon error : POST operation failed: (xend.err 'Error creating doma
in:long()argument must be a string or a number')
Ok this is useful. I'd say that message comes from this:
xc.hvm_set_param(self.domid, HVM_PARAM_TIMER_MODE,
long(self.info["platform"].get("timer_mode")))And that 'self.info["platform"].get("timer_mode")' is returning None, causing the long() cal to fail.
So either we need to make sure that 'platform' gets a default value set for 'timer_mode', or make the hvm_set_param() call conditional like
if self.info["platform"].get("timer_mode") is not None:
xc.hvm_set_param(self.domid, HVM_PARAM_TIMER_MODE,
long(self.info["platform"].get("timer_mode")))I assume the Hypervisor itself already has a default timemode value, so making this set_param conditional is probably easiest.
Dan.
Signature · 4 lines
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
Quoted 10 lines
So either we need to make sure that 'platform' gets a default value set for '
timer_mode', or make thehvm_set_param()call conditional likeif self.info["platform"].get("timer_mode") is not None:
xc.hvm_set_param(self.domid, HVM_PARAM_TIMER_MODE, long(self.info["platform"].get("timer_mode")))I assume the Hypervisor itself already has a default timemode value, so making this
set_paramconditional is probably easiest.
Yes, this is much nicer.
Thanks,
Dan
Quoted 8 lines · Daniel P. Berrange
Quoted 7 lines · Dan Magenheimer
virt-install is a tool on the Red Hat distribution and on Oracle VM that uses virtlib and primarily through a management gui. I'm no expert but it uses the XendServer interface, which probably results in a slightly different sequence of calls when creating a domain.
Without the (small) patch, virt-install fails whenever trying to create an hvm domain.
Quoted 7 lines
Quoted 1 line
Perhaps Daniel or someone at RedHat can confirm?
I've not seen any problems on Xen 3.2 release with creating domains, but have not had any time to test the 3.1-testing tree since the 3.1.2 release came out so can't confirm that yet. I'll try and reproduce it - what error were you getting when trying to create a VM ? libvirt doesn't specify any
timer_modeparameter when creating VMs, so it should use whatever XenD's default is for that.
Just re-tested and I can confirm the problem *does* impact Xen 3.2 as well.
Dan
Signature · 4 lines
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|