Hello community, here is the log from the commit of package vm-install for openSUSE:Factory checked in at 2012-03-06 13:41:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vm-install (Old) and /work/SRC/openSUSE:Factory/.vm-install.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "vm-install", Maintainer is "CARNOLD@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/vm-install/vm-install.changes 2012-02-16 15:03:21.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.vm-install.new/vm-install.changes 2012-03-06 13:42:13.000000000 +0100 @@ -1,0 +2,17 @@ +Wed Feb 29 10:15:34 MST 2012 - carnold@novell.com + +- KVM: Add 'unsafe' and 'directsync' as options to cache_mode + During installation set the target disk to 'unsafe' for + better performance. + +------------------------------------------------------------------- +Tue Feb 28 14:19:33 MST 2012 - carnold@novell.com + +- bnc#725378 - vm-install requires tftp and so conflicts with atftp + Add support for using atftp in place of tftp +- Catch unconfigured bridge error in VMPXE getServAddr. +- PV PXE booting requires kdumptool (kdump package) so add + dependency to spec file. +- Update version to 0.6.0 + +------------------------------------------------------------------- Old: ---- vm-install-0.5.7.tar.bz2 New: ---- vm-install-0.6.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vm-install.spec ++++++ --- /var/tmp/diff_new_pack.oPYckG/_old 2012-03-06 13:42:15.000000000 +0100 +++ /var/tmp/diff_new_pack.oPYckG/_new 2012-03-06 13:42:15.000000000 +0100 @@ -15,22 +15,21 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - Name: vm-install Url: http://developer.novell.com/wiki/index.php/Vm-install BuildRequires: python-devel BuildRequires: update-desktop-files # For directory ownership: BuildRequires: yast2 -Version: 0.5.7 +Version: 0.6.1 Release: 0 Summary: Tool to Define a Virtual Machine and Install Its Operating System License: GPL-2.0 Group: System/Emulators/PC -Source0: %{name}-0.5.7.tar.bz2 +Source0: %{name}-0.6.1.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: %ix86 x86_64 -Requires: libvirt python-urlgrabber libxml2-python libvirt-python virt-utils udhcp tftp +Requires: libvirt python-urlgrabber libxml2-python libvirt-python virt-utils udhcp kdump %define pysite %(python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib()") Recommends: python-gtk ++++++ vm-install-0.5.7.tar.bz2 -> vm-install-0.6.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.5.7/Makefile new/vm-install-0.6.1/Makefile --- old/vm-install-0.5.7/Makefile 2012-01-14 00:04:02.000000000 +0100 +++ new/vm-install-0.6.1/Makefile 2012-02-29 18:15:11.000000000 +0100 @@ -1,5 +1,5 @@ PACKAGE = vm-install -VER = 0.5.7 +VER = 0.6.1 default: @echo "Run 'make install DESTDIR=$destdir' to install." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.5.7/glade/vm-install.glade new/vm-install-0.6.1/glade/vm-install.glade --- old/vm-install-0.5.7/glade/vm-install.glade 2012-01-30 21:10:57.000000000 +0100 +++ new/vm-install-0.6.1/glade/vm-install.glade 2012-02-29 18:14:50.000000000 +0100 @@ -9568,7 +9568,9 @@ <widget class="GtkComboBox" id="cache-mode-combobox"> <property name="visible">True</property> <property name="items" translatable="yes">default +directsync none +unsafe writeback writethrough</property> <property name="add_tearoffs">False</property> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.5.7/man/vm-install.8 new/vm-install-0.6.1/man/vm-install.8 --- old/vm-install-0.5.7/man/vm-install.8 2012-01-14 00:04:01.000000000 +0100 +++ new/vm-install-0.6.1/man/vm-install.8 2012-01-11 23:44:10.000000000 +0100 @@ -95,11 +95,14 @@ \fIPDEV\fR describes the physical storage. In its simplest form, \fIPDEV\fR can be a path to a file or block device. More complex forms require prefixing -a protocol. Valid protocols are: \fBfile\fR, \fBiscsi\fR, \fBnbd\fR, +a protocol. Valid Xen protocols are: \fBfile\fR, \fBiscsi\fR, \fBnbd\fR, \fBnpiv\fR, \fBphy\fR, \fBtap:aio\fR, \fBtap:qcow\fR, and \fBtap:vmdk\fR. Examples: \fB/dev/hdb\fR, \fBphy:/dev/hdb\fR, \fBtap:qcow:/disks/disk0.qcow\fR, \fBiscsi:iqn.2006-09.de.suse@0ac47ee2-216e-452a-a341-a12624cd0225\fR. +Valid KVM protocols are: \fBfile\fR, \fBnbd\fR, \fBphy\fR, +\fBqcow2\fR, \fBqed\fR, \fBraw\fR, \fBvpc\fR, and \fBvmdk\fR. Other protocols +are available for experimentation. \fIVDEV\fR is the name of the virtual device. \fIVDEV\fR may be named using Xen fully-virtualized or KVM names (\fBhda\fR, \fBhdb\fR, \fBhdc\fR, ...) or diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.5.7/setup.py new/vm-install-0.6.1/setup.py --- old/vm-install-0.5.7/setup.py 2012-01-14 00:04:02.000000000 +0100 +++ new/vm-install-0.6.1/setup.py 2012-02-29 18:15:06.000000000 +0100 @@ -1,7 +1,7 @@ from distutils.core import setup setup(name='vminstall', - version='0.5.7', + version='0.6.1', description='Define a virtual machine and install its operating system', author='Charles Coffing', author_email='ccoffing@novell.com', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.5.7/src/vmdisks/disks.py new/vm-install-0.6.1/src/vmdisks/disks.py --- old/vm-install-0.5.7/src/vmdisks/disks.py 2012-01-14 00:04:00.000000000 +0100 +++ new/vm-install-0.6.1/src/vmdisks/disks.py 2012-02-29 18:06:40.000000000 +0100 @@ -389,7 +389,7 @@ 'par': ['parallels'] } -cache_modes = [ 'default', 'none', 'writeback', 'writethrough' ] +cache_modes = [ 'default', 'directsync', 'none', 'unsafe', 'writeback', 'writethrough' ] def parse_string(disk, extended=False, blocks=None): """Parses a text representation of a disk, and returns such a disk object. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.5.7/src/vminstall/VMPXE.py new/vm-install-0.6.1/src/vminstall/VMPXE.py --- old/vm-install-0.5.7/src/vminstall/VMPXE.py 2012-01-14 00:04:01.000000000 +0100 +++ new/vm-install-0.6.1/src/vminstall/VMPXE.py 2012-02-28 23:42:28.000000000 +0100 @@ -61,10 +61,12 @@ data = rfd.read() status = rfd.close() lines = data.splitlines()[1:] + if not lines: + raise PXEError(PXEError.E_NO_BRIDGE) line1 = lines[0] words = line1.split() bridge = words[0] - + log.debug("getServAddr: bridge: %s " % (bridge)) udhcp_result=commands.getstatusoutput(udhcpc_command + " -i " + bridge + @@ -89,6 +91,7 @@ global kernel_list global initrd_list global pxe_label + global tftp_flag def __init__(self): self.__initialized = True @@ -96,6 +99,12 @@ pxe_label='' kernel_list={} initrd_list={} + if os.path.exists('/usr/bin/tftp'): + tftp_flag = True + elif os.path.exists('/usr/bin/atftp'): + tftp_flag = False + else: + tftp_flag = None def _getMediaRoots(self, root, _open=open): """Network install sources may be composed of multiple CDs. YaST lists @@ -180,13 +189,17 @@ return (None, None) def getPXEconfigFromPXEserver(self, options): + if tftp_flag is None: + raise PXEError(PXEError.E_NO_TFTP) try: servaddr=getServAddr(options) except Exception, e: raise e os.chdir(vminstall.paths.imagedir) - commandstr="tftp "+servaddr+" -c get pxelinux.cfg/default" - #commandstr="atftp -g -r pxelinux.cfg/default -l default 147.2.207.153" #for test + if tftp_flag is True: + commandstr="tftp "+servaddr+" -c get pxelinux.cfg/default" + else: + commandstr="atftp -g -r pxelinux.cfg/default -l default " + servaddr cfgfilename="default" getpxeres=commands.getstatusoutput(commandstr) if not tftp_success(getpxeres) or not os.path.exists(cfgfilename): @@ -235,8 +248,10 @@ raise PXEError(PXEError.E_NO_KERNEL) log.debug('k/i: %s, %s'% (kernel_list[options.pxe_label], initrd_list[options.pxe_label])) for i in [kernel_list[options.pxe_label], initrd_list[options.pxe_label]]: - cmd="tftp "+servaddr+" -c get "+ i + " " + os.path.basename(i)+ "." + str(os.getpid()) - #cmd="tftp 147.2.207.153 -c get "+ i #for test + if tftp_flag is True: + cmd="tftp "+servaddr+" -c get "+ i + " " + os.path.basename(i)+ "." + str(os.getpid()) + else: + cmd="atftp -g -r " + i + " -l " + os.path.basename(i) + "." + str(os.getpid()) + " " + servaddr dlres[i]=commands.getstatusoutput(cmd) if not tftp_success (dlres[i]): success=0 @@ -293,7 +308,8 @@ XML file.""" ay = guest.options.os_settings if not ay or ay.startswith('ftp://') or ay.startswith('tftp://') or \ - ay.startswith('http://') or ay.startswith('nfs://'): + ay.startswith('http://') or ay.startswith('nfs://') or \ + ay.startswith('atftp://'): pass else: (fd, tmpdisk) = tempfile.mkstemp(prefix='autoyast.') @@ -361,7 +377,8 @@ ay = options.os_settings if ay: if ay.startswith('ftp://') or ay.startswith('tftp://') or \ - ay.startswith('http://') or ay.startswith('nfs://'): + ay.startswith('http://') or ay.startswith('nfs://') or \ + ay.startswith('atftp://'): pxeargs += ' autoyast=%s' % (ay,) else: ay_vdev = autoyast_vdev diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.5.7/src/vminstall/exceptions.py new/vm-install-0.6.1/src/vminstall/exceptions.py --- old/vm-install-0.5.7/src/vminstall/exceptions.py 2012-01-14 00:04:01.000000000 +0100 +++ new/vm-install-0.6.1/src/vminstall/exceptions.py 2012-02-28 23:41:47.000000000 +0100 @@ -215,12 +215,16 @@ msg.pxe_no_pxe_server, msg.pxe_no_config, msg.pxe_no_kernel, - msg.pxe_kernel_warn) + msg.pxe_kernel_warn, + msg.pxe_no_bridge, + msg.pxe_no_tftp) (E_NO_SERVER, E_NO_CONFIG, E_NO_KERNEL, - E_KERNEL_WARN - ) = range(4) + E_KERNEL_WARN, + E_NO_BRIDGE, + E_NO_TFTP + ) = range(6) def __init__(self, err, details=None): Error.__init__(self, err, title=self.titles[err], details=details) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.5.7/src/vminstall/kvm_guest.py new/vm-install-0.6.1/src/vminstall/kvm_guest.py --- old/vm-install-0.5.7/src/vminstall/kvm_guest.py 2012-01-14 00:04:01.000000000 +0100 +++ new/vm-install-0.6.1/src/vminstall/kvm_guest.py 2012-03-01 00:07:09.000000000 +0100 @@ -106,9 +106,17 @@ """Get the disk config in the libvirt XML format""" available_cdroms = [{'hda': 0}, {'hdb': 0}, {'hdc': 0}, {'hdd': 0}] ret = [] + saved_mode = None + target_disk = self.options.disks[0] + if self.isInstall and target_disk: + index, saved_mode = target_disk.get_cache_mode() + # The destination disk only during installation is this considered safe to do + target_disk.set_cache_mode("unsafe") for disk in self.options.disks + self.tmpdisks: use_virtio = self.options.virtio and disk.virtio ret.extend(disk.get_xml_config(use_virtio, available_cdroms)) + if self.isInstall and target_disk: + target_disk.set_cache_mode(saved_mode) return ret def _get_network_xml(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vm-install-0.5.7/src/vminstall/msg.py new/vm-install-0.6.1/src/vminstall/msg.py --- old/vm-install-0.5.7/src/vminstall/msg.py 2012-01-14 00:04:01.000000000 +0100 +++ new/vm-install-0.6.1/src/vminstall/msg.py 2012-02-28 23:43:15.000000000 +0100 @@ -275,6 +275,8 @@ pxe_no_config = _("Can't get the pxelinux.cfg/default file from the pxe server.") pxe_no_kernel = _("Can't download the kernel and initrd from the server.") pxe_kernel_warn = _("This kernel image may not be a paravirtualized xen kernel required for installation, Continue?") +pxe_no_bridge = _("Unable to identify a configured network bridge.") +pxe_no_tftp = _("Paravirtualized PXE booting requires the use of tftp or atftp. Please install one of these packages.") # Network nic_e100 = _("Fully Virtualized Intel e100") -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org