20070613 vnc vmware
http://www.yippeesoft.com
人品大爆发,居然全部OK了
[quote]
Would you like to skip networking setup and keep your old settings as they are?
(yes/no) [yes] n
Do you want networking for your virtual machines? (yes/no/help) [yes]
Would you prefer to modify your existing networking configuration using the
wizard or the editor? (wizard/editor/help) [wizard] e
The following virtual networks have been defined:
. vmnet0 is bridged to eth0
. vmnet8 is a NAT network on private subnet 172.16.227.0.
Do you wish to make any changes to the current virtual networks settings?
(yes/no) [no]
Trying to find a suitable vmnet module for your running kernel.
The file /lib/modules/2.4.20-8smp/misc/vmnet.o that this program was about to
install already exists. Overwrite? [yes]
The file /lib/modules/2.4.20-8smp/misc/vmnet.ko that this program was about to
install already exists. Overwrite? [yes]
The module smp-2.4.20-8.i686-RH9.0 loads perfectly in the running kernel.
Starting VMware services:
Virtual machine monitor [ 确定 ]
Virtual ethernet [ 确定 ]
Bridged networking on /dev/vmnet0 [ 确定 ]
Host-only networking on /dev/vmnet8 (background) [ 确定 ]
NAT service on /dev/vmnet8 [ 确定 ]
[/quote]
结果碰到一样的问题
[quote]
小弟使用vnc连到服务器上运行vmware,启动虚拟机时候提示"TrueColor at 8 bits per pixel is not suppot".但是不通过vnc而直接到服务器终端上可以启动.
vnc连上去启动的是twm.求助各位不知道有什么方法可以解决??
log如下:
Apr 26 14:42:32: vmx&line; [msg.xinfo.trueColor8bppUnsupported] TrueColor at 8 bits per pixel is not supported.
Apr 26 14:42:32: vmx&line; Try adding \’-cc 3\’ to your X server\’s command line.
Apr 26 14:42:32: vmx&line; [msg.xinfo.initFailed] Failed to initialize basic X interface for the virtual machine.
Apr 26 14:42:32: vmx&line; [msg.mks.hostBackendFailed] Unable to initialize host-specific backend.
Apr 26 14:42:32: vmx&line; [msg.mks.powerOnFailed] Failed to initialize mouse-keyboard-screen control
I was installed in rh9 shorter and shorter want to install months win2003 appeared in the following issues, I use VNC remote operation of the equipment go up in smoke.
[/quote]
vncserver -depth 16 搞定
linux的显示分辩率和刷新频率是经常困惑初来者的问题之一,主要的问题经常出现在:
1:通过X-window设置,但是却没有任何改变
2:刷新频率过低,不知道如何设置
首先,刷新频率的问题,虽然可以通过xvidtune命令进行微调,但是强烈建议小心使用,如果稍微不小心,这个可恶的命令绝对是显示器杀手.推荐的解决问题是使用gtf 命令,比如,如果你需要设置1024*768 100的刷新率,可以使用:gtf 1024 768 100命令,系统会输出数行信息,而后将这些信息复制到/etc/X11/XF86Config中取代注释的两行,而后重启window即可 (redhat9).我这里没有设置是因为我是笔记本液晶屏,不用担心,嘿嘿
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "未探测过的显示器"
# HorizSync 31.5 – 37.9
# VertRefresh 50.0 – 70.0
Option "dpms"
对于分辩率的问题,其实主要原因是显示器具体规则没有被linux识别的原因,比如我上面的"Monixtor"显示为"未探测过的显示器",其实也是不能通过设置器设置为1024的,最简单的方法就是把上面那个文件中的"Screen"的Mods直接设置为唯一的1024×768就可以了,反正就一个选择,它不显示也得显示了,除非你的显示器实在是~~~:
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 16
SubSection "Display"
Depth 16
Modes "1024×768"
EndSubSection
EndSection
VMware with VNC
What I wanted to do
I wanted to startup a VMware virtual machine guest when I boot my host machine, and I wanted it to survive my logging on and off.
As this was quite time consuming to accomplish I thought others might benefit from a recap of my experience.
How I did it
First off, I use RedHat Linux for a VMware host. I\’d love to be able to do this with a Windows 2000 host but have not figured out a way. Please let me know if you do!
I use VNC to provide a detachable (or disconnectable) X environment to run VMware. I startup the VMware VNC session(s) with the rc.local mechanism.
The details
January 2002. I\’m quite familiar with redhat, VMware and VNC having used them all for some time. I decided that before I wrote this up I should do everything over from the bottom up just to make sure I wasn\’t forgetting something. Good thing I did!
I did a clean custom install of Redhat 7.2. Basically I installed everything except various non-english language doc and tools. VNC 3.3.3r2-18 comes along as an rpm. I did a standard install of VMware workstation 3.0.0 build 1455. I\’ve used these techniques with earlier versions of redhat, VMware and VNC but can\’t really say which combinations I\’ve tried. Back to the clean install -
As soon as I started VMware under VNC I hit what are probably the biggest problems.
First, VMware throws up a dialog box complaining about lack of DGA support under VMware – and the dialog box has no "never tell me this again" checkoff. This is a problem because there\’s no easy way to automatically click "OK" as the VMware session starts! It turns out this is fixable by adding a line to the VMware program wide (as opposed to associated with a particular vm) configuration file. That is apparently /usr/lib/vmware/config in a 3.0.0 standard install. The line to add is xinfo.noDGA=true.
The second big problem is that the VMware SVGA driver (vmtools) doesn\’t work with VNC. When the SVGA driver is installed in the guest OS the vm\’s screen would just go black. I originally lived with this problem (using the VGA driver – not the black screen!) for some time as the guest I wanted was linux and all I really needed was the console, which works fine with the VGA driver. When I wanted X access to this machine I just started a VNC server in the guest! But when I wanted to autostart a Windows machine this became unacceptable. After much fiddling I finally discovered that adding -depth 16 to the vncserver startup fixed the black screen.
With those to problems addressed, I manually started an appropriate VNC server with
vncserver -depth 16
then connected to it with
vncviewer
then started up VMware from the xterm inside the vncviewer window with
vmware -x -q ./vmware/vm1/vm1.cfg.
I cleared the remaining dialog boxes with "never tell me again", fixed the guest\’s config to select the right mouse type/device (instead of autoselect), and set the floppy and cd to not connect at startup (in case they were busy doing something else). I repeated the above VMware startup until the guest started \’clean\’ (no dialogs) then shutdown the VNC server and proceeded to automate the startup!
Automating the startup means getting VNC server to start when you boot (or when you login, but I wanted it to happen when I boot) and getting the VMware guest to be started when the VNC server starts.
To get the VNC server to autostart I added the following line to the bottom of the /etc/rc.d/rc.local configuration file
su userid -c "vncserver -localhost -depth 16"
where \’userid\’ is my normal logon (where it did my testing above!). Also I used the -localhost option to provide a little security.
To get my VMware session going I edited the /home/userid/.vnc/xstartup file, replacing the last two lines ("xterm &" and "twm &") of the VNC installed default xstartup file with
vmware -x -q ./vmware/vm1/vm1.cfg.
Then I rebooted, logged on, and used VNC viewer to verify the VMware guest was already started and running.
That pretty much covers the basics!
Another notch!
This is great, but suppose you want to run more than one detached guest, or you want to have VNC available for some other purpose?
Several ways to do the former come to mind; the way I chose involves the latter issue as well. I decided to run each guest in its own independent VNC session. This requires assigning each session a VNC port, creating an xstartup file that distinguishes between ports, starting the guests on the correct ports, and connecting to them on those ports.
I decided to leave the first couple of VNC ports (:1, :2, :3, etc) alone so I could easily use VNC interactively latter, and assign my two vm guests ports :8 and :9.
My pre-VMware VNC startup file was still around as xstatup.original, and I renamed my new VMware one to xstartup.vm1. I cloned the vm1 file to create xstartup.vm2 (and changed the guts to match). Finally I created a new xstartup file like this:
case "$DISPLAY" in
":8" ) $HOME/.vnc/xstartup.vm1 ;;
":9" ) $HOME/.vnc/xstartup.vm2 ;;
* ) $HOME/.vnc/xstartup.original ;;
esac
these changes cause VNC server to startup ports :8 and :9 as desired with the other ports all available for normal use.
I changed the last line of my rc.local from
su userid -c "vncserver -localhost -depth 16"
to
su userid -c "vncserver :8 -localhost -depth 16"
su userid -c "vncserver :9 -localhost -depth 16"
starting the two servers on my assigned ports.
The only change to connect to the servers is that now, since I have more than one VNC server running, I have to specify which one I want to connect to! So to connect to the first vm I use vncviewer :8; to connect to the second vm I use vncviewer :9.
What it doesn\’t do
Without DGA support there is no VMware full screen mode. That means even if you use VNC full screen mode you\’ll still have the VMware window around the guest\’s screen. But see here for how to make VNC full screen mode work better.
Automatic startup doesn\’t mean automatic shutdown! If you want your VMware guests to come down clean you have to connect and shut them down before you shutdown your host! Similarly, if you shutdown a system started VNC session and want to restart it, be careful. If you associate it with your logon session it will be killed, vmware guest and all, when you logoff! One idea I\’ve had to address these problems is a "virtual UPS" support for the guests that would let me tell them they are about to die! Please let me know if you implement this (or a similar solution).
VMware license issues
Some have told me that use of these techniques may be contrary to VMware\’s end user license agreement. I have carefully read that agreement and do not think that is the case. In any event my use of these techniques is not intended to circumvent any part of VMware\’s license.
Some have told me that use of these techniques make VMware\’s server products unnecessary. While I have not tried any of those products (and don\’t really know what their target market is) one thing is apparent. VMware supports them whereas the techniques on this page rely on a non-DGA xserver that VMware says it does not support. Workstations are one thing, but I for one would never configure a production server using tools or techniques the manufacturer does not support. When the server\’s down – and people are screaming at you to get it back up again – being able to call for help is worth something!
历史博文
- Silverlight开发环境 - 2010
- 20080709 Protocol Buffers svn:externals SchemaExplorer - 2009
- 0911 Ewido 家里 扫描 僵尸 - 2007
- 0111 VS2005 单元测试 MSB3113 - 2006
- 软件开发误区之五-归根结底 - 2005