[libvirt] GSoC 2017
by Michal Privoznik
Hey,
so we are approaching opening date for submitting orgnaization
applications [1]. In order to have perfect application we need to show
Google a list of ideas that students can work on (like they couldn't
google it up, right? ;-)). You can find the list here [2]. Let me ask
you kindly to go through it and:
a) add whatever idea you feel is appropriate,
b) if you have an idea but don't feel like mentoring, leave the 'Mentor'
field empty and I will find somebody.
There is still plenty of time left (I'll probably fill out the
application form at the end of the month), but please don't leave it
until the last hour.
There were some changes to the program discussed on the Mentor Summit,
but I don't see anything announced yet, so stay tuned. As for our
organization, historically we had 1:N mapping of mentors and students
(one mentor could have had one or more students). But last year we tried
out 2:1 mapping and I found it better so probably we will stick to
co-mentoring this year too (as everything, it's recommended not required).
Happy new year!
Michal
1: https://developers.google.com/open-source/gsoc/timeline
2: http://wiki.libvirt.org/page/Google_Summer_of_Code_2017
7 years, 10 months
[libvirt] [PATCH] qemu: snapshot: restart CPUs when recover from interrupted snapshot job
by Wang King
If we restart libvirtd while VM was doing external memory snapshot, VM's
state be updated to paused as a result of running a migration-to-file
operation, and then VM will be left as paused state. In this case we must
restart the VM's CPUs to resume it.
Signed-off-by: Wang King <king.wang(a)huawei.com>
---
src/qemu/qemu_process.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index afe3cac..7d283fb 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3093,7 +3093,8 @@ qemuProcessRecoverJob(virQEMUDriverPtr driver,
(job->asyncJob == QEMU_ASYNC_JOB_SAVE &&
reason == VIR_DOMAIN_PAUSED_SAVE) ||
(job->asyncJob == QEMU_ASYNC_JOB_SNAPSHOT &&
- reason == VIR_DOMAIN_PAUSED_SNAPSHOT) ||
+ (reason == VIR_DOMAIN_PAUSED_SNAPSHOT ||
+ reason == VIR_DOMAIN_PAUSED_MIGRATION)) ||
reason == VIR_DOMAIN_PAUSED_UNKNOWN)) {
if (qemuProcessStartCPUs(driver, vm, conn,
VIR_DOMAIN_RUNNING_UNPAUSED,
--
2.8.3
7 years, 10 months
[libvirt] xml config nested
by 放牛班的春天
How to configure libvirt, so qemu-kvm support nested virtualization, virtual machine installed operating system is windows_7_ultimate_sp1_x64_dvd_618537.iso, configure libvirt xml file is as follows:
<cpu mode='custom' match='exact'>
<model fallback='allow'>core2duo</model>
<feature policy='require' name='vmx'/>
</cpu>
or
<cpu mode='host-model'>
<model fallback='allow'/>
</cpu>
or
<cpu mode='host-passthrough'>
<topology sockets='2' cores='2' threads='2'/>
</cpu>
We install libvirt in centos 7, qemu-kvm version is:
[Root @ localhost libexec] # ./qemu-kvm --version
QEMU emulator version 2.6.0 (qemu-kvm-ev-2.6.0-27.1.el7), Copyright (c) 2003-2008 Fabrice Bellard
Above is the basic environment and libvirt configuration, but in this environment to install the internal implementation of the following windows7 virtual machine kernel interface calls are as follows:
if (!FeatrueControlMsr.fields.enable_vmxon)
{
MyWriteFile(FileHanle, "Bios设置没有开启虚拟化\n", strlen("Bios设置没有开启虚拟化\n"), &ReturnLen);
MyCloseFile(FileHanle);
KdPrint(("Bios设置没有开启虚拟化"));
return FALSE;
}
in conclusion:
Through this kernel interface to determine the result is: Bios settings do not turn on virtualization
How to solve this problem? Hope to get your help.
thank you very much。
7 years, 10 months
[libvirt] [PATCH] NEWS: Remove spurious period
by Andrea Bolognani
All other entries in the release notes omit the leading period,
and so should this one in order to maintain consistency.
---
Pushed as trivial.
docs/news.html.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/news.html.in b/docs/news.html.in
index e544cfa..c222075 100644
--- a/docs/news.html.in
+++ b/docs/news.html.in
@@ -70,7 +70,7 @@
<li>qemu: Enable mount namespace<br/>
To avoid funny races with udev relabelling devices under our hands and
to enhance security, libvirt now spawns each qemu process with its own
- <code>/dev</code>.</li>
+ <code>/dev</code></li>
</ul>
</li>
</ul>
--
2.7.4
7 years, 10 months
[libvirt] [PATCH] NEWS: Update after qemu namespace fix
by Michal Privoznik
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under my-christmas-gift-to-libvirt rule.
docs/news.html.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/docs/news.html.in b/docs/news.html.in
index 36c7d3d66..e544cfa38 100644
--- a/docs/news.html.in
+++ b/docs/news.html.in
@@ -67,6 +67,10 @@
The chardev detection code has been improved and can now handle this
configuration properly
</li>
+ <li>qemu: Enable mount namespace<br/>
+ To avoid funny races with udev relabelling devices under our hands and
+ to enhance security, libvirt now spawns each qemu process with its own
+ <code>/dev</code>.</li>
</ul>
</li>
</ul>
--
2.11.0
7 years, 10 months
[libvirt] [PATCH] qemu: snapshot: Resume VM after live snapshot
by Peter Krempa
Commit 4b951d1e38259ff5d03e9eedb65095eead8099e1 missed the fact that the
VM needs to be resumed after a live external checkpoint (memory
snapshot) where the cpus would be paused by the migration rather than
libvirt.
---
src/qemu/qemu_driver.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index b359e7757..675a4d0e7 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14503,6 +14503,9 @@ qemuDomainSnapshotCreateActiveExternal(virConnectPtr conn,
* atomic flag now says whether we need to pause, and a
* capability bit says whether to use transaction.
*/
+ if (memory)
+ resume = true;
+
if ((memory && !(flags & VIR_DOMAIN_SNAPSHOT_CREATE_LIVE)) ||
(!memory && atomic && !transaction)) {
if (qemuProcessStopCPUs(driver, vm, VIR_DOMAIN_PAUSED_SNAPSHOT,
--
2.11.0
7 years, 10 months
[libvirt] Issue with libvirtd
by Faysal Ali
Hi
I have a CentOS 7.3 server where I am running KVM with few virtual machines.
I noticed this being repeated regularly in /var/log/messages
*libvirtd[1956]: End of file while reading data: Input/output error*
Anyone have seen that happening ?? Any idea where should I dig more ??
Br.
Umar
7 years, 10 months
[libvirt] [PATCH] HACKING: Reduce vertical whitespace
by Andrea Bolognani
When generating the plain text version of the contributor
guidelines we add a ludicrous amount of vertical whitespace
in some spots. Tweak the XSLT stylesheet and regenerate the
now much better looking file.
---
I still think the plain text HACKING file should just be a
very minimal stub explaining potential contributors how to
build the HTML version and pointing them to it, but that's
a discussion to have (again) another day: as long as we're
generating this file, it might as well look good :)
HACKING | 32 --------------------------------
docs/hacking2.xsl | 13 ++++---------
2 files changed, 4 insertions(+), 41 deletions(-)
diff --git a/HACKING b/HACKING
index 1952856..c2cb037 100644
--- a/HACKING
+++ b/HACKING
@@ -14,21 +14,15 @@ General tips for contributing patches
(1) Discuss any large changes on the mailing list first. Post patches early and
listen to feedback.
-
-
(2) Official upstream repository is kept in git ("git://libvirt.org/libvirt.git")
and is browsable along with other libvirt-related repositories (e.g.
libvirt-python) online <http://libvirt.org/git/>.
-
-
(3) Patches to translations are maintained via the zanata project
<https://fedora.zanata.org/>. If you want to fix a translation in a .po file,
join the appropriate language team. The libvirt release process automatically
pulls the latest version of each translation file from zanata.
-
-
(4) Post patches using "git send-email", with git rename detection enabled. You
need a one-time setup of:
@@ -71,8 +65,6 @@ Moreover, such patch needs to be prefixed correctly with
"--subject-prefix=PATCHv2" appended to "git send-email" (substitute "v2" with
the correct version if needed though).
-
-
(5) In your commit message, make the summary line reasonably short (60 characters
is typical), followed by a blank line, followed by any longer description of
why your patch makes sense. If the patch fixes a regression, and you know what
@@ -83,8 +75,6 @@ You can use 'git shortlog -30' to get an idea of typical summary lines.
Libvirt does not currently attach any meaning to Signed-off-by: lines, so it
is up to you if you want to include or omit them in the commit message.
-
-
(6) Split large changes into a series of smaller patches, self-contained if
possible, with an explanation of each patch and an explanation of how the
sequence of patches fits together. Moreover, please keep in mind that it's
@@ -94,13 +84,9 @@ of a series, but intermediate patches must compile and not cause test-suite
failures (this is to preserve the usefulness of "git bisect", among other
things).
-
-
(7) Make sure your patches apply against libvirt GIT. Developers only follow GIT
and don't care much about released versions.
-
-
(8) Run the automated tests on your code before submitting any changes. In
particular, configure with compile warnings set to -Werror. This is done
automatically for a git checkout; from a tarball, use:
@@ -163,8 +149,6 @@ the file is stored.
VIR_TEST_FILE_ACCESS=1 VIR_TEST_FILE_ACCESS_OUTPUT="/tmp/file_access.txt" ./qemuxml2argvtest
-
-
(9) The Valgrind test should produce similar output to "make check". If the output
has traces within libvirt API's, then investigation is required in order to
determine the cause of the issue. Output such as the following indicates some
@@ -239,15 +223,9 @@ to "tests/.valgrind.supp" in order to suppress the warning:
obj:*/lib*/ld-2.*so*
}
-
-
(10) Update tests and/or documentation, particularly if you are adding a new
feature or changing the output of a program.
-
-
-
-
There is more on this subject, including lots of links to background reading
on the subject, on Richard Jones' guide to working with open source projects
<http://people.redhat.com/rjones/how-to-supply-code-to-open-source-projects/>.
@@ -585,8 +563,6 @@ true) ...". Rather, write "if (seen)...".
-
-
Of course, take all of the above with a grain of salt. If you're about to use
some system interface that requires a type like "size_t", "pid_t" or "off_t",
use matching types for any corresponding variables.
@@ -698,8 +674,6 @@ size:
-
-
File handling
=============
Usage of the "fdopen()", "close()", "fclose()" APIs is deprecated in libvirt
@@ -743,8 +717,6 @@ APIs, use the macros from virfile.h
-
-
String comparisons
==================
Do not use the strcmp, strncmp, etc functions directly. Instead use one of the
@@ -792,8 +764,6 @@ following semantically named macros
-
-
String copying
==============
Do not use the strncpy function. According to the man page, it does *not*
@@ -962,8 +932,6 @@ by further potentially failing calls. You should almost certainly be using a
conditional and a block instead of a goto. Perhaps some of your function's
logic would be better pulled out into a helper function.
-
-
Although libvirt does not encourage the Linux kernel wind/unwind style of
multiple labels, there's a good general discussion of the issue archived at
KernelTrap <http://kerneltrap.org/node/553/2131>
diff --git a/docs/hacking2.xsl b/docs/hacking2.xsl
index 1c9271f..3595b7e 100644
--- a/docs/hacking2.xsl
+++ b/docs/hacking2.xsl
@@ -37,6 +37,8 @@ from docs/hacking.html.in!
<xsl:value-of select="normalize-space(.)"/>
<xsl:text>
</xsl:text>======================
+
+
</xsl:template>
@@ -93,20 +95,13 @@ from docs/hacking.html.in!
-<xsl:template match="html:ol|html:ul|html:p">
+<xsl:template match="html:p">
<xsl:apply-templates/><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
</xsl:template>
-<xsl:template match="html:ol/html:li">
-<xsl:choose>
-<xsl:when test=".//node()[position()=last()]/self::pre">(<xsl:value-of select="position()"/>) <xsl:apply-templates/>
-</xsl:when>
-<!-- only append two newlines when the last element isn't a pre element -->
-<xsl:otherwise>(<xsl:value-of select="position()"/>) <xsl:apply-templates/><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
-</xsl:otherwise>
-</xsl:choose>
+<xsl:template match="html:ol/html:li">(<xsl:value-of select="position()"/>) <xsl:apply-templates/>
</xsl:template>
--
2.7.4
7 years, 10 months
[libvirt] [PATCH 0/3] qemu: Couple of namespace fixes
by Michal Privoznik
*** BLURB HERE ***
Michal Privoznik (3):
qemu: Handle EEXIST gracefully in qemuDomainCreateDevice
qemuDomainAttachDeviceMknodHelper: unlink() not so often
qemuDomainCreateDevice: Be more careful about device path
src/qemu/qemu_domain.c | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
--
2.11.0
7 years, 10 months
[libvirt] [PATCH] HACKING: Regenerate
by Andrea Bolognani
When updating the source file in commit bd4f4d168660, I forgot
that we also store the generated plain text version in git and
didn't regenerate it.
I also missed one spot that required an additional <p> tag, so
fix both mistakes in one go.
---
Pushed as trivial.
This is the second time I have to clean up after myself today:
clearly not my best morning ever. /me pours more coffee
HACKING | 10 ++++++++++
docs/hacking.html.in | 7 +++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/HACKING b/HACKING
index 3656411..1952856 100644
--- a/HACKING
+++ b/HACKING
@@ -14,15 +14,21 @@ General tips for contributing patches
(1) Discuss any large changes on the mailing list first. Post patches early and
listen to feedback.
+
+
(2) Official upstream repository is kept in git ("git://libvirt.org/libvirt.git")
and is browsable along with other libvirt-related repositories (e.g.
libvirt-python) online <http://libvirt.org/git/>.
+
+
(3) Patches to translations are maintained via the zanata project
<https://fedora.zanata.org/>. If you want to fix a translation in a .po file,
join the appropriate language team. The libvirt release process automatically
pulls the latest version of each translation file from zanata.
+
+
(4) Post patches using "git send-email", with git rename detection enabled. You
need a one-time setup of:
@@ -93,6 +99,8 @@ things).
(7) Make sure your patches apply against libvirt GIT. Developers only follow GIT
and don't care much about released versions.
+
+
(8) Run the automated tests on your code before submitting any changes. In
particular, configure with compile warnings set to -Werror. This is done
automatically for a git checkout; from a tarball, use:
@@ -238,6 +246,8 @@ feature or changing the output of a program.
+
+
There is more on this subject, including lots of links to background reading
on the subject, on Richard Jones' guide to working with open source projects
<http://people.redhat.com/rjones/how-to-supply-code-to-open-source-projects/>.
diff --git a/docs/hacking.html.in b/docs/hacking.html.in
index 13b3640..47475a2 100644
--- a/docs/hacking.html.in
+++ b/docs/hacking.html.in
@@ -289,8 +289,11 @@
}
</pre>
</li>
- <li>Update tests and/or documentation, particularly if you are adding
- a new feature or changing the output of a program.</li>
+
+ <li>
+ <p>Update tests and/or documentation, particularly if you are adding
+ a new feature or changing the output of a program.</p>
+ </li>
</ol>
<p>
--
2.7.4
7 years, 10 months