[libvirt] [PATCH 0/3] Test case for fdstream / iohelper code
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
There was a recent embarassing regression in the fdstream
iohelper code which broke many commands/APIs. The problem
code in question is quite easily testable via the unit tests.
Daniel P. Berrange (3):
Add a virGetLastErrorMessage() function
Allow the iohelper path to be customized by test programs
Add a test case for the fdstream file read/write code
.gitignore | 1 +
include/libvirt/virterror.h | 2 +
src/fdstream.c | 14 +-
src/fdstream.h | 3 +
src/libvirt_private.syms | 1 +
src/libvirt_public.syms | 5 +
src/util/virerror.c | 21 +++
tests/Makefile.am | 5 +
tests/fdstreamtest.c | 353 ++++++++++++++++++++++++++++++++++++++++++++
9 files changed, 404 insertions(+), 1 deletion(-)
create mode 100644 tests/fdstreamtest.c
--
1.8.2.1
11 years, 6 months
[libvirt] [PATCH] Fix iohelper usage with streams opened for read
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
In b2878ed860ceceec3cd6481424fed0b543b687cd we added the O_NOCTTY
flag when opening files in the stream code. Unfortunately a later
piece of code was comparing the flags == O_RDONLY, without masking
out the non-access mode flags. This broke the iohelper when used
with streams for read, since it caused us to attach the stream
output pipe to the stream input FD instead of output FD :-(
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/fdstream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/fdstream.c b/src/fdstream.c
index 6f8ce53..a9a4851 100644
--- a/src/fdstream.c
+++ b/src/fdstream.c
@@ -641,7 +641,7 @@ virFDStreamOpenFileInternal(virStreamPtr st,
virCommandTransferFD(cmd, fd);
virCommandAddArgFormat(cmd, "%d", fd);
- if (oflags == O_RDONLY) {
+ if ((oflags & O_ACCMODE) == O_RDONLY) {
childfd = fds[1];
fd = fds[0];
virCommandSetOutputFD(cmd, &childfd);
--
1.8.2.1
11 years, 6 months
[libvirt] [PATCH] Build breaker - requires VIR_FROM_THIS
by John Ferlan
Push under build-breaker
---
tests/storagebackendsheepdogtest.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/storagebackendsheepdogtest.c b/tests/storagebackendsheepdogtest.c
index 39b2299..d4fa479 100644
--- a/tests/storagebackendsheepdogtest.c
+++ b/tests/storagebackendsheepdogtest.c
@@ -34,6 +34,7 @@
#include "storage/storage_backend_sheepdog.h"
#include "virstring.h"
+#define VIR_FROM_THIS VIR_FROM_NONE
typedef struct {
const char *output;
--
1.8.1.4
11 years, 6 months
[libvirt] [libvirt-java] [PATCH] trivial remove unused imports
by Stefan Majer
Signed-off-by: Stefan Majer <stefan.majer at gmail dot com>
---
src/main/java/org/libvirt/jna/Libvirt.java | 1 -
src/main/java/org/libvirt/jna/virError.java | 1 -
2 files changed, 2 deletions(-)
diff --git a/src/main/java/org/libvirt/jna/Libvirt.java
b/src/main/java/org/libvirt/jna/Libvirt.java
index 0a5e372..6da368f 100644
--- a/src/main/java/org/libvirt/jna/Libvirt.java
+++ b/src/main/java/org/libvirt/jna/Libvirt.java
@@ -7,7 +7,6 @@ import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;
import com.sun.jna.ptr.IntByReference;
import com.sun.jna.ptr.LongByReference;
-import com.sun.jna.ptr.PointerByReference;
/**
* The libvirt interface which is exposed via JNA. The complete API is
diff --git a/src/main/java/org/libvirt/jna/virError.java
b/src/main/java/org/libvirt/jna/virError.java
index 3c11311..36b9f69 100644
--- a/src/main/java/org/libvirt/jna/virError.java
+++ b/src/main/java/org/libvirt/jna/virError.java
@@ -3,7 +3,6 @@ package org.libvirt.jna;
import java.util.Arrays;
import java.util.List;
-import com.sun.jna.Pointer;
import com.sun.jna.Structure;
/**
--
1.8.1.2
--
Stefan Majer
11 years, 6 months
[libvirt] [PATCH 0/6 v3] Support NBD volumes with LXC containers
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
A third version of:
https://www.redhat.com/archives/libvir-list/2013-April/msg01539.html
In v3
- Split patch 3 into 2 pieces
- Added XML formatting tests
- Fixed XML formatting
- Remove !! from vars that are now bools
Daniel P. Berrange (6):
Add support for storage format in FS <driver>
Re-arrange code setting up ifs/disk loop devices for LXC
Fix error handling of readdir() in virFileLoopDeviceOpen
Add a helper API for setting up a NBD device with qemu-nbd
Add 'nbd' as a valid filesystem driver type
Support NBD backed disks/filesystems in LXC driver
docs/formatdomain.html.in | 25 +++++
docs/schemas/domaincommon.rng | 74 +++++++++++----
src/conf/domain_conf.c | 33 +++++--
src/conf/domain_conf.h | 7 +-
src/libvirt_private.syms | 1 +
src/lxc/lxc_controller.c | 152 ++++++++++++++++++++++-------
src/qemu/qemu_command.c | 4 +-
src/util/virfile.c | 153 +++++++++++++++++++++++++++++-
src/util/virfile.h | 6 ++
tests/lxcxml2xmldata/lxc-disk-formats.xml | 31 ++++++
tests/lxcxml2xmltest.c | 1 +
11 files changed, 421 insertions(+), 66 deletions(-)
create mode 100644 tests/lxcxml2xmldata/lxc-disk-formats.xml
--
1.8.2.1
11 years, 6 months
[libvirt] [PATCH] virGetStorageVol: Don't ignore NULL pool name
by Michal Privoznik
The function takes pool name as argument. However,
it is not acceptable for it to be NULL. Hence, we
should check it and report error in case it is.
---
src/datatypes.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/datatypes.c b/src/datatypes.c
index f815b6c..884eb3e 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -520,6 +520,7 @@ virGetStorageVol(virConnectPtr conn, const char *pool, const char *name,
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
return NULL;
}
+ virCheckNonNullArgReturn(pool, NULL);
virCheckNonNullArgReturn(name, NULL);
virCheckNonNullArgReturn(key, NULL);
--
1.8.2.1
11 years, 6 months
[libvirt] [PATCH 0/2] Domain event example C code misues api
by Jesse J. Cook
From: "Jesse J. Cook" <jcook(a)camber.com>
The example program makes a call to virEventRegisterDefaultImpl before calling
virConnectOpen without a call to virInitialize. Interestingly enough, the
example code works. However, once you introduce a call to g_string_new it
breaks. This can result in unintentional misuse of the API.
Relates to: Red Hat Bugzilla – Bug 961155
Jesse J. Cook (2):
dom event example: init before register event impl
dom event example: Add error check to impl call
examples/domain-events/events-c/event-test.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--
1.7.10.4
11 years, 6 months
[libvirt] [PATCH] Fix naming of methods in ESX storage backends to follow public APIs
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The previous update of method naming missed the ESX storage
backend files. Update them is that the driver impl methods
follow the naming of the public API but with s/vir/esx/
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/esx/esx_storage_backend_iscsi.c | 104 ++++++++++++++++++------------------
src/esx/esx_storage_backend_vmfs.c | 104 ++++++++++++++++++------------------
2 files changed, 104 insertions(+), 104 deletions(-)
diff --git a/src/esx/esx_storage_backend_iscsi.c b/src/esx/esx_storage_backend_iscsi.c
index a22adb4..d91d7b0 100644
--- a/src/esx/esx_storage_backend_iscsi.c
+++ b/src/esx/esx_storage_backend_iscsi.c
@@ -51,7 +51,7 @@ verify(MD5_DIGEST_SIZE == VIR_UUID_BUFLEN);
static int
-esxStorageBackendISCSINumberOfPools(virConnectPtr conn)
+esxConnectNumOfStoragePools(virConnectPtr conn)
{
bool success = false;
int count = 0;
@@ -95,8 +95,8 @@ esxStorageBackendISCSINumberOfPools(virConnectPtr conn)
static int
-esxStorageBackendISCSIListPools(virConnectPtr conn, char **const names,
- const int maxnames)
+esxConnectListStoragePools(virConnectPtr conn, char **const names,
+ const int maxnames)
{
bool success = false;
int count = 0;
@@ -154,8 +154,8 @@ esxStorageBackendISCSIListPools(virConnectPtr conn, char **const names,
static virStoragePoolPtr
-esxStorageBackendISCSIPoolLookupByName(virConnectPtr conn,
- const char *name)
+esxStoragePoolLookupByName(virConnectPtr conn,
+ const char *name)
{
esxPrivate *priv = conn->storagePrivateData;
esxVI_HostInternetScsiHbaStaticTarget *target = NULL;
@@ -196,8 +196,8 @@ esxStorageBackendISCSIPoolLookupByName(virConnectPtr conn,
static virStoragePoolPtr
-esxStorageBackendISCSIPoolLookupByUUID(virConnectPtr conn,
- const unsigned char *uuid)
+esxStoragePoolLookupByUUID(virConnectPtr conn,
+ const unsigned char *uuid)
{
virStoragePoolPtr pool = NULL;
esxPrivate *priv = conn->storagePrivateData;
@@ -245,8 +245,8 @@ esxStorageBackendISCSIPoolLookupByUUID(virConnectPtr conn,
static int
-esxStorageBackendISCSIPoolRefresh(virStoragePoolPtr pool,
- unsigned int flags)
+esxStoragePoolRefresh(virStoragePoolPtr pool,
+ unsigned int flags)
{
int result = -1;
esxPrivate *priv = pool->conn->storagePrivateData;
@@ -280,8 +280,8 @@ esxStorageBackendISCSIPoolRefresh(virStoragePoolPtr pool,
static int
-esxStorageBackendISCSIPoolGetInfo(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
- virStoragePoolInfoPtr info)
+esxStoragePoolGetInfo(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
+ virStoragePoolInfoPtr info)
{
/* These fields are not valid for iSCSI pool */
info->allocation = info->capacity = info->available = 0;
@@ -293,7 +293,7 @@ esxStorageBackendISCSIPoolGetInfo(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
static char *
-esxStorageBackendISCSIPoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
+esxStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
{
char *xml = NULL;
esxPrivate *priv = pool->conn->storagePrivateData;
@@ -358,7 +358,7 @@ esxStorageBackendISCSIPoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
static int
-esxStorageBackendISCSIPoolNumberOfVolumes(virStoragePoolPtr pool)
+esxStoragePoolNumOfVolumes(virStoragePoolPtr pool)
{
int count = 0;
esxPrivate *priv = pool->conn->storagePrivateData;
@@ -384,8 +384,8 @@ esxStorageBackendISCSIPoolNumberOfVolumes(virStoragePoolPtr pool)
static int
-esxStorageBackendISCSIPoolListVolumes(virStoragePoolPtr pool, char **const names,
- int maxnames)
+esxStoragePoolListVolumes(virStoragePoolPtr pool, char **const names,
+ int maxnames)
{
bool success = false;
int count = 0;
@@ -444,8 +444,8 @@ esxStorageBackendISCSIPoolListVolumes(virStoragePoolPtr pool, char **const names
static virStorageVolPtr
-esxStorageBackendISCSIVolumeLookupByName(virStoragePoolPtr pool,
- const char *name)
+esxStorageVolLookupByName(virStoragePoolPtr pool,
+ const char *name)
{
virStorageVolPtr volume = NULL;
esxPrivate *priv = pool->conn->storagePrivateData;
@@ -491,7 +491,7 @@ esxStorageBackendISCSIVolumeLookupByName(virStoragePoolPtr pool,
static virStorageVolPtr
-esxStorageBackendISCSIVolumeLookupByPath(virConnectPtr conn, const char *path)
+esxStorageVolLookupByPath(virConnectPtr conn, const char *path)
{
virStorageVolPtr volume = NULL;
esxPrivate *priv = conn->storagePrivateData;
@@ -539,7 +539,7 @@ esxStorageBackendISCSIVolumeLookupByPath(virConnectPtr conn, const char *path)
static virStorageVolPtr
-esxStorageBackendISCSIVolumeLookupByKey(virConnectPtr conn, const char *key)
+esxStorageVolLookupByKey(virConnectPtr conn, const char *key)
{
virStorageVolPtr volume = NULL;
esxPrivate *priv = conn->storagePrivateData;
@@ -552,7 +552,7 @@ esxStorageBackendISCSIVolumeLookupByKey(virConnectPtr conn, const char *key)
/* key may be LUN device path */
if (STRPREFIX(key, "/")) {
- return esxStorageBackendISCSIVolumeLookupByPath(conn, key);
+ return esxStorageVolLookupByPath(conn, key);
}
if (esxVI_LookupScsiLunList(priv->primary, &scsiLunList) < 0) {
@@ -594,9 +594,9 @@ esxStorageBackendISCSIVolumeLookupByKey(virConnectPtr conn, const char *key)
static virStorageVolPtr
-esxStorageBackendISCSIVolumeCreateXML(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
- const char *xmldesc ATTRIBUTE_UNUSED,
- unsigned int flags)
+esxStorageVolCreateXML(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
+ const char *xmldesc ATTRIBUTE_UNUSED,
+ unsigned int flags)
{
virCheckFlags(0, NULL);
@@ -609,10 +609,10 @@ esxStorageBackendISCSIVolumeCreateXML(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
static virStorageVolPtr
-esxStorageBackendISCSIVolumeCreateXMLFrom(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
- const char *xmldesc ATTRIBUTE_UNUSED,
- virStorageVolPtr sourceVolume ATTRIBUTE_UNUSED,
- unsigned int flags)
+esxStorageVolCreateXMLFrom(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
+ const char *xmldesc ATTRIBUTE_UNUSED,
+ virStorageVolPtr sourceVolume ATTRIBUTE_UNUSED,
+ unsigned int flags)
{
virCheckFlags(0, NULL);
@@ -625,8 +625,8 @@ esxStorageBackendISCSIVolumeCreateXMLFrom(virStoragePoolPtr pool ATTRIBUTE_UNUSE
static char *
-esxStorageBackendISCSIVolumeGetXMLDesc(virStorageVolPtr volume,
- unsigned int flags)
+esxStorageVolGetXMLDesc(virStorageVolPtr volume,
+ unsigned int flags)
{
char *xml = NULL;
esxPrivate *priv = volume->conn->storagePrivateData;
@@ -701,8 +701,8 @@ esxStorageBackendISCSIVolumeGetXMLDesc(virStorageVolPtr volume,
static int
-esxStorageBackendISCSIVolumeDelete(virStorageVolPtr volume ATTRIBUTE_UNUSED,
- unsigned int flags)
+esxStorageVolDelete(virStorageVolPtr volume ATTRIBUTE_UNUSED,
+ unsigned int flags)
{
virCheckFlags(0, -1);
@@ -715,8 +715,8 @@ esxStorageBackendISCSIVolumeDelete(virStorageVolPtr volume ATTRIBUTE_UNUSED,
static int
-esxStorageBackendISCSIVolumeWipe(virStorageVolPtr volume ATTRIBUTE_UNUSED,
- unsigned int flags)
+esxStorageVolWipe(virStorageVolPtr volume ATTRIBUTE_UNUSED,
+ unsigned int flags)
{
virCheckFlags(0, -1);
@@ -730,7 +730,7 @@ esxStorageBackendISCSIVolumeWipe(virStorageVolPtr volume ATTRIBUTE_UNUSED,
static char *
-esxStorageBackendISCSIVolumeGetPath(virStorageVolPtr volume)
+esxStorageVolGetPath(virStorageVolPtr volume)
{
char *path;
@@ -741,22 +741,22 @@ esxStorageBackendISCSIVolumeGetPath(virStorageVolPtr volume)
virStorageDriver esxStorageBackendISCSI = {
- .connectNumOfStoragePools = esxStorageBackendISCSINumberOfPools, /* 1.0.1 */
- .connectListStoragePools = esxStorageBackendISCSIListPools, /* 1.0.1 */
- .storagePoolLookupByName = esxStorageBackendISCSIPoolLookupByName, /* 1.0.1 */
- .storagePoolLookupByUUID = esxStorageBackendISCSIPoolLookupByUUID, /* 1.0.1 */
- .storagePoolRefresh = esxStorageBackendISCSIPoolRefresh, /* 1.0.1 */
- .storagePoolGetInfo = esxStorageBackendISCSIPoolGetInfo, /* 1.0.1 */
- .storagePoolGetXMLDesc = esxStorageBackendISCSIPoolGetXMLDesc, /* 1.0.1 */
- .storagePoolNumOfVolumes = esxStorageBackendISCSIPoolNumberOfVolumes, /* 1.0.1 */
- .storagePoolListVolumes = esxStorageBackendISCSIPoolListVolumes, /* 1.0.1 */
- .storageVolLookupByName = esxStorageBackendISCSIVolumeLookupByName, /* 1.0.1 */
- .storageVolLookupByPath = esxStorageBackendISCSIVolumeLookupByPath, /* 1.0.1 */
- .storageVolLookupByKey = esxStorageBackendISCSIVolumeLookupByKey, /* 1.0.1 */
- .storageVolCreateXML = esxStorageBackendISCSIVolumeCreateXML, /* 1.0.1 */
- .storageVolCreateXMLFrom = esxStorageBackendISCSIVolumeCreateXMLFrom, /* 1.0.1 */
- .storageVolGetXMLDesc = esxStorageBackendISCSIVolumeGetXMLDesc, /* 1.0.1 */
- .storageVolDelete = esxStorageBackendISCSIVolumeDelete, /* 1.0.1 */
- .storageVolWipe = esxStorageBackendISCSIVolumeWipe, /* 1.0.1 */
- .storageVolGetPath = esxStorageBackendISCSIVolumeGetPath, /* 1.0.1 */
+ .connectNumOfStoragePools = esxConnectNumOfStoragePools, /* 1.0.1 */
+ .connectListStoragePools = esxConnectListStoragePools, /* 1.0.1 */
+ .storagePoolLookupByName = esxStoragePoolLookupByName, /* 1.0.1 */
+ .storagePoolLookupByUUID = esxStoragePoolLookupByUUID, /* 1.0.1 */
+ .storagePoolRefresh = esxStoragePoolRefresh, /* 1.0.1 */
+ .storagePoolGetInfo = esxStoragePoolGetInfo, /* 1.0.1 */
+ .storagePoolGetXMLDesc = esxStoragePoolGetXMLDesc, /* 1.0.1 */
+ .storagePoolNumOfVolumes = esxStoragePoolNumOfVolumes, /* 1.0.1 */
+ .storagePoolListVolumes = esxStoragePoolListVolumes, /* 1.0.1 */
+ .storageVolLookupByName = esxStorageVolLookupByName, /* 1.0.1 */
+ .storageVolLookupByPath = esxStorageVolLookupByPath, /* 1.0.1 */
+ .storageVolLookupByKey = esxStorageVolLookupByKey, /* 1.0.1 */
+ .storageVolCreateXML = esxStorageVolCreateXML, /* 1.0.1 */
+ .storageVolCreateXMLFrom = esxStorageVolCreateXMLFrom, /* 1.0.1 */
+ .storageVolGetXMLDesc = esxStorageVolGetXMLDesc, /* 1.0.1 */
+ .storageVolDelete = esxStorageVolDelete, /* 1.0.1 */
+ .storageVolWipe = esxStorageVolWipe, /* 1.0.1 */
+ .storageVolGetPath = esxStorageVolGetPath, /* 1.0.1 */
};
diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backend_vmfs.c
index dd638ad..63974ab 100644
--- a/src/esx/esx_storage_backend_vmfs.c
+++ b/src/esx/esx_storage_backend_vmfs.c
@@ -111,7 +111,7 @@ esxLookupVMFSStoragePoolType(esxVI_Context *ctx, const char *poolName,
static int
-esxStorageBackendVMFSNumberOfPools(virConnectPtr conn)
+esxConnectNumOfStoragePools(virConnectPtr conn)
{
int count = 0;
esxPrivate *priv = conn->storagePrivateData;
@@ -135,8 +135,8 @@ esxStorageBackendVMFSNumberOfPools(virConnectPtr conn)
static int
-esxStorageBackendVMFSListPools(virConnectPtr conn, char **const names,
- const int maxnames)
+esxConnectListStoragePools(virConnectPtr conn, char **const names,
+ const int maxnames)
{
bool success = false;
esxPrivate *priv = conn->storagePrivateData;
@@ -199,8 +199,8 @@ esxStorageBackendVMFSListPools(virConnectPtr conn, char **const names,
static virStoragePoolPtr
-esxStorageBackendVMFSPoolLookupByName(virConnectPtr conn,
- const char *name)
+esxStoragePoolLookupByName(virConnectPtr conn,
+ const char *name)
{
esxPrivate *priv = conn->storagePrivateData;
esxVI_ObjectContent *datastore = NULL;
@@ -252,8 +252,8 @@ esxStorageBackendVMFSPoolLookupByName(virConnectPtr conn,
static virStoragePoolPtr
-esxStorageBackendVMFSPoolLookupByUUID(virConnectPtr conn,
- const unsigned char *uuid)
+esxStoragePoolLookupByUUID(virConnectPtr conn,
+ const unsigned char *uuid)
{
esxPrivate *priv = conn->storagePrivateData;
esxVI_String *propertyNameList = NULL;
@@ -321,7 +321,7 @@ esxStorageBackendVMFSPoolLookupByUUID(virConnectPtr conn,
static int
-esxStorageBackendVMFSPoolRefresh(virStoragePoolPtr pool, unsigned int flags)
+esxStoragePoolRefresh(virStoragePoolPtr pool, unsigned int flags)
{
int result = -1;
esxPrivate *priv = pool->conn->storagePrivateData;
@@ -346,8 +346,8 @@ esxStorageBackendVMFSPoolRefresh(virStoragePoolPtr pool, unsigned int flags)
static int
-esxStorageBackendVMFSPoolGetInfo(virStoragePoolPtr pool,
- virStoragePoolInfoPtr info)
+esxStoragePoolGetInfo(virStoragePoolPtr pool,
+ virStoragePoolInfoPtr info)
{
int result = -1;
esxPrivate *priv = pool->conn->storagePrivateData;
@@ -407,7 +407,7 @@ esxStorageBackendVMFSPoolGetInfo(virStoragePoolPtr pool,
static char *
-esxStorageBackendVMFSPoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
+esxStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
{
esxPrivate *priv = pool->conn->storagePrivateData;
esxVI_String *propertyNameList = NULL;
@@ -527,7 +527,7 @@ esxStorageBackendVMFSPoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
static int
-esxStorageBackendVMFSPoolNumberOfVolumes(virStoragePoolPtr pool)
+esxStoragePoolNumOfVolumes(virStoragePoolPtr pool)
{
bool success = false;
esxPrivate *priv = pool->conn->storagePrivateData;
@@ -561,8 +561,8 @@ esxStorageBackendVMFSPoolNumberOfVolumes(virStoragePoolPtr pool)
static int
-esxStorageBackendVMFSPoolListVolumes(virStoragePoolPtr pool, char **const names,
- int maxnames)
+esxStoragePoolListVolumes(virStoragePoolPtr pool, char **const names,
+ int maxnames)
{
bool success = false;
esxPrivate *priv = pool->conn->storagePrivateData;
@@ -642,8 +642,8 @@ esxStorageBackendVMFSPoolListVolumes(virStoragePoolPtr pool, char **const names,
static virStorageVolPtr
-esxStorageBackendVMFSVolumeLookupByName(virStoragePoolPtr pool,
- const char *name)
+esxStorageVolLookupByName(virStoragePoolPtr pool,
+ const char *name)
{
virStorageVolPtr volume = NULL;
esxPrivate *priv = pool->conn->storagePrivateData;
@@ -673,7 +673,7 @@ esxStorageBackendVMFSVolumeLookupByName(virStoragePoolPtr pool,
static virStorageVolPtr
-esxStorageBackendVMFSVolumeLookupByPath(virConnectPtr conn, const char *path)
+esxStorageVolLookupByPath(virConnectPtr conn, const char *path)
{
virStorageVolPtr volume = NULL;
esxPrivate *priv = conn->storagePrivateData;
@@ -705,7 +705,7 @@ esxStorageBackendVMFSVolumeLookupByPath(virConnectPtr conn, const char *path)
static virStorageVolPtr
-esxStorageBackendVMFSVolumeLookupByKey(virConnectPtr conn, const char *key)
+esxStorageVolLookupByKey(virConnectPtr conn, const char *key)
{
virStorageVolPtr volume = NULL;
esxPrivate *priv = conn->storagePrivateData;
@@ -725,7 +725,7 @@ esxStorageBackendVMFSVolumeLookupByKey(virConnectPtr conn, const char *key)
if (STRPREFIX(key, "[")) {
/* Key is probably a datastore path */
- return esxStorageBackendVMFSVolumeLookupByPath(conn, key);
+ return esxStorageVolLookupByPath(conn, key);
}
if (!priv->primary->hasQueryVirtualDiskUuid) {
@@ -842,9 +842,9 @@ esxStorageBackendVMFSVolumeLookupByKey(virConnectPtr conn, const char *key)
static virStorageVolPtr
-esxStorageBackendVMFSVolumeCreateXML(virStoragePoolPtr pool,
- const char *xmldesc,
- unsigned int flags)
+esxStorageVolCreateXML(virStoragePoolPtr pool,
+ const char *xmldesc,
+ unsigned int flags)
{
virStorageVolPtr volume = NULL;
esxPrivate *priv = pool->conn->storagePrivateData;
@@ -1071,10 +1071,10 @@ esxStorageBackendVMFSVolumeCreateXML(virStoragePoolPtr pool,
static virStorageVolPtr
-esxStorageBackendVMFSVolumeCreateXMLFrom(virStoragePoolPtr pool,
- const char *xmldesc,
- virStorageVolPtr sourceVolume,
- unsigned int flags)
+esxStorageVolCreateXMLFrom(virStoragePoolPtr pool,
+ const char *xmldesc,
+ virStorageVolPtr sourceVolume,
+ unsigned int flags)
{
virStorageVolPtr volume = NULL;
esxPrivate *priv = pool->conn->storagePrivateData;
@@ -1268,7 +1268,7 @@ esxStorageBackendVMFSVolumeCreateXMLFrom(virStoragePoolPtr pool,
static int
-esxStorageBackendVMFSVolumeDelete(virStorageVolPtr volume, unsigned int flags)
+esxStorageVolDelete(virStorageVolPtr volume, unsigned int flags)
{
int result = -1;
esxPrivate *priv = volume->conn->storagePrivateData;
@@ -1313,7 +1313,7 @@ esxStorageBackendVMFSVolumeDelete(virStorageVolPtr volume, unsigned int flags)
static int
-esxStorageBackendVMFSVolumeWipe(virStorageVolPtr volume, unsigned int flags)
+esxStorageVolWipe(virStorageVolPtr volume, unsigned int flags)
{
int result = -1;
esxPrivate *priv = volume->conn->storagePrivateData;
@@ -1358,8 +1358,8 @@ esxStorageBackendVMFSVolumeWipe(virStorageVolPtr volume, unsigned int flags)
static int
-esxStorageBackendVMFSVolumeGetInfo(virStorageVolPtr volume,
- virStorageVolInfoPtr info)
+esxStorageVolGetInfo(virStorageVolPtr volume,
+ virStorageVolInfoPtr info)
{
int result = -1;
esxPrivate *priv = volume->conn->storagePrivateData;
@@ -1405,8 +1405,8 @@ esxStorageBackendVMFSVolumeGetInfo(virStorageVolPtr volume,
static char *
-esxStorageBackendVMFSVolumeGetXMLDesc(virStorageVolPtr volume,
- unsigned int flags)
+esxStorageVolGetXMLDesc(virStorageVolPtr volume,
+ unsigned int flags)
{
esxPrivate *priv = volume->conn->storagePrivateData;
virStoragePoolDef pool;
@@ -1489,7 +1489,7 @@ esxStorageBackendVMFSVolumeGetXMLDesc(virStorageVolPtr volume,
static char *
-esxStorageBackendVMFSVolumeGetPath(virStorageVolPtr volume)
+esxStorageVolGetPath(virStorageVolPtr volume)
{
char *path;
@@ -1504,23 +1504,23 @@ esxStorageBackendVMFSVolumeGetPath(virStorageVolPtr volume)
virStorageDriver esxStorageBackendVMFS = {
- .connectNumOfStoragePools = esxStorageBackendVMFSNumberOfPools, /* 0.8.2 */
- .connectListStoragePools = esxStorageBackendVMFSListPools, /* 0.8.2 */
- .storagePoolLookupByName = esxStorageBackendVMFSPoolLookupByName, /* 0.8.2 */
- .storagePoolLookupByUUID = esxStorageBackendVMFSPoolLookupByUUID, /* 0.8.2 */
- .storagePoolRefresh = esxStorageBackendVMFSPoolRefresh, /* 0.8.2 */
- .storagePoolGetInfo = esxStorageBackendVMFSPoolGetInfo, /* 0.8.2 */
- .storagePoolGetXMLDesc = esxStorageBackendVMFSPoolGetXMLDesc, /* 0.8.2 */
- .storagePoolNumOfVolumes = esxStorageBackendVMFSPoolNumberOfVolumes, /* 0.8.4 */
- .storagePoolListVolumes = esxStorageBackendVMFSPoolListVolumes, /* 0.8.4 */
- .storageVolLookupByName = esxStorageBackendVMFSVolumeLookupByName, /* 0.8.4 */
- .storageVolLookupByPath = esxStorageBackendVMFSVolumeLookupByPath, /* 0.8.4 */
- .storageVolLookupByKey = esxStorageBackendVMFSVolumeLookupByKey, /* 0.8.4 */
- .storageVolCreateXML = esxStorageBackendVMFSVolumeCreateXML, /* 0.8.4 */
- .storageVolCreateXMLFrom = esxStorageBackendVMFSVolumeCreateXMLFrom, /* 0.8.7 */
- .storageVolDelete = esxStorageBackendVMFSVolumeDelete, /* 0.8.7 */
- .storageVolWipe = esxStorageBackendVMFSVolumeWipe, /* 0.8.7 */
- .storageVolGetInfo = esxStorageBackendVMFSVolumeGetInfo, /* 0.8.4 */
- .storageVolGetXMLDesc = esxStorageBackendVMFSVolumeGetXMLDesc, /* 0.8.4 */
- .storageVolGetPath = esxStorageBackendVMFSVolumeGetPath, /* 0.8.4 */
+ .connectNumOfStoragePools = esxConnectNumOfStoragePools, /* 0.8.2 */
+ .connectListStoragePools = esxConnectListStoragePools, /* 0.8.2 */
+ .storagePoolLookupByName = esxStoragePoolLookupByName, /* 0.8.2 */
+ .storagePoolLookupByUUID = esxStoragePoolLookupByUUID, /* 0.8.2 */
+ .storagePoolRefresh = esxStoragePoolRefresh, /* 0.8.2 */
+ .storagePoolGetInfo = esxStoragePoolGetInfo, /* 0.8.2 */
+ .storagePoolGetXMLDesc = esxStoragePoolGetXMLDesc, /* 0.8.2 */
+ .storagePoolNumOfVolumes = esxStoragePoolNumOfVolumes, /* 0.8.4 */
+ .storagePoolListVolumes = esxStoragePoolListVolumes, /* 0.8.4 */
+ .storageVolLookupByName = esxStorageVolLookupByName, /* 0.8.4 */
+ .storageVolLookupByPath = esxStorageVolLookupByPath, /* 0.8.4 */
+ .storageVolLookupByKey = esxStorageVolLookupByKey, /* 0.8.4 */
+ .storageVolCreateXML = esxStorageVolCreateXML, /* 0.8.4 */
+ .storageVolCreateXMLFrom = esxStorageVolCreateXMLFrom, /* 0.8.7 */
+ .storageVolDelete = esxStorageVolDelete, /* 0.8.7 */
+ .storageVolWipe = esxStorageVolWipe, /* 0.8.7 */
+ .storageVolGetInfo = esxStorageVolGetInfo, /* 0.8.4 */
+ .storageVolGetXMLDesc = esxStorageVolGetXMLDesc, /* 0.8.4 */
+ .storageVolGetPath = esxStorageVolGetPath, /* 0.8.4 */
};
--
1.8.1.4
11 years, 6 months
[libvirt] libxl driver issue with console/virt-viewer
by Dario Faggioli
Hi Jim, everyone,
I'm having an issue using the libvirt's libxl driver while installing a
Fedora 18 (via netinstall) on both Fedora 18 or rawhide host.
So, what happens is, basically, that I do not see the output from the
installer at all, neither in the virt-viewer instance that virt-install
does pop-up automatically, nor trying to manually connect to the VM
(either with virt-viewer or VNC). So, when I do:
[xen@zhaman ~]$ sudo virt-install --paravirt --name f18-i386 --ram
2048 --vcpus 2 -f /dev/vms/f18_i386 --network bridge=virbr0 --location
http://mirrors.rit.edu/fedora/linux//releases/18/Fedora/i386/os/
Starting install...
Retrieving file .treeinfo... | 2.4 kB 00:00:00 !!!
Retrieving file vmlinuz-PAE... | 9.3 MB 00:00:33 !!!
Retrieving file initrd-PAE.img... | 52 MB 00:04:11 !!!
Creating domain...
And then, in the virt-viewer window, I see a black screen and all it
says is "serial0 console". using `xl console f18-i386' gives me some of
the textual output of the installer (but nothing graphical, of course).
Both Fedora 18 and rawhide have the following version of Xen:
[xen@zhaman ~]$ rpm -qa | grep xen
xen-hypervisor-4.2.2-3.{fc18|fc20}.x86_64
xen-4.2.2-3.{fc18|fc20}.x86_64
...
Regarding libvirt, on F18 I have:
[xen@zhaman ~]$ rpm -qa | grep libvirt
libvirt-client-0.10.2.4-1.fc18.x86_64
libvirt-daemon-driver-libxl-0.10.2.4-1.fc18.x86_64
libvirt-daemon-0.10.2.4-1.fc18.x86_64
libvirt-daemon-xen-0.10.2.4-1.fc18.x86_64
...
While, on rawhide:
[xen@zhaman ~]$ rpm -qa | grep libvirt
libvirt-client-1.0.5-2.fc20.x86_64
libvirt-daemon-driver-libxl-1.0.5-2.fc20.x86_64
libvirt-daemon-1.0.5-2.fc20.x86_64
libvirt-daemon-xen-1.0.5-2.fc20.x86_64
...
I'm calling it a libxl driver problem since, with both versions, if I
start xend, things work fine, and I can see both the textual and
graphical phases of the Fedora installer in the virt-viewer window from
the very beginning.
I checked in /var/log/libvirt/libxl/libxl.log, but couldn't find
anything particular. Also, I tried to `virsh edit xxx' in the libxl and
xend cases, and the result is attached.
The only difference between the two files that looks relevant to me is
the presence of the following section in the xend version:
<console type='pty'>
<target type='xen' port='0'/>
</console>
However, I tried passing "--console pty,target_type=xen" to virt-install
when using the libxl driver, which caused a similar section to appear in
the XML of that solution too, but _did_NOT_ solve the issue.
Any idea on what can cause this?
Thanks and Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
11 years, 6 months