wiki:Paravmssh

Version 6 (modified by quentin, 16 years ago) (diff)

major cleanup

XVM supports running paravirtualized guests. Paravirtualized guests are not virtual machines in the traditional sense; instead of running on emulated hardware, they are aware that they are running inside a VM system and can talk directly to the host. The result is that paravirtualized guests are significantly faster than fully virtualized guests ("HVMs"). To create a new ParaVM, first enter a name and description, then click the "Autoinstall" radio button and select one of the available operating systems from the menu. Finally, click "Create it!"

(Note that the default RAM quota is 512MiB, so if you already have two running VMs, you'll need to shut one of them down to create a new machine.)

After creating the VM, you should wait about 5-6 minutes for the install to complete. During this time, the VM will show as "on" in the web interface. Do not power it off; the operating system is being installed. If you want to watch the progress, you can follow the next set of instructions to see the install's debugging output.

After about 5 minutes, the installation will be done. You can then press the power button in the web interface to turn the VM on. You can access the machine's console from an Athena machine or from any machine that has Kerberos tickets. Assuming you have called your machine "myparavm", you can connect to it with

athena% ssh myparavm@xvm-console.mit.edu
Type Ctrl-e, then c, then . to escape from the console

[Enter `^Ec?' for help]

Hit enter to be given a login prompt. Type "root", and if asked for a password, just hit enter. At this point the machine will only allow logins as root and only allow logins from the console. Normally, we don't want to login as root, so we need to add a user:

root@myParaVM:~# adduser username

where username is preferably your athena identity. This will prompt you for a password and then for some personal information that does not matter for our purposes.

In order to install software, we next need to add ourselves to the sudoers file. If you chose an Ubuntu installation, you can do this by adding your user to the admin group, as follows:

root@myParaVM~# adduser <username> admin

If you chose Debian, you'll need to add yourself to /etc/sudoers:

root@myParaVM~# visudo

This opens /etc/sudoers using the best available text editor (probably nano if you're in Debian).

If nano is used, it should be intuitive - add the following line at the end, save with Ctrl-O, and exit with Ctrl-X:

<username> ALL=(ALL) ALL

If you instead get an original vi, you can type the following sequence of keys (where <enter> and <ctrl> stand for the enter and control keys and [username] is the username you just added:

19jo[username]<space><space><space><space>ALL=(ALL) ALL<esc>:wq<enter>

Now just open up another local terminal and try to ssh into your VM:

athena% ssh username@myParaVM.xvm.mit.edu

and check that you can sudo:

username@myParaVM~$ sudo -l