[libvirt] [sandbox][PATCH] config: select specific kernel
by Radu Caragea
Added parameters to select a kernel through the release version and path to binary.
When setting kernel release version, the module search will be done in /lib/modules/<release>/kernel . Also, by default, after setting the kernel release version the default kernel image path will be /boot/vmlinuz-<release>
The two default to the running configuration: /lib/modules/`uname -r`/kernel and /boot/vmlinuz-`uname -r`
kver didn't seem suggestive enough; I used kernrelease and kernpath. To be changed if necessary.
Also removed utsname inclusion wherever it wasn't used at all anymore
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
index 7087459..3f7c5d7 100644
--- a/libvirt-sandbox/libvirt-sandbox-builder-machine.c
+++ b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
@@ -22,7 +22,6 @@
#include <config.h>
#include <string.h>
-#include <sys/utsname.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
@@ -116,7 +115,6 @@ static void gvir_sandbox_builder_machine_finalize(GObject *object)
static gchar *gvir_sandbox_builder_machine_mkinitrd(GVirSandboxConfig *config,
- const gchar *kver,
GError **error)
{
GVirSandboxConfigInitrd *initrd = gvir_sandbox_config_initrd_new();
@@ -124,7 +122,7 @@ static gchar *gvir_sandbox_builder_machine_mkinitrd(GVirSandboxConfig *config,
gchar *targetfile = g_strdup_printf("/tmp/libvirt-sandbox-initrd-XXXXXX");
int fd = -1;
- gvir_sandbox_config_initrd_set_kver(initrd, kver);
+ gvir_sandbox_config_initrd_set_kver(initrd, gvir_sandbox_config_get_kernrelease(config));
gvir_sandbox_config_initrd_set_init(initrd, LIBEXECDIR "/libvirt-sandbox-init-qemu");
gvir_sandbox_config_initrd_add_module(initrd, "fscache.ko");
@@ -341,19 +340,16 @@ static gboolean gvir_sandbox_builder_machine_construct_os(GVirSandboxBuilder *bu
gchar *kernel = NULL;
gchar *initrd = NULL;
gchar *cmdline = NULL;
- struct utsname uts;
GVirConfigDomainOs *os;
if (!GVIR_SANDBOX_BUILDER_CLASS(gvir_sandbox_builder_machine_parent_class)->
construct_os(builder, config, configdir, cleaner, domain, error))
return FALSE;
- uname(&uts);
-
- if (!(initrd = gvir_sandbox_builder_machine_mkinitrd(config, uts.release, error)))
+ if (!(initrd = gvir_sandbox_builder_machine_mkinitrd(config, error)))
return FALSE;
- kernel = g_strdup_printf("/boot/vmlinuz-%s", uts.release);
+ kernel = g_strdup(gvir_sandbox_config_get_kernpath(config));
cmdline = gvir_sandbox_builder_machine_cmdline(config);
gvir_sandbox_cleaner_add_rmfile_post_start(cleaner,
diff --git a/libvirt-sandbox/libvirt-sandbox-config-initrd.c b/libvirt-sandbox/libvirt-sandbox-config-initrd.c
index 327e0bf..5c75fce 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-initrd.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-initrd.c
@@ -22,7 +22,6 @@
#include <config.h>
#include <string.h>
-#include <sys/utsname.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
@@ -161,12 +160,8 @@ static void gvir_sandbox_config_initrd_class_init(GVirSandboxConfigInitrdClass *
static void gvir_sandbox_config_initrd_init(GVirSandboxConfigInitrd *config)
{
GVirSandboxConfigInitrdPrivate *priv = config->priv;
- struct utsname uts;
priv = config->priv = GVIR_SANDBOX_CONFIG_INITRD_GET_PRIVATE(config);
-
priv->init = g_strdup(LIBEXECDIR "/libvirt-sandbox-init-qemu");
- uname(&uts);
- priv->kver = g_strdup(uts.release);
}
diff --git a/libvirt-sandbox/libvirt-sandbox-config-network-address.c b/libvirt-sandbox/libvirt-sandbox-config-network-address.c
index ad91f77..959bf94 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-network-address.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-network-address.c
@@ -22,7 +22,6 @@
#include <config.h>
#include <string.h>
-#include <sys/utsname.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
diff --git a/libvirt-sandbox/libvirt-sandbox-config-network-route.c b/libvirt-sandbox/libvirt-sandbox-config-network-route.c
index 7962352..6c473d0 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-network-route.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-network-route.c
@@ -22,7 +22,6 @@
#include <config.h>
#include <string.h>
-#include <sys/utsname.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
diff --git a/libvirt-sandbox/libvirt-sandbox-config-network.c b/libvirt-sandbox/libvirt-sandbox-config-network.c
index 5668274..6440642 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-network.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-network.c
@@ -22,7 +22,6 @@
#include <config.h>
#include <string.h>
-#include <sys/utsname.h>
#include "libvirt-sandbox/libvirt-sandbox.h"
diff --git a/libvirt-sandbox/libvirt-sandbox-config.c b/libvirt-sandbox/libvirt-sandbox-config.c
index 2b0a9be..b9cda3d 100644
--- a/libvirt-sandbox/libvirt-sandbox-config.c
+++ b/libvirt-sandbox/libvirt-sandbox-config.c
@@ -46,6 +46,8 @@ struct _GVirSandboxConfigPrivate
gchar *name;
gchar *root;
gchar *arch;
+ gchar *kernrelease;
+ gchar *kernpath;
gboolean shell;
guint uid;
@@ -72,6 +74,8 @@ enum {
PROP_ROOT,
PROP_ARCH,
PROP_SHELL,
+ PROP_KERNRELEASE,
+ PROP_KERNPATH,
PROP_UID,
PROP_GID,
@@ -123,6 +127,14 @@ static void gvir_sandbox_config_get_property(GObject *object,
g_value_set_string(value, priv->arch);
break;
+ case PROP_KERNRELEASE:
+ g_value_set_string(value, priv->kernrelease);
+ break;
+
+ case PROP_KERNPATH:
+ g_value_set_string(value, priv->kernpath);
+ break;
+
case PROP_SHELL:
g_value_set_boolean(value, priv->shell);
break;
@@ -181,6 +193,16 @@ static void gvir_sandbox_config_set_property(GObject *object,
priv->arch = g_value_dup_string(value);
break;
+ case PROP_KERNRELEASE:
+ g_free(priv->kernrelease);
+ priv->kernrelease = g_value_dup_string(value);
+ break;
+
+ case PROP_KERNPATH:
+ g_free(priv->kernpath);
+ priv->kernpath = g_value_dup_string(value);
+ break;
+
case PROP_SHELL:
priv->shell = g_value_get_boolean(value);
break;
@@ -239,6 +261,8 @@ static void gvir_sandbox_config_finalize(GObject *object)
g_free(priv->name);
g_free(priv->root);
g_free(priv->arch);
+ g_free(priv->kernrelease);
+ g_free(priv->kernpath);
g_free(priv->secLabel);
G_OBJECT_CLASS(gvir_sandbox_config_parent_class)->finalize(object);
@@ -291,6 +315,28 @@ static void gvir_sandbox_config_class_init(GVirSandboxConfigClass *klass)
G_PARAM_STATIC_NICK |
G_PARAM_STATIC_BLURB));
g_object_class_install_property(object_class,
+ PROP_KERNRELEASE,
+ g_param_spec_string("kernrelease",
+ "Kernrelease",
+ "The kernel release version",
+ NULL,
+ G_PARAM_READABLE |
+ G_PARAM_WRITABLE |
+ G_PARAM_STATIC_NAME |
+ G_PARAM_STATIC_NICK |
+ G_PARAM_STATIC_BLURB));
+ g_object_class_install_property(object_class,
+ PROP_KERNPATH,
+ g_param_spec_string("kernpath",
+ "Kernpath",
+ "The kernel image path",
+ NULL,
+ G_PARAM_READABLE |
+ G_PARAM_WRITABLE |
+ G_PARAM_STATIC_NAME |
+ G_PARAM_STATIC_NICK |
+ G_PARAM_STATIC_BLURB));
+ g_object_class_install_property(object_class,
PROP_SHELL,
g_param_spec_string("shell",
"SHELL",
@@ -388,6 +434,8 @@ static void gvir_sandbox_config_init(GVirSandboxConfig *config)
priv->name = g_strdup("sandbox");
priv->root = g_strdup("/");
priv->arch = g_strdup(uts.machine);
+ priv->kernrelease = g_strdup(uts.release);
+ priv->kernpath = g_strdup_printf("/boot/vmlinuz-%s", priv->kernrelease);
priv->secLabel = g_strdup("system_u:system_r:svirt_t:s0:c0.c1023");
priv->uid = geteuid();
@@ -474,6 +522,70 @@ const gchar *gvir_sandbox_config_get_arch(GVirSandboxConfig *config)
/**
+ * gvir_sandbox_config_set_kernrelease:
+ * @config: (transfer none): the sandbox config
+ * @kernrelease: (transfer none): the host directory
+ *
+ * Set the kernel release version to use in the sandbox. If none is provided,
+ * it will default to matching the current running kernel.
+ * Also sets the default kernel path as /boot/vmlinuz-<release>
+ */
+void gvir_sandbox_config_set_kernrelease(GVirSandboxConfig *config, const gchar *kernrelease)
+{
+ GVirSandboxConfigPrivate *priv = config->priv;
+ g_free(priv->kernrelease);
+ priv->kernrelease = g_strdup(kernrelease);
+ gvir_sandbox_config_set_kernpath(config, g_strdup_printf("/boot/vmlinuz-%s", priv->kernrelease));
+
+}
+
+
+/**
+ * gvir_sandbox_config_get_kernrelease:
+ * @config: (transfer none): the sandbox config
+ *
+ * Retrieves the sandbox kernel release version
+ *
+ * Returns: (transfer none): the current kernel release version
+ */
+const gchar *gvir_sandbox_config_get_kernrelease(GVirSandboxConfig *config)
+{
+ GVirSandboxConfigPrivate *priv = config->priv;
+ return priv->kernrelease;
+}
+/**
+ * gvir_sandbox_config_set_kernpath:
+ * @config: (transfer none): the sandbox config
+ * @kernpath: (transfer none): the host directory
+ *
+ * Set the kernel image path to use in the sandbox. If none is provided,
+ * it will default to matching /boot/vmlinuz-<kernel release>.
+ */
+
+void gvir_sandbox_config_set_kernpath(GVirSandboxConfig *config, const gchar *kernpath)
+{
+ GVirSandboxConfigPrivate *priv = config->priv;
+ g_free(priv->kernpath);
+ priv->kernpath = g_strdup(kernpath);
+}
+
+
+/**
+ * gvir_sandbox_config_get_kernpath:
+ * @config: (transfer none): the sandbox config
+ *
+ * Retrieves the sandbox kernel image path
+ *
+ * Returns: (transfer none): the current kernel image path
+ */
+const gchar *gvir_sandbox_config_get_kernpath(GVirSandboxConfig *config)
+{
+ GVirSandboxConfigPrivate *priv = config->priv;
+ return priv->kernpath;
+}
+
+
+/**
* gvir_sandbox_config_set_shell:
* @config: (transfer none): the sandbox config
* @shell: (transfer none): true if the container should have a shell
@@ -1531,6 +1643,14 @@ static gboolean gvir_sandbox_config_load_config(GVirSandboxConfig *config,
g_free(priv->arch);
priv->arch = str;
}
+ if ((str = g_key_file_get_string(file, "core", "kernrelease", NULL)) != NULL) {
+ g_free(priv->kernrelease);
+ priv->kernrelease = str;
+ }
+ if ((str = g_key_file_get_string(file, "core", "kernpath", NULL)) != NULL) {
+ g_free(priv->kernpath);
+ priv->kernpath = str;
+ }
b = g_key_file_get_boolean(file, "core", "shell", &e);
if (e) {
g_error_free(e);
@@ -1748,6 +1868,8 @@ static void gvir_sandbox_config_save_config(GVirSandboxConfig *config,
g_key_file_set_string(file, "core", "name", priv->name);
g_key_file_set_string(file, "core", "root", priv->root);
g_key_file_set_string(file, "core", "arch", priv->arch);
+ g_key_file_set_string(file, "core", "kernrelease", priv->kernrelease);
+ g_key_file_set_string(file, "core", "kernpath", priv->kernpath);
g_key_file_set_boolean(file, "core", "shell", priv->shell);
g_key_file_set_uint64(file, "identity", "uid", priv->uid);
diff --git a/libvirt-sandbox/libvirt-sandbox-config.h b/libvirt-sandbox/libvirt-sandbox-config.h
index 3902e40..a6c8ae8 100644
--- a/libvirt-sandbox/libvirt-sandbox-config.h
+++ b/libvirt-sandbox/libvirt-sandbox-config.h
@@ -76,6 +76,12 @@ const gchar *gvir_sandbox_config_get_root(GVirSandboxConfig *config);
void gvir_sandbox_config_set_arch(GVirSandboxConfig *config, const gchar *arch);
const gchar *gvir_sandbox_config_get_arch(GVirSandboxConfig *config);
+void gvir_sandbox_config_set_kernrelease(GVirSandboxConfig *config, const gchar *kernrelease);
+const gchar *gvir_sandbox_config_get_kernrelease(GVirSandboxConfig *config);
+
+void gvir_sandbox_config_set_kernpath(GVirSandboxConfig *config, const gchar *kernpath);
+const gchar *gvir_sandbox_config_get_kernpath(GVirSandboxConfig *config);
+
void gvir_sandbox_config_set_shell(GVirSandboxConfig *config, gboolean shell);
gboolean gvir_sandbox_config_get_shell(GVirSandboxConfig *config);
diff --git a/libvirt-sandbox/libvirt-sandbox.sym b/libvirt-sandbox/libvirt-sandbox.sym
index 16cd2ff..424fd98 100644
--- a/libvirt-sandbox/libvirt-sandbox.sym
+++ b/libvirt-sandbox/libvirt-sandbox.sym
@@ -94,6 +94,8 @@ LIBVIRT_SANDBOX_0.0.1 {
gvir_sandbox_config_set_root;
gvir_sandbox_config_set_shell;
gvir_sandbox_config_set_arch;
+gvir_sandbox_config_set_kernrelease;
+gvir_sandbox_config_set_kernpath;
gvir_sandbox_config_set_userid;
gvir_sandbox_config_set_groupid;
gvir_sandbox_config_set_username;
12 years, 10 months
[libvirt] [PATCH 0/5] Support forward mode='hostdev' and interface pools
by Shradha Shah
This patch series supports the forward mode='hostdev'. The functionality
of this mode is the same as interface type='hostdev' but with the added
benefit of using interface pools.
The patch series also contains a patch to support use of interface names
and PCI device addresses interchangeably in a network xml, and return
the appropriate one in actualDevice when networkAllocateActualDevice is
called. This functionality is not supported for any other forward mode
except hostdev.
Currently this patch series also does not support USB hostdev
passthrough.
At the top level managed attribute can be specified for a pf dev or an
interface dev (with identical results as when it's specified for a
hostdev
Shradha Shah (5):
Code to return interface name or pci_addr of the VF in actualDevice
Moved the code to create implicit interface pool from PF to a new
function
Introduce forward mode='hostdev' for network XML in order to use the
functionality of interface pools.
Forward Mode Hostdev Implementation
Supporting managed option for forward devs when using HOSTDEV mode
docs/schemas/network.rng | 1 +
src/conf/network_conf.c | 119 +++++++++++++++-
src/conf/network_conf.h | 13 ++-
src/libvirt_private.syms | 3 +
src/network/bridge_driver.c | 325 +++++++++++++++++++++++++++++++++++--------
src/qemu/qemu_command.c | 14 ++
src/util/pci.c | 7 +-
src/util/pci.h | 3 +
src/util/virnetdev.c | 134 +++++++++++++++++-
src/util/virnetdev.h | 19 +++
10 files changed, 568 insertions(+), 70 deletions(-)
--
1.7.4.4
12 years, 10 months
[libvirt] [PATCHv2 0/3] openvz: allow for runtime quota updates
by Guido Günther
Hi,
attached patches allow to change disk quota at runtime. This can later be
extended to update network configuration as well.
The patch revealed a problem of the openvz driver in genral: the
openvzLoadDomains only reads the on disk configuration but doesn't check if
running domains have (non persistent) diverging values due to openvz calls
without the "--save" option but that's part of another patch.
Changes since last time:
* add virDomainFSIndexByName to libvirt_private.syms
* check for unallowed updates in openvzUpdateDevice
Cheers,
-- Guido
Guido Günther (3):
Introduce virDomainFSIndexByName
openvz: add persist parameter to openvzSetDiskQuota
openvz: wire up domainUpdateDeviceFlags
src/conf/domain_conf.c | 16 ++++++
src/conf/domain_conf.h | 1 +
src/libvirt_private.syms | 1 +
src/openvz/openvz_driver.c | 116 ++++++++++++++++++++++++++++++++++++++++++--
4 files changed, 130 insertions(+), 4 deletions(-)
--
1.7.10.4
12 years, 10 months
[libvirt] [sandbox][PATCH]builder-machine: fix incorrect memory allocation
by Radu Caragea
Features should be allocated with 2 elements, one to be "acpi" and one to be a NULL pointer indicating string array termination. (Caught with valgrind)
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
index 7087459..3f7c5d7 100644
--- a/libvirt-sandbox/libvirt-sandbox-builder-machine.c
+++ b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
@@ -391,7 +387,7 @@ static gboolean gvir_sandbox_builder_machine_construct_features(GVirSandboxBuild
construct_features(builder, config, configdir, cleaner, domain, error))
return FALSE;
- features = g_new0(gchar *, 1);
+ features = g_new0(gchar *, 2);
features[0] = g_strdup("acpi");
gvir_config_domain_set_features(domain, features);
g_strfreev(features);
12 years, 10 months
[libvirt] [PATCH 0/2] python bindings cleanups for snapshots
by Eric Blake
I noticed these while working on my new list all snapshots code,
but these are fairly independent and can be applied in any order.
Eric Blake (2):
python: use simpler methods
python: fix snapshot listing bugs
python/libvirt-override.c | 70 ++++++++++++++++++++++++++++-----------------
1 file changed, 43 insertions(+), 27 deletions(-)
--
1.7.10.2
12 years, 10 months
[libvirt] [libvirt-sandbox][PATCH] module lookup and rundir fix
by Radu C.
Hello,
I've been trying to get libvirt-sandbox working on my Gentoo box but I ran into some difficulties. The version I'm using is the latest git one.
The first problem was the following when running virt-sandbox:
"Unable to start sandbox: Error opening file '/tmp/libvirt-sandbox-9ivpRN/9pnet.ko': File exists"
I pinpointed the problem to the following diff in commit [05fb94d2c42abe9cfd86c3663d704c268f325503]:
- gchar *moddirpath = g_strdup_printf("/lib/modules/%s/kernel",
+ gchar *moddirpath = g_strdup_printf("/lib/modules/%s",
The problem is that symlinks are made to the build directory and it finds a module multiple times.
I inserted a printf in the lookup loop so here's what I mean:
dmns libvirt-sandbox # virt-sandbox -c qemu:///system -n test1323 -v
-d /usr/bin/yes
found: /lib/modules/3.4.0-gentoo/kernel/fs/fscache/fscache.ko
found: /lib/modules/3.4.0-gentoo/source/fs/fscache/fscache.ko
found: /lib/modules/3.4.0-gentoo/build/fs/fscache/fscache.ko
found: /lib/modules/3.4.0-gentoo/kernel/net/9p/9pnet.ko
found: /lib/modules/3.4.0-gentoo/source/net/9p/9pnet.ko
found: /lib/modules/3.4.0-gentoo/build/net/9p/9pnet.ko
found: /lib/modules/3.4.0-gentoo/kernel/fs/9p/9p.ko
found: /lib/modules/3.4.0-gentoo/source/fs/9p/9p.ko
found: /lib/modules/3.4.0-gentoo/build/fs/9p/9p.ko
found: /lib/modules/3.4.0-gentoo/kernel/net/9p/9pnet_virtio.ko
found: /lib/modules/3.4.0-gentoo/source/net/9p/9pnet_virtio.ko
found: /lib/modules/3.4.0-gentoo/build/net/9p/9pnet_virtio.ko
The next problem was the following:
dmns libvirt-sandbox # virt-sandbox -c qemu:///system -n test123 -v -d
/usr/bin/yes
Unable to start sandbox: Failed to create domain: internal error
Process exited while reading console log output: char device
redirected to /dev/pts/1
char device redirected to /dev/pts/3
Virtio-9p Failed to initialize fs-driver with id:fsdev-fs1 and export
path:libvirt-sandbox/test123/config
It appears when running as root because of the following line:
./libvirt-sandbox/libvirt-sandbox-context.c: cachedir = (getuid() ? g_get_user_cache_dir() : RUNDIR);
RUNDIR is always "" due to being compiled with -DRUNDIR=\"\" . This is because there's a typo in makefile.am
Both of these are fixed in the diff attachment.
Having these fixes in place everything works fine when using libvirt 0.9.10 but for newer versions I noticed every time I ran virt-sandbox the libvirtd daemon would segfault.
Using git bisect I traced the problem back to commit [1]. So I reverted back to libvirt 0.9.10 but I believe there is a problem both in the commit and somewhere in libvirt-sandbox.
Please have a look and tell me if you need extra info.
[1] http://libvirt.org/git/?p=libvirt.git;a=commit;h=4716138229ae47c5492c1...
Radu Caragea.
12 years, 10 months
Re: [libvirt] Error while installing a guest
by Pankaj Rawat
I am attaching the virtinstall log file is attached
Regards
Pankaj Rawat
From: Pankaj Rawat
Sent: Tuesday, June 12, 2012 3:26 PM
To: Alex Jia
Cc: libvir-list(a)redhat.com
Subject: RE: [libvirt] Error while installing a guest
Ok I am attaching the file.
Regards
Pankaj Rawat
-----Original Message-----
From: Alex Jia [mailto:ajia@redhat.com]
Sent: Tuesday, June 12, 2012 11:38 AM
To: Pankaj Rawat
Cc: libvir-list(a)redhat.com
Subject: Re: [libvirt] Error while installing a guest
Hi Pankaj,
Could you attach your virt-install.log as an attachment?
it locals in ~/.virtinst/virt-install.log.
Or Is it okay if you also upgrade your python-virtinst?
Thanks,
Alex
----- Original Message -----
From: "Pankaj Rawat" <pankaj.rawat(a)nechclst.in>
To: libvir-list(a)redhat.com
Sent: Tuesday, June 12, 2012 1:56:05 PM
Subject: [libvirt] Error while installing a guest
Hi all ,
I have SL6.2 x86_64 Installed on my system
I updated libvirt version from 0.9.4 to 0.9.11, I had removed previous libvirt via yum
I done this by compiling the source.
I started libvirt daemon created by compiling source :
# ./root/libvirt_0.9.11/build/daomen/libvirtd
Now I tried to create a guest:-
[root@localhost libvirt-0.9.11]# /usr/sbin/virt-install --accelerate --hvm --connect qemu:///system --name g3 --vcpu=1 --ram 1024 --os-type=linux --os-variant=rhel6 --network bridge:br0 --disk /var/lib/libvirt/images/g2 --disk=/opt/SL-62-x86_64-2012-02-06-Install-DVD.iso,device=cdrom,perms=ro --location=/mnt/ --nographics --serial pty --extra-args=console=ttyS0,115200n8 --keymap=en --force
The command line above normally works fine (I have created many vm by using same above command)
But here Following error comes
Starting install...
Retrieving file .treeinfo... | 768 B 00:00 ...
Retrieving file vmlinuz... | 7.5 MB 00:00 ...
Retrieving file initrd.img... 100% [=====================================================] 11 MB/s | 29 MB --:-- ETA
Retrieving file initrd.img... | 59 MB 00:09 ...
ERROR internal error Process exited while reading console log output:
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start g3
otherwise, please restart your installation.
at libvirtd console following output comes:
2012-06-12 13:58:55.239+0000: 17800: error : qemuProcessReadLogOutput:1298 : internal error Process exited while reading console log output:
2012-06-12 14:04:12.120+0000: 17802: warning : qemuDomainObjTaint:1227 : Domain id=3 name='g3' uuid=fec6cb5a-d4ea-d2c9-505c-611227fb4f4c is tainted: high-privileges
2012-06-12 13:58:55.239+0000: 17800: error : qemuProcessReadLogOutput:1298 : internal error Process exited while reading console lo
I dont know how to resolve this .
Regards
Pankaj Rawat
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NECHCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NECHCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
-----------------------------------------------------------------------------------------------------------------------
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NECHCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NECHCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
-----------------------------------------------------------------------------------------------------------------------
12 years, 10 months
Re: [libvirt] Error while installing a guest
by Alex Jia
On 06/12/2012 05:55 PM, Pankaj Rawat wrote:
>
>
> Ok I am attaching the file.
>
Please check your guest image size by qemu-img info or ll -h, for
example: qemu-img info /var/lib/libvirt/images/g2,
and run 'ifconfig | grep br0' then paste output in here, thanks.
In addition, you may also use interactive virt-install to install a
guest with --prompt option then step by step.
>
> Regards
> Pankaj Rawat
>
>
> -----Original Message-----
> From: Alex Jia [mailto:ajia@redhat.com]
> Sent: Tuesday, June 12, 2012 11:38 AM
> To: Pankaj Rawat
> Cc: libvir-list(a)redhat.com
> Subject: Re: [libvirt] Error while installing a guest
>
> Hi Pankaj,
> Could you attach your virt-install.log as an attachment?
> it locals in ~/.virtinst/virt-install.log.
>
> Or Is it okay if you also upgrade your python-virtinst?
>
> Thanks,
> Alex
>
>
> ----- Original Message -----
> From: "Pankaj Rawat" <pankaj.rawat(a)nechclst.in>
> To: libvir-list(a)redhat.com
> Sent: Tuesday, June 12, 2012 1:56:05 PM
> Subject: [libvirt] Error while installing a guest
>
>
>
>
>
> Hi all ,
>
> I have SL6.2 x86_64 Installed on my system
>
> I updated libvirt version from 0.9.4 to 0.9.11, I had removed previous
> libvirt via yum
>
> I done this by compiling the source.
>
>
>
> I started libvirt daemon created by compiling source :
>
> # ./root/libvirt_0.9.11/build/daomen/libvirtd
>
>
>
> Now I tried to create a guest:-
>
> [root@localhost libvirt-0.9.11]# /usr/sbin/virt-install --accelerate
> --hvm --connect qemu:///system --name g3 --vcpu=1 --ram 1024
> --os-type=linux --os-variant=rhel6 --network bridge:br0 --disk
> /var/lib/libvirt/images/g2
> --disk=/opt/SL-62-x86_64-2012-02-06-Install-DVD.iso,device=cdrom,perms=ro
> --location=/mnt/ --nographics --serial pty
> --extra-args=console=ttyS0,115200n8 --keymap=en --force
>
>
>
> The command line above normally works fine (I have created many vm by
> using same above command)
>
>
>
> But here Following error comes
>
> Starting install...
> Retrieving file .treeinfo... | 768 B 00:00 ...
> Retrieving file vmlinuz... | 7.5 MB 00:00 ...
> Retrieving file initrd.img... 100%
> [=====================================================] 11 MB/s | 29
> MB --:-- ETA
>
> Retrieving file initrd.img... | 59 MB 00:09 ...
> ERROR internal error Process exited while reading console log output:
> Domain installation does not appear to have been successful.
> If it was, you can restart your domain by running:
> virsh --connect qemu:///system start g3
> otherwise, please restart your installation.
>
> at libvirtd console following output comes:
> 2012-06-12 13:58:55.239+0000: 17800: error :
> qemuProcessReadLogOutput:1298 : internal error Process exited while
> reading console log output:
> 2012-06-12 14:04:12.120+0000: 17802: warning : qemuDomainObjTaint:1227
> : Domain id=3 name='g3' uuid=fec6cb5a-d4ea-d2c9-505c-611227fb4f4c is
> tainted: high-privileges
> 2012-06-12 13:58:55.239+0000: 17800: error :
> qemuProcessReadLogOutput:1298 : internal error Process exited while
> reading console lo
>
>
>
> I dont know how to resolve this .
>
> Regards
>
> Pankaj Rawat
>
> DISCLAIMER:
>
> -----------------------------------------------------------------------------------------------------------------------
>
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended
>
> for the named recipient(s) only.
>
> It shall not attach any liability on the originator or NECHCL or its
>
> affiliates. Any views or opinions presented in
>
> this email are solely those of the author and may not necessarily
> reflect the
>
> opinions of NECHCL or its affiliates.
>
> Any form of reproduction, dissemination, copying, disclosure,
> modification,
>
> distribution and / or publication of
>
> this message without the prior written consent of the author of this
> e-mail is
>
> strictly prohibited. If you have
>
> received this email in error please delete it and notify the sender
>
> immediately. .
>
> -----------------------------------------------------------------------------------------------------------------------
>
> --
> libvir-list mailing list
> libvir-list(a)redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
> DISCLAIMER:
>
> -----------------------------------------------------------------------------------------------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended
>
> for the named recipient(s) only.
>
> It shall not attach any liability on the originator or NECHCL or its
>
> affiliates. Any views or opinions presented in
>
> this email are solely those of the author and may not necessarily reflect the
>
> opinions of NECHCL or its affiliates.
>
> Any form of reproduction, dissemination, copying, disclosure, modification,
>
> distribution and / or publication of
>
> this message without the prior written consent of the author of this e-mail is
>
> strictly prohibited. If you have
>
> received this email in error please delete it and notify the sender
>
> immediately. .
>
> -----------------------------------------------------------------------------------------------------------------------
12 years, 10 months
[libvirt] [PATCH 0/2] Don't overwrite security labels
by Michal Privoznik
If we have a running domain A with a PCI/USB device X passthrough,
and user wants to start domain B with again device X, we
reject start however, call qemuProcessStop to perform rollback.
This however does not do any rollback just cleanup therefore
rewrite labels on device X leaving domain A in silly situation.
Michal Privoznik (2):
qemuProcessStop: Switch to flags
qemu: Don't overwrite security labels
src/qemu/qemu_driver.c | 16 ++++++++--------
src/qemu/qemu_migration.c | 20 +++++++++++++-------
src/qemu/qemu_process.c | 28 +++++++++++++++++-----------
src/qemu/qemu_process.h | 9 +++++++--
4 files changed, 45 insertions(+), 28 deletions(-)
--
1.7.8.5
12 years, 10 months
[libvirt] [PATCH] virsh: let 'connect' without args remember -c option
by Eric Blake
If a user invokes 'virsh -c $URI', then within that batch shell,
they probably want 'connect' to revert to $URI rather than the
normal default URI you get for passing in NULL.
In particular, I had a setup where qemu:///session was failing,
but took 20 seconds to fail; since 'make -C tests check TESTS=virsh-all'
exercises the command 'virsh -c test:///default connect' without
arguments, it was locking up for 20 seconds trying to connect to
qemu, even though the testsuite specifically wants to limit itself
to the test:///default URI.
* tools/virsh.c (__vshControl): Add member.
(main, vshParseArgv): Set it.
(vshDeinit): Clean it up.
(cmdConnect): Use it to reopen to original connection.
---
This doesn't fix the root cause of this problem:
https://www.redhat.com/archives/libvir-list/2012-June/msg00237.html
but at least it makes my 'make check' runs faster while
I still investigate the root problem.
tools/virsh.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index 0453b95..b28dc49 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -241,6 +241,7 @@ typedef struct __vshCmd {
*/
typedef struct __vshControl {
char *name; /* connection name */
+ char *default_name; /* -c or env-var default when name is NULL */
virConnectPtr conn; /* connection to hypervisor (MAY BE NULL) */
vshCmd *cmd; /* the current command */
char *cmdstr; /* string with command */
@@ -856,7 +857,7 @@ cmdConnect(vshControl *ctl, const vshCmd *cmd)
vshError(ctl, "%s", _("Please specify valid connection URI"));
return false;
}
- ctl->name = vshStrdup(ctl, name);
+ ctl->name = vshStrdup(ctl, name ? name : ctl->default_name);
ctl->useGetInfo = false;
ctl->useSnapshotOld = false;
@@ -19922,6 +19923,7 @@ vshDeinit(vshControl *ctl)
vshReadlineDeinit(ctl);
vshCloseLogFile(ctl);
VIR_FREE(ctl->name);
+ VIR_FREE(ctl->default_name);
if (ctl->conn) {
int ret;
if ((ret = virConnectClose(ctl->conn)) != 0) {
@@ -20176,7 +20178,8 @@ vshParseArgv(vshControl *ctl, int argc, char **argv)
ctl->timing = true;
break;
case 'c':
- ctl->name = vshStrdup(ctl, optarg);
+ VIR_FREE(ctl->default_name);
+ ctl->default_name = vshStrdup(ctl, optarg);
break;
case 'v':
if (STRNEQ_NULLABLE(optarg, "long")) {
@@ -20211,6 +20214,7 @@ vshParseArgv(vshControl *ctl, int argc, char **argv)
exit(EXIT_FAILURE);
}
}
+ ctl->name = vshStrdup(ctl, ctl->default_name);
if (argc > optind) {
/* parse command */
@@ -20268,7 +20272,7 @@ main(int argc, char **argv)
progname++;
if ((defaultConn = getenv("VIRSH_DEFAULT_CONNECT_URI"))) {
- ctl->name = vshStrdup(ctl, defaultConn);
+ ctl->default_name = vshStrdup(ctl, defaultConn);
}
if (!vshParseArgv(ctl, argc, argv)) {
--
1.7.10.2
12 years, 10 months