public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* How to run KVM on non-X environment
@ 2008-07-28  5:18 Stephen Liu
  2008-07-28  6:33 ` Ian Kirk
  2008-07-28  6:41 ` Thomas Mueller
  0 siblings, 2 replies; 11+ messages in thread
From: Stephen Liu @ 2008-07-28  5:18 UTC (permalink / raw)
  To: kvm

Hi folks,


Ubuntu 8.04 server amd64, headless
KVM 1:62+dfsg
QEMU 0.9.1
OpenSSH 1:4.7p1


On running
# kvm -m 750 -cdrom /dev/scd0 -boot d ubuntu6.06.img

     =======================|  DirectFB 1.0.1  |=======================
          (c) 2001-2007  The DirectFB Organization (directfb.org)
          (c) 2000-2004  Convergence (integrated media) GmbH
        ------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2008-04-08 15:15) 
(*) Direct/Memcpy: Using libc memcpy()
(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed
    --> No such file or directory
(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment
variable.
(!) DirectFB/Core: Could not initialize 'system' core!
    --> Initialization error!
Could not initialize SDL - exiting


Please advise how to fix the problem.  TIA


B.R.
Stephen L

Send instant messages to your online friends http://uk.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to run KVM on non-X environment
  2008-07-28  5:18 Stephen Liu
@ 2008-07-28  6:33 ` Ian Kirk
  2008-07-28  7:02   ` Stephen Liu
  2008-07-28  6:41 ` Thomas Mueller
  1 sibling, 1 reply; 11+ messages in thread
From: Ian Kirk @ 2008-07-28  6:33 UTC (permalink / raw)
  To: Stephen Liu; +Cc: kvm

Stephen Liu wrote:

> Please advise how to fix the problem.  TIA

Why not just use -vnc :0 or -curses ?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to run KVM on non-X environment
  2008-07-28  5:18 Stephen Liu
  2008-07-28  6:33 ` Ian Kirk
@ 2008-07-28  6:41 ` Thomas Mueller
  1 sibling, 0 replies; 11+ messages in thread
From: Thomas Mueller @ 2008-07-28  6:41 UTC (permalink / raw)
  To: kvm

On Mon, 28 Jul 2008 13:18:32 +0800, Stephen Liu wrote:


> 
> On running
> # kvm -m 750 -cdrom /dev/scd0 -boot d ubuntu6.06.img

add -vnc :<number>

or disable graphics completly (see kvm --help)

- Thomas



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to run KVM on non-X environment
  2008-07-28  6:33 ` Ian Kirk
@ 2008-07-28  7:02   ` Stephen Liu
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Liu @ 2008-07-28  7:02 UTC (permalink / raw)
  To: kvm


--- Ian Kirk <blob@blob.co.uk> wrote:

> Stephen Liu wrote:
> 
> > Please advise how to fix the problem.  TIA
> 
> Why not just use -vnc :0 or -curses ?


Hi Ian,


Please explain in more detail how to make it.  TIA


B.R.
Stephen L

Send instant messages to your online friends http://uk.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to run KVM on non-X environment
       [not found] <200807280936.48137.alberto@byu.edu>
@ 2008-07-28 16:06 ` Stephen Liu
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Liu @ 2008-07-28 16:06 UTC (permalink / raw)
  To: kvm

Hi Alberto,


Thanks for your advice.


> On Monday 28 July 2008 08:09:58 am you wrote:
> > # kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc IP:0
> > Could not parse VNC address
> >
> > # kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc IP:1
> > Could not parse VNC address
> 
> The "IP" address is the listening IP address on the host.  If you
> have more 
> than one NIC and wish to only listen on NIC, then you specify the IP
> address 
> (not "IP").  If you only have one NIC, or you wish to listen for VNC 
> connections on all NIC's, or you just want the thing to work, then
> specify:

I have only one NIC on the server.


> kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc :0

I ran above command direct on the server as root (not remotely on
desktop)

It just hangs there on Xterm.


ubuntu6.06.img is on /root/ubuntu6.06.img


Tried again;

# kvm ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc :0

It also hangs on the Xterm


If without -vnc :0

# kvm ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d

     =======================|  DirectFB 1.0.1  |=======================
          (c) 2001-2007  The DirectFB Organization (directfb.org)
          (c) 2000-2004  Convergence (integrated media) GmbH
        ------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2008-04-08 15:15) 
(*) Direct/Memcpy: Using libc memcpy()
(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed
    --> No such file or directory
(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment
variable.
(!) DirectFB/Core: Could not initialize 'system' core!
    --> Initialization error!
Could not initialize SDL - exiting


I expect clarifying following points;

1) I don't run X on the server.  There are no X packages installed.
2) The CD on the CD-Drive is Ubuntu6.06 installer, NOT its iso image

Can I use the above command?  TIA


B.R.
Stephen


> 
> Then, on your desktop, run "vncviewer host:0" to connect
> (substituting 
> "host" for the domain name or IP address of your KVM host).
> 


Send instant messages to your online friends http://uk.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to run KVM on non-X environment
       [not found] <alpine.LFD.1.10.0807281529480.12809@bcny.fcbq.bet>
@ 2008-07-28 16:09 ` Stephen Liu
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Liu @ 2008-07-28 16:09 UTC (permalink / raw)
  To: kvm


--- Ian Kirk <blob@blob.co.uk> wrote:

> Stephen Liu wrote:
> 
> > # kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc IP:0
> > Could not parse VNC address
> 
> "IP" is not a valid ip address?


Sorry I don't follow.  Please explain in more detail.


B.R.
satimis


Send instant messages to your online friends http://uk.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to run KVM on non-X environment
  2008-07-28 17:42 How to run KVM on non-X environment (RESEND) Thomas Mueller
@ 2008-07-29  8:51 ` Stephen Liu
  2008-07-29 15:50   ` Javier Guerra Giraldez
  2008-07-29 10:16 ` Stephen Liu
  1 sibling, 1 reply; 11+ messages in thread
From: Stephen Liu @ 2008-07-29  8:51 UTC (permalink / raw)
  To: kvm

Hi Thomas,


--- Thomas Mueller <thomas@chaschperli.ch> wrote:

- snip -

> > # kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc IP:1
> 
> on kvm-machine) kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot
> d \
> -vnc :1

