[libvirt] [PATCH v4 0/3] BSD implementation of virNetDevTapCreate() and virNetDevTapDelete()
by Roman Bogorodskiy
Changes from v3:
* Include linux/if.h header fix so it won't lost why Eric is on vacation
* Fix struct virIfreq definition in case when HAVE_STRUCT_IFREQ is not
defined (thanks to Laine Stump for noticing that)
Roman Bogorodskiy (3):
Make virNetDevSetupControl() public.
BSD: implement virNetDevTapCreate() and virNetDevTapDelete()
portability: use net/if.h instead of linux/if.h
src/libvirt_private.syms | 1 +
src/util/virnetdev.c | 15 ++++-
src/util/virnetdev.h | 15 ++++-
src/util/virnetdevmacvlan.c | 2 +-
src/util/virnetdevtap.c | 118 ++++++++++++++++++++++++++++++++++++++-
src/util/virnetdevvportprofile.c | 2 +-
6 files changed, 146 insertions(+), 7 deletions(-)
--
1.7.11.5
11 years, 6 months
[libvirt] [libvirt-php PATCH 0/2] Block job wrappers and possibility to start VM in paused state
by Tiziano Müller
Following are two patches extending the PHP wrapper a bit:
* first patch adds wrappers for virDomainGetBlockJobInfo and virDomainBlockPull
* second patch makes it possible to start a VM in paused state to start a
Qemu-process for the virDomainBlockPull if no VM is running
Best,
Tiziano
Tiziano Müller (2):
Add wrappers for virDomainGetBlockJobInfo and virDomainBlockPull.
Add optional flags parameter to domain_create
src/libvirt-php.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
src/libvirt-php.h | 2 ++
2 files changed, 89 insertions(+), 4 deletions(-)
--
1.8.2.1
11 years, 6 months
[libvirt] KVM Forum 2013 Call for Participation
by KVM-Forum-2013-PC@redhat.com
=================================================================
KVM Forum 2013: Call For Participation
October 21-23, 2013 - Edinburgh International Conference Centre - Edinburgh, UK
(All submissions must be received before midnight July 21, 2013)
=================================================================
KVM is an industry leading open source hypervisor that provides an ideal
platform for datacenter virtualization, virtual desktop infrastructure,
and cloud computing. Once again, it's time to bring together the
community of developers and users that define the KVM ecosystem for
our annual technical conference. We will discuss the current state of
affairs and plan for the future of KVM, its surrounding infrastructure,
and management tools. The oVirt Workshop will run in parallel with the
KVM Forum again, bringing in a community focused on enterprise datacenter
virtualization management built on KVM. For topics which overlap we will
have shared sessions. So mark your calendar and join us in advancing KVM.
http://events.linuxfoundation.org/events/kvm-forum/
Once again we are colocated with The Linux Foundation's LinuxCon Europe.
KVM Forum attendees will be able to attend oVirt Workshop sessions and
are eligible to attend LinuxCon Europe for a discounted rate.
http://events.linuxfoundation.org/events/kvm-forum/register
We invite you to lead part of the discussion by submitting a speaking
proposal for KVM Forum 2013.
http://events.linuxfoundation.org/cfp
Suggested topics:
KVM/Kernel
- Scaling and performance
- Nested virtualization
- I/O improvements
- VFIO, device assignment, SR-IOV
- Driver domains
- Time keeping
- Resource management (cpu, memory, i/o)
- Memory management (page sharing, swapping, huge pages, etc)
- Network virtualization
- Security
- Architecture ports
QEMU
- Device model improvements
- New devices and chipsets
- Scaling and performance
- Desktop virtualization
- Spice
- Increasing robustness and hardening
- Security model
- Management interfaces
- QMP protocol and implementation
- Image formats
- Firmware (SeaBIOS, OVMF, UEFI, etc)
- Live migration
- Live snapshots and merging
- Fault tolerance, high availability, continuous backup
- Real-time guest support
Virtio
- Speeding up existing devices
- Alternatives
- Virtio on non-Linux or non-virtualized
Management infrastructure
- oVirt (shared track w/ oVirt Workshop)
- Libvirt
- KVM autotest
- OpenStack
- Network virtualization management
- Enterprise storage management
Cloud computing
- Scalable storage
- Virtual networking
- Security
- Provisioning
SUBMISSION REQUIREMENTS
Abstracts due: July 21, 2013
Notification: August 1, 2013
Please submit a short abstract (~150 words) describing your presentation
proposal. In your submission please note how long your talk will take.
Slots vary in length up to 45 minutes. Also include in your proposal
the proposal type -- one of:
- technical talk
- end-user talk
- birds of a feather (BOF) session
Submit your proposal here:
http://events.linuxfoundation.org/cfp
You will receive a notification whether or not your presentation proposal
was accepted by Aug 1st.
END-USER COLLABORATION
One of the big challenges as developers is to know what, where and how
people actually use our software. We will reserve a few slots for end
users talking about their deployment challenges and achievements.
If you are using KVM in production you are encouraged submit a speaking
proposal. Simply mark it as an end-user collaboration proposal. As an
end user, this is a unique opportunity to get your input to developers.
BOF SESSION
We will reserve some slots in the evening after the main conference
tracks, for birds of a feather (BOF) sessions. These sessions will be
less formal than presentation tracks and targetted for people who would
like to discuss specific issues with other developers and/or users.
If you are interested in getting developers and/or uses together to
discuss a specific problem, please submit a BOF proposal.
HOTEL / TRAVEL
The KVM Forum 2013 will be held in Edinburgh, UK at the Edinburgh
International Conference Centre.
http://events.linuxfoundation.org/events/kvm-forum/hotel
Thank you for your interest in KVM. We're looking forward to your
submissions and seeing you at the KVM Forum 2013 in October!
Thanks,
-your KVM Forum 2013 Program Committee
Please contact us with any questions or comments.
KVM-Forum-2013-PC(a)redhat.com
11 years, 6 months
[libvirt] VM waiting to start long time
by Cuongds
Hi all,
I'm have problem with my ovirt. Yesterday, my ovirt nodes (4 nodes) still
working fine but today i cannot start vm on one of ovirt nodes (node 2),
other node are fine. The status holding "waiting to start" when i try start
vm (new or old vm has same result)
Log vdsm as below: Many attempting connect to vdsm
VM Channels Listener::DEBUG::2013-06-14 17:00:57,563::guestIF::95::vm.Vm::
(_connect) vmId=`ffd60b1c-9a3c-4853-88aa-7973f9756c96`::Attempting
connection to /var/lib/libvirt/qemu/channels/4000570-
01.com.redhat.rhevm.vdsm
VM Channels Listener::DEBUG::2013-06-14 17:00:58,565::vmChannels::104::vds::
(_handle_unconnected) Trying to connect fileno 32.
VM Channels Listener::DEBUG::2013-06-14 17:00:58,565::guestIF::95::vm.Vm::
(_connect) vmId=`187f61c9-d81f-491a-b5f0-4798ec6c8342`::Attempting
connection to /var/lib/libvirt/qemu/channels/4000565-
01.com.redhat.rhevm.vdsm
VM Channels Listener::DEBUG::2013-06-14 17:00:58,565::vmChannels::104::vds::
(_handle_unconnected) Trying to connect fileno 33.
VM Channels Listener::DEBUG::2013-06-14 17:00:58,565::guestIF::95::vm.Vm::
(_connect) vmId=`6c3074ae-c752-4622-94e7-a4ca09b252f7`::Attempting
connection to /var/lib/libvirt/qemu/channels/4000563-
02.com.redhat.rhevm.vdsm
VM Channels Listener::DEBUG::2013-06-14 17:00:58,565::vmChannels::104::vds::
(_handle_unconnected) Trying to connect fileno 35.
VM Channels Listener::DEBUG::2013-06-14 17:00:58,566::guestIF::95::vm.Vm::
(_connect) vmId=`20f144cd-f027-4710-a433-dcdc62eec554`::Attempting
connection to /var/lib/libvirt/qemu/channels/4000568-
01.com.redhat.rhevm.vdsm
VM Channels Listener::DEBUG::2013-06-14 17:00:58,566::vmChannels::104::vds::
(_handle_unconnected) Trying to connect fileno 37.
VM Channels Listener::DEBUG::2013-06-14 17:00:58,566::guestIF::95::vm.Vm::
(_connect) vmId=`ffd60b1c-9a3c-4853-88aa-7973f9756c96`::Attempting
connection to /var/lib/libvirt/qemu/channels/4000570-
01.com.redhat.rhevm.vdsm
VM Channels Listener::DEBUG::2013-06-14 17:00:59,567::vmChannels::104::vds::
(_handle_unconnected) Trying to connect fileno 32.
VM Channels Listener::DEBUG::2013-06-14 17:00:59,567::guestIF::95::vm.Vm::
(_connect) vmId=`187f61c9-d81f-491a-b5f0-4798ec6c8342`::Attempting
connection to /var/lib/libvirt/qemu/channels/4000565-
01.com.redhat.rhevm.vdsm
VM Channels Listener::DEBUG::2013-06-14 17:00:59,567::vmChannels::104::vds::
(_handle_unconnected) Trying to connect fileno 33.
VM Channels Listener::DEBUG::2013-06-14 17:00:59,568::guestIF::95::vm.Vm::
(_connect) vmId=`6c3074ae-c752-4622-94e7-a4ca09b252f7`::Attempting
connection to /var/lib/libvirt/qemu/channels/4000563-
02.com.redhat.rhevm.vdsm
VM Channels Listener::DEBUG::2013-06-14 17:00:59,568::vmChannels::104::vds::
(_handle_unconnected) Trying to connect fileno 35.
VM Channels Listener::DEBUG::2013-06-14 17:00:59,568::guestIF::95::vm.Vm::
(_connect) vmId=`20f144cd-f027-4710-a433-dcdc62eec554`::Attempting
connection to /var/lib/libvirt/qemu/channels/4000568-
01.com.redhat.rhevm.vdsm
VM Channels Listener::DEBUG::2013-06-14 17:00:59,568::vmChannels::104::vds::
(_handle_unconnected) Trying to connect fileno 37.
VM Channels Listener::DEBUG::2013-06-14 17:00:59,569::guestIF::95::vm.Vm::
(_connect) vmId=`ffd60b1c-9a3c-4853-88aa-7973f9756c96`::Attempting
connection to /var/lib/libvirt/qemu/channels/4000570-
01.com.redhat.rhevm.vdsm
VM Channels Listener::DEBUG::2013-06-14 17:01:00,569::vmChannels::104::vds::
(_handle_unconnected) Trying to connect fileno 32.
VM Channels Listener::DEBUG::2013-06-14 17:01:00,569::guestIF::95::vm.Vm::
(_connect) vmId=`187f61c9-d81f-491a-b5f0-4798ec6c8342`::Attempting
connection to /var/lib/libvirt/qemu/channels/4000565-
01.com.redhat.rhevm.vdsm
VM Channels Listener::DEBUG::2013-06-14 17:01:00,570::vmChannels::104::vds::
(_handle_unconnected) Trying to connect fileno 33.
VM Channels Listener::DEBUG::2013-06-14 17:01:00,570::guestIF::95::vm.Vm::
(_connect) vmId=`6c3074ae-c752-4622-94e7-a4ca09b252f7`::Attempting
connection to /var/lib/libvirt/qemu/channels/4000563-
02.com.redhat.rhevm.vdsm
VM Channels Listener::DEBUG::2013-06-14 17:01:00,570::vmChannels::104::vds::
(_handle_unconnected) Trying to connect fileno 35.
VM Channels Listener::DEBUG::2013-06-14 17:01:00,570::guestIF::95::vm.Vm::
(_connect) vmId=`20f144cd-f027-4710-a433-dcdc62eec554`::Attempting
connection to /var/lib/libvirt/qemu/channels/4000568-
01.com.redhat.rhevm.vdsm
On ovirt portal, the status of node 2 not update, when i tried to start new
vm the number vm increase but when i stop vm or even delete them, this
number vm's still skip
Please help me debug this, sorry about my bad E.
Thanks,
11 years, 6 months
[libvirt] [PATCH] LXC: s/chroot/chdir in lxcContainerPivotRoot()
by Richard Weinberger
...fixes a trivial copy&paste error.
Signed-off-by: Richard Weinberger <richard(a)nod.at>
---
src/lxc/lxc_container.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 7531fea..c4056c3 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -653,11 +653,11 @@ static int lxcContainerPivotRoot(virDomainFSDefPtr root)
}
}
- /* Now we chroot into the tmpfs, then pivot into the
+ /* Now we chdir into the tmpfs, then pivot into the
* root->src bind-mounted onto '/new' */
if (chdir(newroot) < 0) {
virReportSystemError(errno,
- _("Failed to chroot into %s"), newroot);
+ _("Failed to chdir into %s"), newroot);
goto err;
}
--
1.8.1.4
11 years, 6 months
[libvirt] [PATCH] remote: Fix client crash when URI path is empty when using ssh
by Peter Krempa
The parsed path in the URI may be NULL resulting into:
$ virsh -c qemu+ssh:// list
Segmentation fault (core dumped)
Introduced by 22d81ceb46ea4b83ad817c29b2b04df27a09c671
---
src/remote/remote_driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index bd5646a..87c61f4 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -633,7 +633,7 @@ doRemoteOpen(virConnectPtr conn,
case trans_libssh2:
if (!sockname) {
/* Right now we don't support default session connections */
- if (STREQ(conn->uri->path, "/session")) {
+ if (STREQ_NULLABLE(conn->uri->path, "/session")) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("Connecting to session instance without "
"socket path is not supported by the libssh2 "
@@ -710,7 +710,7 @@ doRemoteOpen(virConnectPtr conn,
if (!sockname) {
/* Right now we don't support default session connections */
- if (STREQ(conn->uri->path, "/session")) {
+ if (STREQ_NULLABLE(conn->uri->path, "/session")) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("Connecting to session instance without "
"socket path is not supported by the ssh "
--
1.8.2.1
11 years, 6 months
[libvirt] [PATCH] LXC: Check container init path after pivot_root()
by Richard Weinberger
Currently we check the path before changing the root directory.
This cannot work. Do the check after pivot_root() such that
we check for the patch within the correct root.
Signed-off-by: Richard Weinberger <richard(a)nod.at>
---
src/lxc/lxc_container.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index a003ec8..7531fea 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -1948,13 +1948,6 @@ static int lxcContainerChild(void *data)
if (lxcContainerResolveSymlinks(vmDef) < 0)
goto cleanup;
- if (!virFileExists(vmDef->os.init)) {
- virReportSystemError(errno,
- _("cannot find init path '%s' relative to container root"),
- vmDef->os.init);
- goto cleanup;
- }
-
/* Wait for interface devices to show up */
if (lxcContainerWaitForContinue(argv->monitor) < 0) {
virReportSystemError(errno, "%s",
@@ -1996,6 +1989,13 @@ static int lxcContainerChild(void *data)
argv->securityDriver) < 0)
goto cleanup;
+ if (!virFileExists(vmDef->os.init)) {
+ virReportSystemError(errno,
+ _("cannot find init path '%s' relative to container root"),
+ vmDef->os.init);
+ goto cleanup;
+ }
+
/* rename and enable interfaces */
if (lxcContainerRenameAndEnableInterfaces(!!(vmDef->features &
(1 << VIR_DOMAIN_FEATURE_PRIVNET)),
--
1.8.1.4
11 years, 6 months
[libvirt] [PATCH] LXC: Ensure the init task of container comes from container
by Gao feng
Richard found libvirt_lxc execs the lxc init programs within
the wrong rootfs context, we should run this init task from
the rootfs of container.
So chroot to the root directory of container, Make sure
libvirt_lxc execs the right lxc init program.
Signed-off-by: Gao feng <gaofeng(a)cn.fujitsu.com>
---
src/lxc/lxc_container.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 181f6c8..4edff15 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -645,8 +645,9 @@ static int lxcContainerPivotRoot(virDomainFSDefPtr root)
goto err;
}
- /* CWD is undefined after pivot_root, so go to / */
- if (chdir("/") < 0)
+ /* CWD is undefined after pivot_root, so go to /,
+ * and chroot to the new root directroy */
+ if (chdir("/") < 0 || chroot(".") < 0)
goto err;
ret = 0;
--
1.8.1.4
11 years, 6 months
[libvirt] [PATCH] remote: Forbid default "/session" connections when using ssh transport
by Peter Krempa
Without the socket path explicitly specified, the remote driver tried to
connect to the "/system" instance socket even if "/session" was
specified in the uri. With this patch this configuration now produces an
error.
It is still possible to initiate a session connection with specifying
the path to the socket manually and also manually starting the session
daemon. This was also possible prior to this patch,
This is a minimal fix. We may decide to support remote session
connections using ssh but this will require changes to the remote driver
code so this fix shouldn't cause regressions in the case we decide to do
that.
---
src/remote/remote_driver.c | 40 ++++++++++++++++++++++++++++++----------
1 file changed, 30 insertions(+), 10 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index fcf45d3..bd5646a 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -631,11 +631,21 @@ doRemoteOpen(virConnectPtr conn,
break;
case trans_libssh2:
- if (!sockname &&
- VIR_STRDUP(sockname,
- flags & VIR_DRV_OPEN_REMOTE_RO ?
- LIBVIRTD_PRIV_UNIX_SOCKET_RO : LIBVIRTD_PRIV_UNIX_SOCKET) < 0)
- goto failed;
+ if (!sockname) {
+ /* Right now we don't support default session connections */
+ if (STREQ(conn->uri->path, "/session")) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("Connecting to session instance without "
+ "socket path is not supported by the libssh2 "
+ "connection driver"));
+ goto failed;
+ }
+
+ if (VIR_STRDUP(sockname,
+ flags & VIR_DRV_OPEN_REMOTE_RO ?
+ LIBVIRTD_PRIV_UNIX_SOCKET_RO : LIBVIRTD_PRIV_UNIX_SOCKET) < 0)
+ goto failed;
+ }
VIR_DEBUG("Starting LibSSH2 session");
@@ -698,11 +708,21 @@ doRemoteOpen(virConnectPtr conn,
if (!command && VIR_STRDUP(command, "ssh") < 0)
goto failed;
- if (!sockname &&
- VIR_STRDUP(sockname,
- flags & VIR_DRV_OPEN_REMOTE_RO ?
- LIBVIRTD_PRIV_UNIX_SOCKET_RO : LIBVIRTD_PRIV_UNIX_SOCKET) < 0)
- goto failed;
+ if (!sockname) {
+ /* Right now we don't support default session connections */
+ if (STREQ(conn->uri->path, "/session")) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("Connecting to session instance without "
+ "socket path is not supported by the ssh "
+ "connection driver"));
+ goto failed;
+ }
+
+ if (VIR_STRDUP(sockname,
+ flags & VIR_DRV_OPEN_REMOTE_RO ?
+ LIBVIRTD_PRIV_UNIX_SOCKET_RO : LIBVIRTD_PRIV_UNIX_SOCKET) < 0)
+ goto failed;
+ }
if (!(priv->client = virNetClientNewSSH(priv->hostname,
port,
--
1.8.2.1
11 years, 6 months
[libvirt] [PATCH] Implement dispose method for libxlDomainObjPrivate
by Frediano Ziglio
When creating a timer/event handler reference counting is used. So it could
be possible (in theory) that libxlDomainObjPrivateFree is called with
reference counting >1. The problem is that libxlDomainObjPrivateFree leave
the object in an invalid state with ctx freed (but still having dandling
pointer). This can lead timer/event handler to core.
This patch destroy the object before disposing it so at timer/event object
is still valid.
Signed-off-by: Frediano Ziglio <frediano.ziglio(a)citrix.com>
---
src/libxl/libxl_driver.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 935919b..1c8cfd7 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -110,6 +110,8 @@ static int
libxlVmStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
bool start_paused, int restore_fd);
+static void libxlDomainObjPrivateDispose(void *obj);
+
/* Function definitions */
static int
libxlDomainObjPrivateOnceInit(void)
@@ -117,7 +119,7 @@ libxlDomainObjPrivateOnceInit(void)
if (!(libxlDomainObjPrivateClass = virClassNew(virClassForObjectLockable(),
"libxlDomainObjPrivate",
sizeof(libxlDomainObjPrivate),
- NULL)))
+ libxlDomainObjPrivateDispose)))
return -1;
return 0;
@@ -418,14 +420,26 @@ libxlDomainObjPrivateAlloc(void)
}
static void
-libxlDomainObjPrivateFree(void *data)
+libxlDomainObjPrivateDispose(void *obj)
{
- libxlDomainObjPrivatePtr priv = data;
+ libxlDomainObjPrivatePtr priv = obj;
if (priv->deathW)
libxl_evdisable_domain_death(priv->ctx, priv->deathW);
libxl_ctx_free(priv->ctx);
+}
+
+static void
+libxlDomainObjPrivateFree(void *data)
+{
+ libxlDomainObjPrivatePtr priv = data;
+
+ if (priv->deathW) {
+ libxl_evdisable_domain_death(priv->ctx, priv->deathW);
+ priv->deathW = NULL;
+ }
+
virObjectUnref(priv);
}
--
1.7.10.4
11 years, 6 months