[Libvir] [PATCH] Can specify VNC port number 5900
by Nobuhiro Itou
Hi
The libvirt cannot specify VNC port number 5900.
Currently if we specify the port 5900,
The port number set to 5900+DomID.
This patch fixes the port number from 5900+DomID to 5900
for this case.
Signed-off-by: Nobuhiro Itou <fj0873gn(a)aa.jp.fujitsu.com>
Thanks,
Nobuhiro Itou.
Index: xml.c
===================================================================
RCS file: /data/cvs/libvirt/src/xml.c,v
retrieving revision 1.62
diff -u -p -r1.62 xml.c
--- xml.c 6 Mar 2007 20:00:17 -0000 1.62
+++ xml.c 8 Mar 2007 04:23:03 -0000
@@ -251,7 +251,7 @@ static int virDomainParseXMLGraphicsDesc
long port = strtol((const char *)vncport, NULL, 10);
if (port == -1)
virBufferAdd(buf, "(vncunused 1)", 13);
- else if (port > 5900)
+ else if (port >= 5900)
virBufferVSprintf(buf, "(vncdisplay %d)", port - 5900);
xmlFree(vncport);
}
@@ -315,7 +315,7 @@ static int virDomainParseXMLGraphicsDesc
long port = strtol((const char *)vncport, NULL, 10);
if (port == -1)
virBufferAdd(buf, "(vncunused 1)", 13);
- else if (port > 5900)
+ else if (port >= 5900)
virBufferVSprintf(buf, "(vncdisplay %d)", port - 5900);
xmlFree(vncport);
}
17 years, 8 months
[Libvir] [PATCH] check the maximum of virtual CPU
by Masayuki Sunou
Hi
The maximum of virtual CPU is not guarded in virsh setvcpus now.
Then, when 32767 was set to virtual CPU of virsh setvcpus, the problem
that Xend became abnormal was detected.
example:
----------------------------------------------------------------------
# virsh setvcpus 0 32767
libvir: Xen Daemon error : POST operation failed: (xend.err "(9, 'Bad file descriptor')")
libvir: Xen error : failed Xen syscall ioctl 3166208
libvir: error : library call virDomainSetVcpus failed, possibly not supported
# xm list -l
Error: (9, 'Bad file descriptor')
Usage: xm list [options] [Domain, ...]
List information about all/some domains.
-l, --long Output all VM details in SXP
--label Include security labels
--state=<state> Select only VMs with the specified state
----------------------------------------------------------------------
Therefore, I propose the correction that adjusts the maximum of virtual
CPU to the same value as Xen.
This patch is over 200lines.
If you request, I am ready to repost it with split this patch.
Signed-off-by: Masayuki Sunou <fj1826dm(a)aa.jp.fujitsu.com>
Thanks,
Masayuki Sunou.
libvirt-0.2.0
----------------------------------------------------------------------
diff -rup a/include/libvirt/libvirt.h b/include/libvirt/libvirt.h
--- a/include/libvirt/libvirt.h 2007-02-23 17:51:30.000000000 +0900
+++ b/include/libvirt/libvirt.h 2007-03-01 03:02:20.000000000 +0900
@@ -233,6 +233,7 @@ int virConnectGetVersion (virConnectPt
unsigned long *hvVer);
int virNodeGetInfo (virConnectPtr conn,
virNodeInfoPtr info);
+int virGetCpuMax (virConnectPtr conn);
/*
* Gather list of running domains
diff -rup a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
--- a/include/libvirt/libvirt.h.in 2007-02-23 17:51:30.000000000 +0900
+++ b/include/libvirt/libvirt.h.in 2007-03-01 03:02:50.000000000 +0900
@@ -233,6 +233,7 @@ int virConnectGetVersion (virConnectPt
unsigned long *hvVer);
int virNodeGetInfo (virConnectPtr conn,
virNodeInfoPtr info);
+int virGetCpuMax (virConnectPtr conn);
/*
* Gather list of running domains
diff -rup a/src/driver.h b/src/driver.h
--- a/src/driver.h 2007-02-23 17:51:30.000000000 +0900
+++ b/src/driver.h 2007-03-01 03:09:32.000000000 +0900
@@ -140,6 +140,8 @@ typedef int
typedef int
(*virDrvDomainSetAutostart) (virDomainPtr domain,
int autostart);
+typedef int
+ (*virDrvGetCpuMax) (void);
typedef struct _virDriver virDriver;
typedef virDriver *virDriverPtr;
@@ -191,6 +193,7 @@ struct _virDriver {
virDrvDomainDetachDevice domainDetachDevice;
virDrvDomainGetAutostart domainGetAutostart;
virDrvDomainSetAutostart domainSetAutostart;
+ virDrvGetCpuMax cpumax;
};
typedef int
diff -rup a/src/libvirt.c b/src/libvirt.c
--- a/src/libvirt.c 2007-02-23 17:51:30.000000000 +0900
+++ b/src/libvirt.c 2007-03-01 02:16:49.000000000 +0900
@@ -1670,6 +1670,35 @@ virNodeGetInfo(virConnectPtr conn, virNo
return(0);
}
+/**
+ * virDrvGetCpuMax:
+ *
+ * Returns the maximum of CPU defined by Hypervisor.
+ *
+ * Returns the maximum of CPU or 0 in case of error.
+ */
+int
+virGetCpuMax(virConnectPtr conn) {
+ int i;
+ int ret = -1;
+
+ if (!VIR_IS_CONNECT(conn)) {
+ virLibConnError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
+ return (0);
+ }
+
+ for (i = 0;i < conn->nb_drivers;i++) {
+ if ((conn->drivers[i] != NULL) &&
+ (conn->drivers[i]->cpumax != NULL)) {
+ ret = conn->drivers[i]->cpumax();
+ if (ret != 0)
+ return(ret);
+ }
+ }
+ virLibConnError(conn, VIR_ERR_CALL_FAILED, __FUNCTION__);
+ return (-1);
+}
+
/************************************************************************
* *
* Handling of defined but not running domains *
diff -rup a/src/libvirt_sym.version b/src/libvirt_sym.version
--- a/src/libvirt_sym.version 2007-02-23 17:51:30.000000000 +0900
+++ b/src/libvirt_sym.version 2007-03-01 02:17:18.000000000 +0900
@@ -52,6 +52,7 @@
virConnResetLastError;
virDefaultErrorFunc;
virNodeGetInfo;
+ virGetCpuMax;
virDomainSetVcpus;
virDomainPinVcpu;
diff -rup a/src/proxy_internal.c b/src/proxy_internal.c
--- a/src/proxy_internal.c 2007-02-23 17:51:30.000000000 +0900
+++ b/src/proxy_internal.c 2007-03-01 02:17:40.000000000 +0900
@@ -83,6 +83,7 @@ static virDriver xenProxyDriver = {
NULL, /* domainDetachDevice */
NULL, /* domainGetAutostart */
NULL, /* domainSetAutostart */
+ NULL, /* cpumax */
};
/**
diff -rup a/src/qemu_internal.c b/src/qemu_internal.c
--- a/src/qemu_internal.c 2007-02-23 21:46:35.000000000 +0900
+++ b/src/qemu_internal.c 2007-03-01 02:18:02.000000000 +0900
@@ -1200,6 +1200,7 @@ static virDriver qemuDriver = {
NULL, /* domainDetachDevice */
qemuDomainGetAutostart, /* domainGetAutostart */
qemuDomainSetAutostart, /* domainSetAutostart */
+ NULL, /* cpumax */
};
static virNetworkDriver qemuNetworkDriver = {
diff -rup a/src/test.c b/src/test.c
--- a/src/test.c 2007-02-23 17:51:30.000000000 +0900
+++ b/src/test.c 2007-03-01 02:18:53.000000000 +0900
@@ -127,6 +127,7 @@ static virDriver testDriver = {
NULL, /* domainDetachDevice */
NULL, /* domainGetAutostart */
NULL, /* domainSetAutostart */
+ NULL, /* cpumax */
};
typedef struct _testDev {
diff -rup a/src/virsh.c b/src/virsh.c
--- a/src/virsh.c 2007-02-28 00:35:50.000000000 +0900
+++ b/src/virsh.c 2007-03-01 02:19:59.000000000 +0900
@@ -1383,6 +1383,7 @@ cmdSetvcpus(vshControl * ctl, vshCmd * c
{
virDomainPtr dom;
int count;
+ int maxcpu;
int ret = TRUE;
if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
@@ -1397,6 +1398,18 @@ cmdSetvcpus(vshControl * ctl, vshCmd * c
return FALSE;
}
+ maxcpu = virGetCpuMax(ctl->conn);
+ if (!maxcpu) {
+ virDomainFree(dom);
+ return FALSE;
+ }
+
+ if (count > maxcpu) {
+ vshError(ctl, FALSE, _("Too many virtual CPU's."));
+ virDomainFree(dom);
+ return FALSE;
+ }
+
if (virDomainSetVcpus(dom, count) != 0) {
ret = FALSE;
}
diff -rup a/src/xend_internal.c b/src/xend_internal.c
--- a/src/xend_internal.c 2007-02-28 00:50:03.000000000 +0900
+++ b/src/xend_internal.c 2007-03-01 02:21:34.000000000 +0900
@@ -99,6 +99,7 @@ static virDriver xenDaemonDriver = {
xenDaemonDetachDevice, /* domainDetachDevice */
NULL, /* domainGetAutostart */
NULL, /* domainSetAutostart */
+ NULL, /* cpumax */
};
/**
diff -rup a/src/xen_internal.c b/src/xen_internal.c
--- a/src/xen_internal.c 2007-02-23 17:51:30.000000000 +0900
+++ b/src/xen_internal.c 2007-02-28 18:06:08.000000000 +0900
@@ -456,6 +456,7 @@ static virDriver xenHypervisorDriver = {
NULL, /* domainDetachDevice */
NULL, /* domainGetAutostart */
NULL, /* domainSetAutostart */
+ xenHypervisorGetCpuMax, /* cpumax */
};
#endif /* !PROXY */
@@ -1824,6 +1825,17 @@ xenHypervisorGetVcpus(virDomainPtr domai
}
#endif
+/**
+ * xend_get_cpu_max:
+ *
+ * Returns the maximum of CPU defined by Xen.
+ */
+int
+xenHypervisorGetCpuMax(void)
+{
+ return MAX_VIRT_CPUS;
+}
+
/*
* Local variables:
* indent-tabs-mode: nil
diff -rup a/src/xen_internal.h b/src/xen_internal.h
--- a/src/xen_internal.h 2006-08-04 19:41:05.000000000 +0900
+++ b/src/xen_internal.h 2007-03-01 02:21:13.000000000 +0900
@@ -55,6 +55,7 @@ int xenHypervisorGetVcpus (virDomainPtr
int maxinfo,
unsigned char *cpumaps,
int maplen);
+int xenHypervisorGetCpuMax (void);
#ifdef __cplusplus
}
diff -rup a/src/xm_internal.c b/src/xm_internal.c
--- a/src/xm_internal.c 2007-02-23 17:51:30.000000000 +0900
+++ b/src/xm_internal.c 2007-03-01 02:23:54.000000000 +0900
@@ -108,6 +108,7 @@ static virDriver xenXMDriver = {
NULL, /* domainDetachDevice */
NULL, /* domainGetAutostart */
NULL, /* domainSetAutostart */
+ NULL, /* cpumax */
};
static void
diff -rup a/src/xs_internal.c b/src/xs_internal.c
--- a/src/xs_internal.c 2007-02-23 17:51:30.000000000 +0900
+++ b/src/xs_internal.c 2007-03-01 02:24:20.000000000 +0900
@@ -77,6 +77,7 @@ static virDriver xenStoreDriver = {
NULL, /* domainDetachDevice */
NULL, /* domainGetAutostart */
NULL, /* domainSetAutostart */
+ NULL, /* cpumax */
};
/**
17 years, 8 months
[Libvir] Remote patch, 2007-02-28
by Richard W.M. Jones
http://www.annexia.org/tmp/libvirt-tls-20070228.patch
Not an enormous amount of difference between this and the patch from two
days ago. This patch correctly logs/audits new connections and fixes a
whole collection of different bugs which used to happen when the server
rejected a client connection.
Rich.
--
Emerging Technologies, Red Hat http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
"[Negative numbers] darken the very whole doctrines of the equations
and make dark of the things which are in their nature excessively
obvious and simple" (Francis Maseres FRS, mathematician, 1759)
17 years, 8 months
[Libvir] Reason for daemons?
by Shuveb Hussain
Hi,
Any reason why actual requests are serviced by daemons? Is it just to
increase the stability of the applications that link to libvirt or are
there other reasons? I have started implementing OpenVZ support.
Should I follow the same path and implement a daemon as well?
Regards,
--
Shuveb Hussain.
I blog at http://binarykarma.org
Spread the Karma.
17 years, 8 months
[Libvir] [RFC] Host and guest capabilities
by Richard W.M. Jones
I've been looking into the parts of virtinst which try to probe the
capabilities of the host directly, rather than being abstracted through
libvirt (for example, opening and parsing
/sys/hypervisor/properties/capabilities directly).
Attached is a proposed API for probing the capabilities and supported
guest architectures of the hypervisor / driver.
I've implemented the virCapabilities part already. My original
implementation of the guest architectures had virCapabilities containing
a list of supported architectures, but that doesn't nearly cover the
richness of what the underlying drivers could support, so I'm currently
separating that out into a separate virConnectGetGuestArchitectures call.
Let me know your opinions of this API.
As an aside, the current virt-manager "choose paravirt / fullvirt"
screen doesn't really capture the full, shall I say, ugliness of the
possible choices for architecture, particularly when we add qemu, kqemu,
and emulation in the mix. I suspect that presenting a list of
architectures here, perhaps with some options to show only paravirt,
show only fullvirt, show only accelerated ...
Rich.
--
Emerging Technologies, Red Hat http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
"[Negative numbers] darken the very whole doctrines of the equations
and make dark of the things which are in their nature excessively
obvious and simple" (Francis Maseres FRS, mathematician, 1759)
17 years, 8 months
[Libvir] Patch: Fix documentation and code of virGetDomain function
by Richard W.M. Jones
It turns out that you _can't_ pass name=NULL to virGetDomain, despite
what the docs say.
Rich.
--
Emerging Technologies, Red Hat http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
"[Negative numbers] darken the very whole doctrines of the equations
and make dark of the things which are in their nature excessively
obvious and simple" (Francis Maseres FRS, mathematician, 1759)
17 years, 8 months
[Libvir] About the 'virsh start'
by Yoshihiko Yaegashi
Hi,
The command 'virsh start' fails under the following conditions.
- architecture:x86_64
- PV domain (f7test2)
- After the install are done
I attach a xend.log to a message.
Thanks
Yaegashi
[2007-03-07 07:11:12 xend 30702] DEBUG (SrvDomain:76) Starting domain fc7test2 False
[2007-03-07 07:11:12 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:1288) XendDomainInfo.constructDomain
[2007-03-07 07:11:12 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:1334) XendDomainInfo.initDomain: 71 256
[2007-03-07 07:11:12 xend 19603] DEBUG (XendBootloader:64) Launching bootloader as ['/usr/bin/pygrub', '-q', '--output=/var/run/xend/boot/xenbl.16058', '/dev/sda13'].
[2007-03-07 07:11:12 xend 30702] DEBUG (balloon:127) Balloon: 717020 KiB free; need 358400; done.
[2007-03-07 07:11:12 xend 30702] INFO (image:125) buildDomain os=linux dom=71 vcpus=1
[2007-03-07 07:11:12 xend 30702] DEBUG (image:194) domid = 71
[2007-03-07 07:11:12 xend 30702] DEBUG (image:195) memsize = 350
[2007-03-07 07:11:12 xend 30702] DEBUG (image:196) image = /var/run/xend/boot/boot_kernel.EMjGRe
[2007-03-07 07:11:12 xend 30702] DEBUG (image:197) store_evtchn = 1
[2007-03-07 07:11:12 xend 30702] DEBUG (image:198) console_evtchn = 2
[2007-03-07 07:11:12 xend 30702] DEBUG (image:199) cmdline = ro root=/dev/VolGroup00/LogVol00 rhgb quiet
[2007-03-07 07:11:12 xend 30702] DEBUG (image:200) ramdisk = /var/run/xend/boot/boot_ramdisk.tAzsxc
[2007-03-07 07:11:12 xend 30702] DEBUG (image:201) vcpus = 1
[2007-03-07 07:11:12 xend 30702] DEBUG (image:202) features =
[2007-03-07 07:11:13 xend.XendDomainInfo 30702] INFO (XendDomainInfo:1198) createDevice: vif : {'bridge': 'xenbr0', 'mac': '00:16:3e:08:28:23', 'script': 'vif-bridge', 'uuid': '8df737da-edfa-83e9-614b-61c7ba127165', 'backend': 0}
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:115) DevController: writing {'backend-id': '0', 'mac': '00:16:3e:08:28:23', 'handle': '0', 'state': '1', 'backend': '/local/domain/0/backend/vif/71/0'} to /local/domain/71/device/vif/0.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:117) DevController: writing {'bridge': 'xenbr0', 'domain': 'fc7test2', 'handle': '0', 'uuid': '8df737da-edfa-83e9-614b-61c7ba127165', 'script': '/etc/xen/scripts/vif-bridge', 'state': '1', 'frontend': '/local/domain/71/device/vif/0', 'mac': '00:16:3e:08:28:23', 'online': '1', 'frontend-id': '71'} to /local/domain/0/backend/vif/71/0.
[2007-03-07 07:11:13 xend.XendDomainInfo 30702] INFO (XendDomainInfo:1198) createDevice: vbd : {'uuid': 'd04e0343-9479-2279-4b51-0b284bdd7f4c', 'driver': 'paravirtualised', 'dev': 'xvda:disk', 'uname': 'phy:/dev/sda13', 'mode': 'w', 'backend': 0}
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:115) DevController: writing {'backend-id': '0', 'virtual-device': '51712', 'device-type': 'disk', 'state': '1', 'backend': '/local/domain/0/backend/vbd/71/51712'} to /local/domain/71/device/vbd/51712.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:117) DevController: writing {'domain': 'fc7test2', 'frontend': '/local/domain/71/device/vbd/51712', 'uuid': 'd04e0343-9479-2279-4b51-0b284bdd7f4c', 'dev': 'xvda', 'state': '1', 'params': '/dev/sda13', 'mode': 'w', 'online': '1', 'frontend-id': '71', 'type': 'phy'} to /local/domain/0/backend/vbd/71/51712.
[2007-03-07 07:11:13 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:1719) Storing VM details: {'on_xend_stop': 'ignore', 'shadow_memory': '0', 'uuid': 'ff828d32-70b2-53eb-4566-d08683974052', 'name': 'fc7test2', 'on_reboot': 'restart', 'start_time': '1173219073.18', 'on_poweroff': 'destroy', 'on_xend_start': 'ignore', 'on_crash': 'restart', 'xend/restart_count': '0', 'vcpus': '1', 'vcpu_avail': '1', 'memory': '350', 'image': "(linux (kernel /var/run/xend/boot/boot_kernel.EMjGRe) (ramdisk /var/run/xend/boot/boot_ramdisk.tAzsxc) (args 'ro root=/dev/VolGroup00/LogVol00 rhgb quiet'))", 'maxmem': '350'}
[2007-03-07 07:11:13 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:731) Storing domain details: {'console/ring-ref': '419357', 'console/port': '2', 'name': 'fc7test2', 'console/limit': '1048576', 'vm': '/vm/ff828d32-70b2-53eb-4566-d08683974052', 'domid': '71', 'cpu/0/availability': 'online', 'memory/target': '358400', 'store/ring-ref': '419358', 'store/port': '1'}
[2007-03-07 07:11:13 xend 30702] DEBUG (XendDomain:428) Adding Domain: 71
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:148) Waiting for devices vif.
[2007-03-07 07:11:13 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:731) Storing domain details: {'console/ring-ref': '419357', 'console/port': '2', 'name': 'fc7test2', 'console/limit': '1048576', 'vm': '/vm/ff828d32-70b2-53eb-4566-d08683974052', 'domid': '71', 'cpu/0/availability': 'online', 'memory/target': '358400', 'store/ring-ref': '419358', 'store/port': '1'}
[2007-03-07 07:11:13 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:798) XendDomainInfo.handleShutdownWatch
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:153) Waiting for 0.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:522) hotplugStatusCallback /local/domain/0/backend/vif/71/0/hotplug-status.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:522) hotplugStatusCallback /local/domain/0/backend/vif/71/0/hotplug-status.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:536) hotplugStatusCallback 1.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:148) Waiting for devices usb.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:148) Waiting for devices vbd.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:153) Waiting for 51712.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:522) hotplugStatusCallback /local/domain/0/backend/vbd/71/51712/hotplug-status.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:522) hotplugStatusCallback /local/domain/0/backend/vbd/71/51712/hotplug-status.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:536) hotplugStatusCallback 1.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:148) Waiting for devices irq.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:148) Waiting for devices vkbd.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:148) Waiting for devices vfb.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:148) Waiting for devices pci.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:148) Waiting for devices ioports.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:148) Waiting for devices tap.
[2007-03-07 07:11:13 xend 30702] DEBUG (DevController:148) Waiting for devices vtpm.
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] WARNING (XendDomainInfo:950) Domain has crashed: name=fc7test2 id=71.
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:731) Storing domain details: {'console/ring-ref': '419357', 'console/port': '2', 'name': 'fc7test2', 'console/limit': '1048576', 'vm': '/vm/ff828d32-70b2-53eb-4566-d08683974052', 'domid': '71', 'cpu/0/availability': 'online', 'memory/target': '358400', 'store/ring-ref': '419358', 'store/port': '1'}
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:731) Storing domain details: {'console/ring-ref': '419357', 'console/port': '2', 'name': 'fc7test2', 'console/limit': '1048576', 'vm': '/vm/ff828d32-70b2-53eb-4566-d08683974052', 'domid': '71', 'cpu/0/availability': 'online', 'memory/target': '358400', 'store/ring-ref': '419358', 'store/port': '1'}
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:1495) XendDomainInfo.destroyDomain(71)
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:94) XendDomainInfo.create(['domain', ['domid', 71], ['on_crash', 'restart'], ['memory', 350], ['uuid', 'ff828d32-70b2-53eb-4566-d08683974052'], ['bootloader_args', ''], ['name', 'fc7test2'], ['maxmem', 350], ['on_reboot', 'restart'], ['on_poweroff', 'destroy'], ['localtime', 0], ['vcpus', 1], ['bootloader', '/usr/bin/pygrub'], ['shadow_memory', 0], ['vcpu_avail', 1], ['cpu_weight', 256], ['cpu_cap', 0], ['features', ''], ['on_xend_start', 'ignore'], ['on_xend_stop', 'ignore'], ['start_time', 1173219073.1766889], ['cpu_time', 0.14879309900000001], ['online_vcpus', 1], ['image', ['linux', ['kernel', '/var/run/xend/boot/boot_kernel.EMjGRe'], ['ramdisk', '/var/run/xend/boot/boot_ramdisk.tAzsxc'], ['args', 'ro root=/dev/VolGroup00/LogVol00 rhgb quiet']]], ['status', 0], ['memory_dynamic_min', 350], ['memory_dynamic_max', 350], ['state', '----c-'], ['store_mfn', 419358], ['console_mfn', 419357], ['device', ['vif', ['bridge', 'xenbr0'], ['mac', '00:16:3e:08:28:23'], ['script', 'vif-bridge'], ['uuid', '8df737da-edfa-83e9-614b-61c7ba127165'], ['backend', 0]]], ['device', ['vbd', ['uname', 'phy:/dev/sda13'], ['uuid', 'd04e0343-9479-2279-4b51-0b284bdd7f4c'], ['mode', 'w'], ['dev', 'xvda:disk'], ['backend', 0]]]])
[2007-03-07 07:11:17 xend.XendConfig 30702] WARNING (XendConfig:607) Unconverted key: cpus
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:1288) XendDomainInfo.constructDomain
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:1334) XendDomainInfo.initDomain: 72 256
[2007-03-07 07:11:17 xend 19768] DEBUG (XendBootloader:64) Launching bootloader as ['/usr/bin/pygrub', '-q', '--output=/var/run/xend/boot/xenbl.1059', '/dev/sda13'].
[2007-03-07 07:11:17 xend 30702] DEBUG (balloon:127) Balloon: 447020 KiB free; need 358400; done.
[2007-03-07 07:11:17 xend 30702] INFO (image:125) buildDomain os=linux dom=72 vcpus=1
[2007-03-07 07:11:17 xend 30702] DEBUG (image:194) domid = 72
[2007-03-07 07:11:17 xend 30702] DEBUG (image:195) memsize = 350
[2007-03-07 07:11:17 xend 30702] DEBUG (image:196) image = /var/run/xend/boot/boot_kernel.yBt3-v
[2007-03-07 07:11:17 xend 30702] DEBUG (image:197) store_evtchn = 1
[2007-03-07 07:11:17 xend 30702] DEBUG (image:198) console_evtchn = 2
[2007-03-07 07:11:17 xend 30702] DEBUG (image:199) cmdline = ro root=/dev/VolGroup00/LogVol00 rhgb quiet
[2007-03-07 07:11:17 xend 30702] DEBUG (image:200) ramdisk = /var/run/xend/boot/boot_ramdisk.JK64t5
[2007-03-07 07:11:17 xend 30702] DEBUG (image:201) vcpus = 1
[2007-03-07 07:11:17 xend 30702] DEBUG (image:202) features =
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] INFO (XendDomainInfo:1198) createDevice: vif : {'bridge': 'xenbr0', 'mac': '00:16:3e:08:28:23', 'script': 'vif-bridge', 'uuid': '8df737da-edfa-83e9-614b-61c7ba127165', 'backend': 0}
[2007-03-07 07:11:17 xend 30702] DEBUG (DevController:115) DevController: writing {'backend-id': '0', 'mac': '00:16:3e:08:28:23', 'handle': '0', 'state': '1', 'backend': '/local/domain/0/backend/vif/72/0'} to /local/domain/72/device/vif/0.
[2007-03-07 07:11:17 xend 30702] DEBUG (DevController:117) DevController: writing {'bridge': 'xenbr0', 'domain': 'fc7test2', 'handle': '0', 'uuid': '8df737da-edfa-83e9-614b-61c7ba127165', 'script': '/etc/xen/scripts/vif-bridge', 'state': '1', 'frontend': '/local/domain/72/device/vif/0', 'mac': '00:16:3e:08:28:23', 'online': '1', 'frontend-id': '72'} to /local/domain/0/backend/vif/72/0.
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] INFO (XendDomainInfo:1198) createDevice: vbd : {'uuid': 'd04e0343-9479-2279-4b51-0b284bdd7f4c', 'driver': 'paravirtualised', 'dev': 'xvda:disk', 'uname': 'phy:/dev/sda13', 'mode': 'w', 'backend': 0}
[2007-03-07 07:11:17 xend 30702] DEBUG (DevController:115) DevController: writing {'backend-id': '0', 'virtual-device': '51712', 'device-type': 'disk', 'state': '1', 'backend': '/local/domain/0/backend/vbd/72/51712'} to /local/domain/72/device/vbd/51712.
[2007-03-07 07:11:17 xend 30702] DEBUG (DevController:117) DevController: writing {'domain': 'fc7test2', 'frontend': '/local/domain/72/device/vbd/51712', 'uuid': 'd04e0343-9479-2279-4b51-0b284bdd7f4c', 'dev': 'xvda', 'state': '1', 'params': '/dev/sda13', 'mode': 'w', 'online': '1', 'frontend-id': '72', 'type': 'phy'} to /local/domain/0/backend/vbd/72/51712.
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:1719) Storing VM details: {'on_xend_stop': 'ignore', 'shadow_memory': '0', 'uuid': 'ff828d32-70b2-53eb-4566-d08683974052', 'name': 'fc7test2', 'on_reboot': 'restart', 'start_time': '1173219077.8', 'on_poweroff': 'destroy', 'on_xend_start': 'ignore', 'on_crash': 'restart', 'vcpus': '1', 'vcpu_avail': '1', 'memory': '350', 'image': "(linux (kernel /var/run/xend/boot/boot_kernel.yBt3-v) (ramdisk /var/run/xend/boot/boot_ramdisk.JK64t5) (args 'ro root=/dev/VolGroup00/LogVol00 rhgb quiet'))", 'maxmem': '350'}
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:731) Storing domain details: {'console/ring-ref': '467281', 'console/port': '2', 'name': 'fc7test2', 'console/limit': '1048576', 'vm': '/vm/ff828d32-70b2-53eb-4566-d08683974052', 'domid': '72', 'cpu/0/availability': 'online', 'memory/target': '358400', 'store/ring-ref': '467282', 'store/port': '1'}
[2007-03-07 07:11:17 xend 30702] DEBUG (XendDomain:428) Adding Domain: 72
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:731) Storing domain details: {'console/ring-ref': '467281', 'console/port': '2', 'name': 'fc7test2', 'console/limit': '1048576', 'vm': '/vm/ff828d32-70b2-53eb-4566-d08683974052', 'domid': '72', 'cpu/0/availability': 'online', 'memory/target': '358400', 'store/ring-ref': '467282', 'store/port': '1'}
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:798) XendDomainInfo.handleShutdownWatch
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:731) Storing domain details: {'console/ring-ref': '467281', 'console/port': '2', 'name': 'fc7test2', 'console/limit': '1048576', 'vm': '/vm/ff828d32-70b2-53eb-4566-d08683974052', 'domid': '72', 'cpu/0/availability': 'online', 'memory/target': '358400', 'store/ring-ref': '467282', 'store/port': '1'}
[2007-03-07 07:11:17 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:731) Storing domain details: {'console/ring-ref': '467281', 'console/port': '2', 'name': 'fc7test2', 'console/limit': '1048576', 'vm': '/vm/ff828d32-70b2-53eb-4566-d08683974052', 'domid': '72', 'cpu/0/availability': 'online', 'memory/target': '358400', 'store/ring-ref': '467282', 'store/port': '1'}
[2007-03-07 07:11:21 xend.XendDomainInfo 30702] WARNING (XendDomainInfo:950) Domain has crashed: name=fc7test2 id=72.
[2007-03-07 07:11:21 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:731) Storing domain details: {'console/ring-ref': '467281', 'console/port': '2', 'name': 'fc7test2', 'console/limit': '1048576', 'vm': '/vm/ff828d32-70b2-53eb-4566-d08683974052', 'domid': '72', 'cpu/0/availability': 'online', 'memory/target': '358400', 'store/ring-ref': '467282', 'store/port': '1'}
[2007-03-07 07:11:21 xend.XendDomainInfo 30702] ERROR (XendDomainInfo:1079) VM fc7test2 restarting too fast (4.709960 seconds since the last restart). Refusing to restart to avoid loops.
[2007-03-07 07:11:21 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:1487) XendDomainInfo.destroy: domid=72
[2007-03-07 07:11:21 xend.XendDomainInfo 30702] DEBUG (XendDomainInfo:1495) XendDomainInfo.destroyDomain(72)
17 years, 8 months
Re: [Libvir] [PATCH][RFC] Add --keymap option to virt-install
by Takahashi Tomohiro
Hi, Dan
Thank you for committing a patch.
I confirmed that I can use jp106 keyboard on HVM domain,
and the keymap that is configured in the XML.
when I used latest patch(revision 1.435).
Thanks,
Tomohiro Takahashi.
> On Tue, Mar 06, 2007 at 03:21:16PM +0000, Daniel P. Berrange wrote:
>> On Tue, Mar 06, 2007 at 10:00:08PM +0900, Takahashi Tomohiro wrote:
>> > I would like to add --keymap option to virt-install in order to set up
>> > jp106 keymap. Because I can't use jp106 keyboard. So, I made a patch
>> > (notes:It relates python-virtinst)
>> >
>> > Usage: virt-install --keymap=ja
>> >
>> > I confirmed that I can use jp106 keyboard on HVM domain.
>> > But didn't confirm PV domain.
>> >
>> > Please give me an advice, if you have it.
>>
>> I've been expecting someone to send this patch for quite a while :-)
>>
>> It all looks good to me, although all my keyboards are US english
>> so my own testing will be limited to making sure the keymap gets
>> passed through to the QEMU daemon correctly. For paravirt, I think
>> you need to have Xen 3.0.5 to use keymap, but I'll double check
>> that and then apply this.
>>
>> > @@ -1903,6 +1907,8 @@ virConfPtr xenXMParseXMLToConfig(virConn
>> > len += 11 + strlen((const char*)vnclisten);
>> > if (vncpasswd)
>> > len += 11 + strlen((const char*)vncpasswd);
>> > + if (keymap)
>> > + len += 11 + strlen((const char*)keymap);
>> > if ((val = malloc(len)) != NULL) {
>> > strcpy(val, "type=vnc");
>> > if (vncunused) {
>>
>> A minor bug - the length is only 8, not 11, but I'll fix that when I
>> commit, so don't worry about sending an updated patch.
>
> Ok, this is now committed - I also extended the XML generation code so
> that it will report back the keymap that is configured in the XML
> dump, as well as updating the test suite to check the handling.
>
> Dan.
> --
> |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392
> 2496 -=|
> |=- Perl modules:
> .cpan.org/~danberr/ -=|
> |=- Projects:
> at.net/~danielpb/ -=|
> |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B
> 505 -=|
>
17 years, 8 months
[Libvir] PATCH: Process QEMU monitor at startup
by Daniel P. Berrange
With the current QEMU driver we simply spawn the QEMU process and return to
the caller immediately. If the QEMU process dies immediately for some reason
the user will never no - their domain will simply never appear. To address
this, the attached patch will spawn the QEMU process and then immeditely
process stderr to look for the monitor PTY - or EOF indicating failure. If
it finds the monitor it will also try to connect to it - if this fails in
any way then the domain is terminated with extreme prejudice - we absolutely
need the monitor connection for other operations to work. This should at
least cause a 'Domain startup failed' message to be returned to the user
although more work is needed to try and extract a useful error message
from the stuff written to stderr.
Also in this patch I have reversed the order in which file descriptors are
added to the poll array. Currently they are added server, then client,
then VMs. The trouble with this is that when processing the server event,
if a new client is added to the daemon then processing of subsequent FDs
is out of sync. Likewise if a client message causes a new VM to startup
then processing of subsquent VM FDs is out of sync. Reversing the order
trivially solves it, because VM FDs s are now processed before client
FDs, and thus any new VMs started by a client don't mess things up. Likewise
client FDs are processed before server FDs. A more robust long term fix
would be to carry around some extra metadata instead of relying on ordering
when dispatching events.
Finally this patch also fixes the 'resume' operation, and allows for the
VM state to be reported correctly - ie we can now report 'paused' as well
as shutdown/running.
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
17 years, 8 months