On the server running;

# kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc :1

It was hanging there.


> on another host with) vncviewer kvm-machine:1

Unfortnately I don't have vncviewer running on the local desktop.  What
can I do?  TIA


On local desktop Xterm after ssh-connect the server;

# netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address        
State       PID/Program name
tcp        0      0 0.0.0.0:5901            0.0.0.0:*              
LISTEN      5682/kvm        
tcp        0      0 192.168.122.1:53        0.0.0.0:*              
LISTEN      5100/dnsmasq    
tcp6       0      0 :::22                   :::*                   
LISTEN      5561/sshd       
tcp6       0      0 192.168.0.110:22        192.168.0.36:45338     
ESTABLISHED 5566/0          


Is the VM running?


Which packages I have to install for vncviewr, vnc-client, etc. ?


B.R.
Stephen

Send instant messages to your online friends http://uk.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to run KVM on non-X environment
       [not found] <200807281127.20719.alberto@byu.edu>
@ 2008-07-29  9:10 ` Stephen Liu
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Liu @ 2008-07-29  9:10 UTC (permalink / raw)
  To: kvm

Hi Alberto,


Thanks for your detail advice.


--- Alberto Treviño <alberto@byu.edu> wrote:

> On Monday 28 July 2008 10:06:32 am you wrote:
> > I ran above command direct on the server as root (not remotely on
> > desktop)
> >
> > It just hangs there on Xterm.
> 
> As it should. :-) At that point, the VM is running.  It is a process
> on the 
> system.  When the VM is powered off, the process will end and your
> XTerm 
> will return to a bash prompt.  If you want your KVM to run in the 
> background, run with the -daemonize option:
> 
>  kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc :0
> -daemonize
> 
> > I expect clarifying following points;
> 
> > 1) I don't run X on the server.  There are no X packages installed.
> > 2) The CD on the CD-Drive is Ubuntu6.06 installer, NOT its iso
> image
> 
> Check.
> 
> > Can I use the above command? TIA
> 
> Yep.  However, I think at you this point you are not sure what's
> going on or 
> how to proceed.
> 
> When you run the above command on the server, KVM is going to start
> the 
> Virtual Machine.  It will assign the first hard drive to the
> ubuntu6.06.img 
> file (which should have already been created using qemu-img), attach
> the CD 
> drive to the Virtual Machine, assign it 512 MB of memory, and attach
> the 
> virtual video output (what the monitor on a normal computer would
> display), 
> keyboard and mouse to a VNC server.  At that point, the VM will
> perform a 
> BIOS POST and attempt to boot from the CD drive.
> 
> At this stage, you need to connect to the virtual keyboard, mouse and
> 
> monitor via VNC from your desktop (not the server).  To do that, you
> use a 
> VNC viewer to connect to your server (that means your server firewall
> needs 
> to accept connections to port 5900).  Once you connect, your VNC
> session 
> will display the video output of the VM.
> 
> As a side note, I would recommend you don't use the -daemonize option
> until 
> you are ready to leave the VM running.  If your need to "reset" the
> virtual 
> machine, you can use Ctrl-C to kill it and rerun the last command to
> restart 
> it.  Be aware that using Ctrl-C is the equivalent of pulling the
> power cord 
> on a regular machine, so use with care.

My problem here I don't have vnc-viewer running on the local desktop. 
Nor I know which package I need.


Can I install vnc-client on the server.  Let the local desktop to start
it remotely and forward it to the desktop as vncviewer.  The desktop
can ssh-connect the server w/o problem.  If YES please advise how to do
it.  TIA


B.R.
Stephen

Send instant messages to your online friends http://uk.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to run KVM on non-X environment
  2008-07-28 17:42 How to run KVM on non-X environment (RESEND) Thomas Mueller
  2008-07-29  8:51 ` How to run KVM on non-X environment Stephen Liu
