Displaying 8 results from an estimated 8 matches for "virdomaindefptr".
2011 Apr 21
7
[PATCHv11 0/6] libvirt/qemu - persistent modification of devices
Here is v11. Fixed comments/bugs and updated against the latest libvirt.git.
Changes v10->v11:
- fixed comments on each patches
- fixed cgroup handling in patch 3.
- fixed MODIFY_CURRENT handling in patch 4.
most of diff comes from refactoring qemu/qemu_driver.c
--
conf/domain_conf.c | 40 ++
conf/domain_conf.h | 5
libvirt_private.syms | 3
qemu/qemu_driver.c | 727
2011 Feb 23
0
[PATCH 1/2] libvirt/qemu : allow persistent modification of disks via A(De)ttachDeviceFlags
...++--
1 files changed, 163 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0f25a2a..703f86a 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4082,16 +4082,174 @@ cleanup:
return ret;
}
+static int qemuDomainFindDiskByName(virDomainDefPtr vmdef, const char *name)
+{
+ virDomainDiskDefPtr vdisk;
+ int i;
+
+ for (i = 0; i < vmdef->ndisks; i++) {
+ vdisk = vmdef->disks[i];
+ if (!strcmp(vdisk->dst, name))
+ return i;
+ }
+ return -1;
+}
+/*
+ * Attach a device given by XML, the chang...
2013 Jul 09
2
[PATCH 2/2] LXC: hostdev: parent directroy for hostdev atomically
...| 14 ++++++++++++++
2 files changed, 42 insertions(+), 14 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index b954107..a204789 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -1569,14 +1569,15 @@ static int lxcContainerSetupHostdevCapsStorage(virDomainDefPtr vmDef ATTRIBUTE_U
int ret = -1;
struct stat sb;
mode_t mode;
+ char *dev = def->source.caps.u.storage.block;
- if (def->source.caps.u.storage.block == NULL) {
+ if (dev == NULL) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",...
2013 Jul 08
4
Re: Permission problem with /dev/net/tun
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Daniel,
On 07/08/2013 11:41 AM, Daniel P. Berrange wrote:
>> the symptom my libvirt LXC container suffers from is:
>> root@depot:/dev/net# ls -la total 0 drwxr-xr-x 2 root root 40
>> Jun 29 16:26 . drwxr-xr-x 5 root root 480 Jun 29 16:26 ..
>> root@depot:/dev/net# mknod tun c 10 200 mknod: `tun': Operation
>>
2013 Jul 09
0
[PATCH 1/2] LXC: hostdev: introduce lxcContainerSetupHostdevCapsMakePath
...*dir = NULL;
+
+ if ((dir = strrchr(dev, '/'))) {
+ *dir = '\0';
+ if ((virFileMakePath(dev) < 0) && (errno != EEXIST))
+ ret = -1;
+
+ *dir = '/';
+ }
+
+ return ret;
+}
+
+
static int lxcContainerSetupHostdevCapsStorage(virDomainDefPtr vmDef ATTRIBUTE_UNUSED,
virDomainHostdevDefPtr def ATTRIBUTE_UNUSED,
virSecurityManagerPtr securityDriver ATTRIBUTE_UNUSED)
diff --git a/src/lxc/lxc_container.h b/src/lxc/lxc_container.h
index ada72f7..f...
2015 Mar 03
1
Re: QEMU interface type=ethernet
2015-03-02 23:41 GMT+03:00 Brian Rak <brak@gameservers.com>:
> In IRC, I was directed to this patch:
> https://www.redhat.com/archives/libvir-list/2015-February/msg01212.html ...
> which does exactly what I was looking for. It doesn't build cleanly in that
> state, but it's pretty trivial fix (needs actualType added to the function
> definition for
2012 Jun 20
1
update virDomainDef with xml config
...ef member in virDomainObjPtr wasn't update.
I have no idea, can you give me some ideas? thanks!
here is my code in qemu_driver.c:
static int qemudDomainSetCustomOptions(virDomainPtr dom, char *opt)
{
struct qemud_driver *driver = dom->conn->privateData;
virDomainObjPtr vm;
virDomainDefPtr persistentDef = NULL;
int ret = -1;
qemuDriverLock(driver);
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
qemuDriverUnlock(driver);
if (!vm) {
char uuidstr[VIR_UUID_STRING_BUFLEN];
virUUIDFormat(dom->uuid, uuidstr);
qemuReportError(VIR_ERR_NO_DOMAIN...
2012 Aug 16
1
Where does "cmd" initailize in qemu_command.c?
Hi,
Excuse me, I have a question when I reading the libvirt source
codes.
I have known the process of how libvirt start/manage qemu, since I
need to write a driver based on libvirt. But one thing also confused, please
give me some tips.
1.
In qemu_command.c, there is a function call "cmd =
virCommandNewArgList(emulator, "-S", NULL);", which