Zhou Zheng Sheng has uploaded a new change for review.
Change subject: remove the broken support for delivering video to local display
......................................................................
remove the broken support for delivering video to local display
In vdsClient help message and sample VM configurations, it is said when
display is set to local, the VM video will go to local host. In fact
vdsm do not implement this. If the user use this feature, vdsm will
raise an exception in function getConfVideo() in vdsm/vm.py.
To implement this feature, we have to
1. deal with 'local' properly in getConfVideo() in vdsm/vm.py, add a
suitable video device when 'local' is set.
2. generate graphic discription XML node properly in vdsm libvirtvm.py,
like <graphics type="sdl" display=":0" xauth="blah">.
Now we always
generate some attributes not related to SDL, and libvirt will complain.
We have to suppress generating those attributes when using local
display.
3. If we allocate a host display for the user qemu, then qemu can use sdl
to show the display in its own host display.
4. If we do not want to allocate a display for qemu, we have to use an
existing one, then we have to deal with the $DISPLAY(:0 ?) and
$XAUTHORITY. These two attributes can be set in the libvirt XML in the
graphics section
5. We often setup hosts without X support, it is not possible to
deliver the guest video to host display. In this situation, detect the
host X support and raises an exception properly to the user to describe
what's wrong.
If we are not going to do the work as written above, we'd better remove
the broken support for local display.
Change-Id: I4e655b7e03be74c5d9627ec03ac2baefcc379681
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M vdsm/API.py
M vdsm/vmBootExample.conf
M vdsm/vmConfExample.conf
M vdsm_cli/vdsClient.py
4 files changed, 5 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/25/7725/1
diff --git a/vdsm/API.py b/vdsm/API.py
index 827f73b..566d6e5 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -222,7 +222,7 @@
'No space on /tmp?'}}
return errCode['createErr']
- if vmParams.get('display') not in ('vnc', 'qxl',
'qxlnc', 'local'):
+ if vmParams.get('display') not in ('vnc', 'qxl',
'qxlnc'):
return {'status': {'code': errCode['createErr']
['status']['code'],
'message': 'Unknown display type %s'
diff --git a/vdsm/vmBootExample.conf b/vdsm/vmBootExample.conf
index 62cdec3..9af2141 100644
--- a/vdsm/vmBootExample.conf
+++ b/vdsm/vmBootExample.conf
@@ -5,10 +5,9 @@
#The local hard drive image
imageFile="/tmp/WS2003.diskImage"
#Were do send the virtual machine display
-#If set to local then the display opens according to the $DISPLAY settings of the shell
running the server
#If set to vnc then the server responds with a vnc display for the virtual machine
#access to the virtual machine is then <server>:<id set by the server>
-display=local
+display=vnc
#Use file CD-ROM image.
#You can use the host CD-ROM by using /dev/cdrom as filename
#omiting this parameter means no CDROM
diff --git a/vdsm/vmConfExample.conf b/vdsm/vmConfExample.conf
index 3000108..aa17ad9 100644
--- a/vdsm/vmConfExample.conf
+++ b/vdsm/vmConfExample.conf
@@ -11,7 +11,6 @@
imageFile="/data/images/for-qemu/fc5_migrate.vmdk"
#Were do send the virtual machine display
-#If set to local then the display opens according to the $DISPLAY settings of the shell
running the server
#If set to vnc then the server responds with a vnc display for the virtual machine
#access to the virtual machine is then <server>:<id set by the server>
#display=local | vnc
diff --git a/vdsm_cli/vdsClient.py b/vdsm_cli/vdsClient.py
index cb90b8d..e7d51c7 100644
--- a/vdsm_cli/vdsClient.py
+++ b/vdsm_cli/vdsClient.py
@@ -1622,7 +1622,7 @@
' myVmConfigFile',
'Example with no file : vdsClient someServer create'
' /dev/null vmId=<uuid> memSize=256 '
- 'imageFile=someImage
display=<vnc|local|qxl|qxlnc>',
+ 'imageFile=someImage display=<vnc|qxl|qxlnc>',
'Parameters list: r=required, o=optional',
'r vmId=<uuid> : Unique identification for the '
'created VM. Any additional operation on the VM must '
@@ -1636,8 +1636,8 @@
'machine',
'r macAddr=<aa:bb:cc:dd:ee:ff> : MAC address of the
'
'machine',
- 'r display=<vnc|local|qxl|qxlnc> : send the machine
'
- 'display to vnc, local host, spice, or spice with no '
+ 'r display=<vnc|qxl|qxlnc> : send the machine '
+ 'display to vnc, spice, or spice with no '
'image compression',
'o drive=pool:poolID,domain:domainID,image:imageID,'
'volume:volumeID[,boot:true,format:cow] : disk image '
--
To view, visit
http://gerrit.ovirt.org/7725
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e655b7e03be74c5d9627ec03ac2baefcc379681
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>