@ 2008-07-29 10:16 ` Stephen Liu
  1 sibling, 0 replies; 11+ messages in thread
From: Stephen Liu @ 2008-07-29 10:16 UTC (permalink / raw)
  To: Thomas Mueller, kvm


--- Thomas Mueller <thomas@chaschperli.ch> wrote:

> on kvm-machine) kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot
> d \
> -vnc :1
> 
> on another host with) vncviewer kvm-machine:1


Hi Thomas,

I got it by running Knoppix 5.1-1 LiveCD which has vncviewer installed.


On local desktop;

$ vncviewer 192.168.0.110:1
Connected to RFB server, using protocol version 3.7
No authentication needed
Desktop name "QEMU/KVM"
VNC server default format:
  32 bits per pixel.
  Least significant byte first in each pixel.
  True colour: max red 255 green 255 blue 255, shift red 16 green 8
blue 0
Using default colormap which is TrueColor.  Pixel format:
  16 bits per pixel.
  Least significant byte first in each pixel.
  True colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0
Using shared memory PutImage
ShmCleanup called


The installation window started.  I think I can proceed installing the
guest OS?  However I stopped here because I can bring the mouse in
action over the said window.  Nor the keyboard did function well.  How
to improve them?  TIA


Another question;

If I need to do all steps remotely on local desktop I need to start 2
Xterms to ssh connect the server.  


One to run the command;
# kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc :1

it will hang after executing the command


Another Xterm to run;
# vncview 192.168.0.110:1


Is there a clue?  TIA


B.R.
Stephen 

Send instant messages to your online friends http://uk.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to run KVM on non-X environment
  2008-07-29  8:51 ` How to run KVM on non-X environment Stephen Liu
@ 2008-07-29 15:50   ` Javier Guerra Giraldez
  2008-07-29 16:04     ` Stephen Liu
  0 siblings, 1 reply; 11+ messages in thread
From: Javier Guerra Giraldez @ 2008-07-29 15:50 UTC (permalink / raw)
  To: Stephen Liu; +Cc: kvm

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

On Tuesday 29 July 2008, Stephen Liu wrote:
> # kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc :1
>
> It was hanging there.

it's not a hang.  it's running, but all feedback goes to the VNC port.  maybe 
you'd like it to run in the background, so you get the prompt back.  just add 
a '&' at the end:

kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc :1 &

