Hello community,
here is the log from the commit of package yast2-vm
checked in at Fri Jun 2 10:28:07 CEST 2006.
--------
--- yast2-vm/yast2-vm.changes 2006-05-23 19:56:29.000000000 +0200
+++ yast2-vm/yast2-vm.changes 2006-06-02 02:38:26.000000000 +0200
@@ -1,0 +2,32 @@
+Thu Jun 1 16:16:42 MDT 2006 - mgfritch@novell.com
+
+- Do not display the 'Manage Virtual Machines' dialog when
+ creating an AutoYaST profile using the Autoinstallation wizard.
+ (#181072)
+- Only enable `view button on the 'Manage Virtual Machines' dialog
+ if YaST is running in a graphical display (XServer) and the
+ selected vm is not configured to use SDL. (#181011)
+- Only enable `start button on the 'Manage Virtual Machines' dialog
+ if YaST is running in a graphical display (XServer) or the
+ selected vm is configured as a paravirtualized guest. (#181009)
+- Disable service 'earlykbd' when running an install inside of a
+ domU. (#180919)
+- If paravirtualized domU install, use the 'extra' option 'vnc=1',
+ rather than 'textmode=1' (#181074)
+- 2.13.54
+
+-------------------------------------------------------------------
+Mon May 29 01:10:44 MDT 2006 - mgfritch@novell.com
+
+- VM_XEN::ValidateConfigName() should return false if a vm name
+ setting inside of a config file conflicts with the proposed
+ vm name (#181001)
+- Search physical disk partitions specified in the VM disk settings
+ for a valid Xen kernel. (#180130)
+- Remove any single or double quotes surrounding values read from a
+ VM config file. (#179324)
+- If dom0 is 64 bit OS, domU is full virtualization, and domU
+ memory is >= 3.5 GB, set 'pae=1' in the VM config file. (#180361)
+- 2.13.53
+
+-------------------------------------------------------------------
Old:
----
yast2-vm-2.13.52.tar.bz2
New:
----
yast2-vm-2.13.54.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-vm.spec ++++++
--- /var/tmp/diff_new_pack.6VYk77/_old 2006-06-02 10:27:57.000000000 +0200
+++ /var/tmp/diff_new_pack.6VYk77/_new 2006-06-02 10:27:57.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-vm (Version 2.13.52)
+# spec file for package yast2-vm (Version 2.13.54)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-vm
-Version: 2.13.52
+Version: 2.13.54
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-vm-2.13.52.tar.bz2
+Source0: yast2-vm-2.13.54.tar.bz2
prefix: /usr
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
Requires: yast2 yast2-installation
@@ -32,7 +32,7 @@
Ladislav Slezak
%prep
-%setup -n yast2-vm-2.13.52
+%setup -n yast2-vm-2.13.54
%build
%{prefix}/bin/y2tool y2autoconf
@@ -73,6 +73,32 @@
%doc %{prefix}/share/doc/packages/yast2-vm
%changelog -n yast2-vm
+* Thu Jun 01 2006 - mgfritch@novell.com
+- Do not display the 'Manage Virtual Machines' dialog when
+ creating an AutoYaST profile using the Autoinstallation wizard.
+ (#181072)
+- Only enable `view button on the 'Manage Virtual Machines' dialog
+ if YaST is running in a graphical display (XServer) and the
+ selected vm is not configured to use SDL. (#181011)
+- Only enable `start button on the 'Manage Virtual Machines' dialog
+ if YaST is running in a graphical display (XServer) or the
+ selected vm is configured as a paravirtualized guest. (#181009)
+- Disable service 'earlykbd' when running an install inside of a
+ domU. (#180919)
+- If paravirtualized domU install, use the 'extra' option 'vnc=1',
+ rather than 'textmode=1' (#181074)
+- 2.13.54
+* Mon May 29 2006 - mgfritch@novell.com
+- VM_XEN::ValidateConfigName() should return false if a vm name
+ setting inside of a config file conflicts with the proposed
+ vm name (#181001)
+- Search physical disk partitions specified in the VM disk settings
+ for a valid Xen kernel. (#180130)
+- Remove any single or double quotes surrounding values read from a
+ VM config file. (#179324)
+- If dom0 is 64 bit OS, domU is full virtualization, and domU
+ memory is >= 3.5 GB, set 'pae=1' in the VM config file. (#180361)
+- 2.13.53
* Mon May 22 2006 - mgfritch@novell.com
- Allow the cdrom_image setting to persist when moving from
proposal_type 'install' to proposal_type 'boot'. (#174616)
++++++ yast2-vm-2.13.52.tar.bz2 -> yast2-vm-2.13.54.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/VERSION new/yast2-vm-2.13.54/VERSION
--- old/yast2-vm-2.13.52/VERSION 2006-05-22 23:34:56.000000000 +0200
+++ new/yast2-vm-2.13.54/VERSION 2006-06-02 00:15:35.000000000 +0200
@@ -1 +1 @@
-2.13.52
+2.13.54
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/configure new/yast2-vm-2.13.54/configure
--- old/yast2-vm-2.13.52/configure 2006-05-23 17:00:43.000000000 +0200
+++ new/yast2-vm-2.13.54/configure 2006-06-02 01:56:07.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for yast2-vm 2.13.52.
+# Generated by GNU Autoconf 2.59 for yast2-vm 2.13.54.
#
# Report bugs to http://www.suse.de/feedback.
#
@@ -269,8 +269,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-vm'
PACKAGE_TARNAME='yast2-vm'
-PACKAGE_VERSION='2.13.52'
-PACKAGE_STRING='yast2-vm 2.13.52'
+PACKAGE_VERSION='2.13.54'
+PACKAGE_STRING='yast2-vm 2.13.54'
PACKAGE_BUGREPORT='http://www.suse.de/feedback'
ac_unique_file="RPMNAME"
@@ -728,7 +728,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-vm 2.13.52 to adapt to many kinds of systems.
+\`configure' configures yast2-vm 2.13.54 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -795,7 +795,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-vm 2.13.52:";;
+ short | recursive ) echo "Configuration of yast2-vm 2.13.54:";;
esac
cat <<\_ACEOF
@@ -908,7 +908,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-yast2-vm configure 2.13.52
+yast2-vm configure 2.13.54
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -922,7 +922,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-vm $as_me 2.13.52, which was
+It was created by yast2-vm $as_me 2.13.54, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1652,7 +1652,7 @@
# Define the identity of the package.
PACKAGE='yast2-vm'
- VERSION='2.13.52'
+ VERSION='2.13.54'
cat >>confdefs.h <<_ACEOF
@@ -1863,7 +1863,7 @@
-VERSION="2.13.52"
+VERSION="2.13.54"
RPMNAME="yast2-vm"
MAINTAINER="Ladislav Slezak "
@@ -2654,7 +2654,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by yast2-vm $as_me 2.13.52, which was
+This file was extended by yast2-vm $as_me 2.13.54, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -2709,7 +2709,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-vm config.status 2.13.52
+yast2-vm config.status 2.13.54
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/configure.in new/yast2-vm-2.13.54/configure.in
--- old/yast2-vm-2.13.52/configure.in 2006-05-23 17:00:32.000000000 +0200
+++ new/yast2-vm-2.13.54/configure.in 2006-06-02 01:55:58.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-vm, 2.13.52, http://www.suse.de/feedback, yast2-vm)
+AC_INIT(yast2-vm, 2.13.54, http://www.suse.de/feedback, yast2-vm)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.13.52"
+VERSION="2.13.54"
RPMNAME="yast2-vm"
MAINTAINER="Ladislav Slezak "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/src/VM.ycp new/yast2-vm-2.13.54/src/VM.ycp
--- old/yast2-vm-2.13.52/src/VM.ycp 2006-05-10 00:00:09.000000000 +0200
+++ new/yast2-vm-2.13.54/src/VM.ycp 2006-06-01 23:04:58.000000000 +0200
@@ -4,7 +4,7 @@
* Authors: Ladislav Slezak
* Michael G. Fritch
*
- * $Id: VM.ycp 30722 2006-05-05 22:59:43Z mgfritch $
+ * $Id: VM.ycp 31270 2006-06-01 21:04:48Z mgfritch $
*/
{
module "VM";
@@ -718,6 +718,37 @@
}
}
+
+ global map ReadConfigFileSettings(string cfg_file) {
+ map(string) toEval = (map(string))functions["ReadConfigFileSettings"]:nil;
+
+ if (toEval != nil)
+ {
+ return toEval(cfg_file);
+ }
+ else
+ {
+ y2error("ReadConfigFileSettings() function is missing!");
+ return nil;
+ }
+ }
+
+
+ global list<map> ReadAllConfigFileSettings() {
+ list<map>() toEval = (list<map>())functions["ReadAllConfigFileSettings"]:nil;
+
+ if (toEval != nil)
+ {
+ return toEval();
+ }
+ else
+ {
+ y2error("ReadAllConfigFileSettings() function is missing!");
+ return nil;
+ }
+ }
+
+
global symbol GetVirtualMachineState(string state) {
symbol(string) toEval = (symbol(string))functions["GetVirtualMachineState"]:nil;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/src/VM_XEN.ycp new/yast2-vm-2.13.54/src/VM_XEN.ycp
--- old/yast2-vm-2.13.52/src/VM_XEN.ycp 2006-05-23 19:55:23.000000000 +0200
+++ new/yast2-vm-2.13.54/src/VM_XEN.ycp 2006-06-02 02:36:55.000000000 +0200
@@ -3,7 +3,7 @@
* Package: XEN specific functions and values
* Authors: Ladislav Slezak
* Michael G. Fritch
- * $Id: VM_XEN.ycp 31118 2006-05-23 17:55:16Z mgfritch $
+ * $Id: VM_XEN.ycp 31272 2006-06-02 00:36:47Z mgfritch $
*/
{
module "VM_XEN";
@@ -857,7 +857,7 @@
define list<string> PartitionsInfo(string image) {
- string cmd = sformat("sfdisk -d -uS -- '%1'", image);
+ string cmd = sformat("sfdisk --force -d -uS -- '%1'", image);
map outputmap = (map)SCR::Execute(.target.bash_output, cmd);
string outputstring = outputmap["stdout"]:"";
@@ -1059,12 +1059,11 @@
string partition_name = String::CutBlanks(partition["name"]:"");
- string source = regexpsub(partition_name, "(.*)[[0123456789]]*$", "\\1"); // remove the partition number
- string partition_num = regexpsub(partition_name, ".*([[0123456789]]*$)", "\\1"); // save the partition number
y2milestone("partition_name='%1'", partition_name);
- y2milestone("source='%1'", source);
+ y2milestone("diskimage='%1'", diskimage);
+ string partition_num = regexpsub(partition_name, ".*([[0123456789]]*$)", "\\1"); // save the partition number
y2milestone("partition_num='%1'", partition_num);
- string new_target = getDiskTarget(disks, source);
+ string new_target = getDiskTarget(disks, diskimage);
if (new_target != nil && new_target != "") {
// set the root device to the partition that contains the sepecified kernel (i.e. /dev/hda2)
VM_Common::root_device = new_target + partition_num;
@@ -1086,11 +1085,14 @@
boolean ret = false;
foreach(map disk, disks, {
- if ((disk["type"]:"" == "loop-create") || (disk["type"]:"" == "loop-use")) { // FIXME: should support for phys devices be added?
- string source = getDiskSource(disks, disk["target"]:"");
- if (source != nil && source != "") {
- ret = ret || ReadDiskImage(source);
+ string source = getDiskSource(disks, disk["target"]:"");
+ if (source != nil && source != "") {
+ // if a physical device, make sure string source contains the full pathname to the device.
+ if (disk["type"]:"" == "phys" && regexpmatch(source, "^/dev.*") == false) {
+ source = "/dev/" + source;
}
+ // read the disk image
+ ret = ret || ReadDiskImage(source);
}
}
);
@@ -1377,38 +1379,6 @@
return ret;
}
- global define boolean ValidateConfigName(string name) {
- list<string> configs = (list<string>)SCR::Read(.target.dir, conf_path); // list of config file names
- list<string> images = (list<string>)SCR::Read(.target.dir, img_prefix); // list of image dir names
- if (contains(configs, name) || contains(images, name)) {
- // either a config file name or a image directory name conflicts
- return false;
- }
- return true;
- }
-
-
- global define string ProposeConfigName()
- {
- integer domain = 1;
-
- while ( ValidateConfigName(conf_prefix + tostring(domain)) == false )
- {
- domain = domain + 1;
- }
-
- string conf_name = conf_prefix + tostring(domain);
- y2milestone("Proposed name: %1", conf_name);
- //SCR::Execute (.target.bash, sformat("/usr/bin/touch %1%2", conf_path, conf_name));
-
- return conf_name;
- }
-
- global define boolean resetConfigName()
- {
- VM_Common::config_name = ProposeConfigName();
- return true;
- }
global define boolean setSourceConfig(integer sid, symbol type, string custom) {
@@ -1450,6 +1420,180 @@
return WriteOption(configpath, optname, "\'" + optvalue + "\'");
}
+
+ string ReadOption(path configpath, string optname) {
+
+ string optvalue = (string)SCR::Read(configpath + topath(optname));
+
+ if (regexpmatch(optvalue, "'.*'")) {
+ // remove the single quotes
+ string tmpoptvalue = regexpsub(optvalue, "'(.*)'", "\\1");
+ if (optvalue != nil || optvalue != "")
+ optvalue = tmpoptvalue;
+ }
+ else if (regexpmatch(optvalue, "\".*\"")) {
+ // remove the double quotes
+ string tmpoptvalue = regexpsub(optvalue, "\"(.*)\"", "\\1");
+ if (optvalue != nil || optvalue != "")
+ optvalue = tmpoptvalue;
+ }
+
+ return optvalue;
+ }
+
+
+ global map ReadConfigFileSettings(string cfg_file) {
+
+ y2milestone("ReadConfigFileSettings(%1)", cfg_file);
+ if (cfg_file == nil || cfg_file == "") {
+ y2error("cfg_file paramater empty!");
+ return nil;
+ }
+
+ // FIXME: must remove from code below any duplicate ReadSettings() for a specified key!
+ map new_settings = $[];
+ path configpath = .etc.xen.value + topath(getConfigFilePath() + cfg_file);
+ y2debug("configpath=%1", configpath);
+ new_settings["name"] = ReadOption(configpath, "name");
+ if (new_settings["name"]:"" == nil || new_settings["name"]:"" == "") {
+ y2error("cfg_file value 'name' is empty!");
+ return nil; // ignore cfg files that do not contain a machine name.
+ }
+ new_settings["builder"] = ReadOption(configpath, "builder");
+ new_settings["memory"] = ReadOption(configpath, "memory");
+ new_settings["kernel"] = ReadOption(configpath, "kernel");
+ new_settings["bootentry"] = ReadOption(configpath, "bootentry");
+ if (new_settings["kernel"]:"" == nil || new_settings["kernel"]:"" == "") {
+ list<string> tmplist = splitstring(new_settings["bootentry"]:"", ":,");
+ new_settings["kernel"] = tmplist[1]:"";
+ }
+ new_settings["disks"] = parseDiskConfig(ReadOption(configpath, "disk"));
+ new_settings["on_poweroff"] = ReadOption(configpath, "on_poweroff");
+ new_settings["on_reboot"] = ReadOption(configpath, "on_reboot");
+ new_settings["on_crash"] = ReadOption(configpath, "on_crash");
+ new_settings["vcpus"] = ReadOption(configpath, "vcpus");
+ // new_settings["vif"] = parseVifConfig(ReadOption(configpath, "vif")); // FIXME: must write a method for parsing the vif list<string>
+ new_settings["stdvga"] = ReadOption(configpath, "stdvga");
+ new_settings["sdl"] = ReadOption(configpath, "sdl");
+ new_settings["vnc"] = ReadOption(configpath, "vnc");
+ new_settings["vncviewer"] = ReadOption(configpath, "vncviewer");
+ new_settings["ne2000"] = ReadOption(configpath, "ne2000");
+ new_settings["dhcp"] = ReadOption(configpath, "dhcp");
+ new_settings["ip"] = ReadOption(configpath, "ip");
+ new_settings["netmask"] = ReadOption(configpath, "netmask");
+ new_settings["interface"] = ReadOption(configpath, "interface");
+ new_settings["gateway"] = ReadOption(configpath, "gateway");
+ new_settings["extra"] = ReadOption(configpath, "extra");
+ new_settings["bootloader"] = ReadOption(configpath, "bootloader");
+ new_settings["cdrom"] = ReadOption(configpath, "cdrom");
+ new_settings["boot"] = ReadOption(configpath, "boot");
+ new_settings["localtime"] = ReadOption(configpath, "localtime");
+
+ new_settings["cfg_file"] = cfg_file;
+
+ y2milestone("ReadConfigFileSettings returned: %1", new_settings);
+ return new_settings;
+ }
+
+
+ global list<map> ReadAllConfigFileSettings() {
+
+ y2milestone("ReadAllConfigFileSettings()");
+
+ list<map> new_settings_list = [];
+
+ list<string> file_list = (list<string>) SCR::Read(.target.dir, getConfigFilePath());
+ y2milestone("file_list=%1", file_list);
+ if (file_list != nil && size(file_list) > 0) {
+ foreach(string cfg_file, file_list, {
+ string first_char = substring(cfg_file, 0, 1);
+ string last_char = substring(cfg_file, size(cfg_file)-1, size(cfg_file));
+ if (first_char == "." || last_char == "~") {
+ // ignore all files that start with '.' or end with '~'
+ continue;
+ }
+ else {
+ map new_settings = ReadConfigFileSettings(cfg_file);
+ if (new_settings != nil && size(new_settings) > 0) {
+ new_settings_list = add(new_settings_list, new_settings);
+ }
+ }
+ });
+ }
+ y2milestone("ReadAllConfigFileSettings returned: %1", new_settings_list);
+ return new_settings_list;
+ }
+
+ global define boolean ValidateConfigName(string name) {
+
+ // check for a conflicting config file name (/etc/xen/vm/*)
+ list<string> configs = (list<string>)SCR::Read(.target.dir, conf_path); // list of config file names
+ if (contains(configs, name)) {
+ // a config file name conflicts
+ return false;
+ }
+
+ // check for a conflicting vm name settings inside each config file (/etc/xen/vm/*)
+ list<map> config_settings = ReadAllConfigFileSettings(); // list<map> of settings inside of the config files
+ boolean conflict = false;
+ foreach (map tmpmap, config_settings, {
+ if (tmpmap != nil) {
+ if (tmpmap["name"]:"" == name) {
+ conflict = true;
+ break;
+ }
+ }
+ });
+ // a vm name inside a config file conflicts
+ if (conflict) {
+ return false;
+ }
+
+ // check for conflicting image directory name (/var/lib/xen/images/*)
+ list<string> images = (list<string>)SCR::Read(.target.dir, img_prefix); // list of image dir names
+ if (contains(images, name)) {
+ // try to remove the vm image directory (if it is not empty, it should not be deleted).
+ string img_dir = img_prefix + name;
+ string cmd = sformat("rmdir %1", img_dir);
+ y2milestone("Executing: %1", cmd);
+ map retmap = (map)SCR::Execute(.target.bash_output, cmd);
+ y2milestone("retmap=%1", retmap);
+ images = (list<string>)SCR::Read(.target.dir, img_prefix); // re-create list of image dir names
+
+ if (contains(images, name)) {
+ // vm image directory is not empty.
+ // An image directory name conflicts
+ return false;
+ }
+ }
+
+ // no conflicts (a valid config name)
+ return true;
+ }
+
+
+ global define string ProposeConfigName()
+ {
+ integer domain = 1;
+
+ while ( ValidateConfigName(conf_prefix + tostring(domain)) == false )
+ {
+ domain = domain + 1;
+ }
+
+ string conf_name = conf_prefix + tostring(domain);
+ y2milestone("Proposed name: %1", conf_name);
+ //SCR::Execute (.target.bash, sformat("/usr/bin/touch %1%2", conf_path, conf_name));
+
+ return conf_name;
+ }
+
+ global define boolean resetConfigName()
+ {
+ VM_Common::config_name = ProposeConfigName();
+ return true;
+ }
+
string GetVIF(list