Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running Oneric as the host, would like to create several virtual machines. Both the host and the guests will be headless - there is no display connected, and I'd like to connect to them via ssh.

Looks like kvm is the official ubuntu recommended way, so I'm following the documentation: http://help.ubuntu.com/community/KVM/CreateGuests

Here's my ubuntu-vm-builder command:

sudo ubuntu-vm-builder kvm oneiric \
              --domain xpstage --dest xpstage --hostname xpstage \
              --arch i386 --mem 1024 \
              --user myusername --pass mypassword \
              --bridge virbr0 --ip 192.168.122.2 --dns 8.8.8.8 \
              --components main,universe,restricted \
              --addpkg acpid --addpkg vim --addpkg openssh-server --addpkg avahi-daemon \
              --libvirt qemu:///system ;

The guest appears to build just fine, but I can't reach it.

ssh myusername@192.168.122.2

times out. My bridge network is setup:

virbr0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
      inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:673 errors:0 dropped:0 overruns:0 frame:0
      TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:60839 (60.8 KB)  TX bytes:882 (882.0 B)

So I'm not sure what I'm doing wrong there.

Having failed with ssh I tried to console into it, but

virsh console xpstage

returns immediately, so I added a pty section to the configuration:

virsh edit xpstage

After adding the pty virsh console xpstage connects, but doesn't display anything and key presses don't do anything.

I then tried setting up a Serial Console, but upstart doesn't like that: start: Unknown job: ttyS0 .

Can some kind soul please guide me to how to setup a headless KVM guest on Oneric that I can connect to?

share|improve this question
    
Hi Parand, I came here to find or ask this same question (except my host is Oneiric Desktop, guests are Oneiric server). Did you ever find the solution? –  Kurtosis Jan 16 '12 at 20:55

1 Answer 1

Though I still need to learn to do it via console, If you have a Workstation I would suggest installing virt-manager and connecting it to you KVM server and installing your guest through it, This is what i did and it was near painless, you will need the ISO of whichever your trying to install on the Server.

I did this on a Intel Dual core 2.0ghz with 4gb ram

To this day that VM is running my Website

share|improve this answer
    
I did it your way, and have the same problem as Parand. There's something in default configuration of Oneiric Server running as a guest that seems to block incoming requests, even to sshd -D running on open port 22. –  Kurtosis Jan 16 '12 at 20:54
    
That is interesting, While going through the install process I set up as usual and made sure to select SSH server when it asks what services to install, WAIT as per the WIKI help.ubuntu.com/community/KVM/… I also created a bridge labeled br0 exactly as the guide supplies, except changing the Addresses where needed give this a shot would be my next suggestion, as if its still running in the virt networking it will have a strange IP either way on the VM try running ifconfig and pulling the IP @Kurtosis –  Randy Kupel Jan 19 '12 at 17:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.