> On local desktop Xterm after ssh-connect the server;
>
> # netstat -antp
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address           Foreign Address
> State       PID/Program name
> tcp        0      0 0.0.0.0:5901            0.0.0.0:*
> LISTEN      5682/kvm
> tcp        0      0 192.168.122.1:53        0.0.0.0:*
> LISTEN      5100/dnsmasq
> tcp6       0      0 :::22                   :::*
> LISTEN      5561/sshd
> tcp6       0      0 192.168.0.110:22        192.168.0.36:45338
> ESTABLISHED 5566/0
>
>
> Is the VM running?

yes, and port 5901 is VNC's port 1  (since you used -vnc :1)

you do need a VNC client.  it would be the 'screen and keyboard' of the 
virtual machine.  you need at least that to install an OS.  after that, you 
could setup any kind of network access you like directly to the VM (ssh, X, 
RDP, etc)


-- 
Javier

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to run KVM on non-X environment
  2008-07-29 15:50   ` Javier Guerra Giraldez
@ 2008-07-29 16:04     ` Stephen Liu
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Liu @ 2008-07-29 16:04 UTC (permalink / raw)
  To: kvm

Hi Javier,


Thanks for your advice.


--- Javier Guerra Giraldez <javier@guerrag.com> wrote:

> On Tuesday 29 July 2008, Stephen Liu wrote:
> > # kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc :1
> >
> > It was hanging there.
> 
> it's not a hang.  it's running, but all feedback goes to the VNC
> port.  maybe 
> you'd like it to run in the background, so you get the prompt back. 
> just add 
> a '&' at the end:
> 
> kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc :1 &
> 
> > On local desktop Xterm after ssh-connect the server;
> >
> > # netstat -antp
> > Active Internet connections (servers and established)
> > Proto Recv-Q Send-Q Local Address           Foreign Address
> > State       PID/Program name
> > tcp        0      0 0.0.0.0:5901            0.0.0.0:*
> > LISTEN      5682/kvm
> > tcp        0      0 192.168.122.1:53        0.0.0.0:*
> > LISTEN      5100/dnsmasq
> > tcp6       0      0 :::22                   :::*
> > LISTEN      5561/sshd
> > tcp6       0      0 192.168.0.110:22        192.168.0.36:45338
> > ESTABLISHED 5566/0
> >
> >
> > Is the VM running?
> 
> yes, and port 5901 is VNC's port 1  (since you used -vnc :1)
> 
> you do need a VNC client.  it would be the 'screen and keyboard' of
> the 
> virtual machine.  you need at least that to install an OS.  


I ran Knoppix 5.1 on a PC using tightvnc viewer to install the OS,
Ubuntu6.06 as guest.  It is working now.  I also ran update and upgrade
afterwards.


However I haven't figured out how to start it on next boot.  Do I need
putting the installer on CDRom?  On next boot what command shall I run
to start KVM.  What command shall I run to start the guest.  How to
resize the vncviewer window?  TIA


> after
> that, you 
> could setup any kind of network access you like directly to the VM
> (ssh, X, 
> RDP, etc)

Please explain in more detail.  ssh is running on the host.  Thanks


B.R.
Stephen

Send instant messages to your online friends http://uk.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-07-29 16:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200807280936.48137.alberto@byu.edu>
2008-07-28 16:06 ` How to run KVM on non-X environment Stephen Liu
     [not found] <200807281127.20719.alberto@byu.edu>
2008-07-29  9:10 ` Stephen Liu
2008-07-28 17:42 How to run KVM on non-X environment (RESEND) Thomas Mueller
2008-07-29  8:51 ` How to run KVM on non-X environment Stephen Liu
2008-07-29 15:50   ` Javier Guerra Giraldez
2008-07-29 16:04     ` Stephen Liu
2008-07-29 10:16 ` Stephen Liu
     [not found] <alpine.LFD.1.10.0807281529480.12809@bcny.fcbq.bet>
2008-07-28 16:09 ` Stephen Liu
  -- strict thread matches above, loose matches on Subject: below --
2008-07-28  5:18 Stephen Liu
2008-07-28  6:33 ` Ian Kirk
2008-07-28  7:02   ` Stephen Liu
2008-07-28  6:41 ` Thomas Mueller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox