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").
Creating a ParaVM
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.
Accessing the Console
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. (So don't worry, other people can't access your machine.)
Adding a User
Normally, we don't want to login as root, so we'll 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.
Making the new user an administrator
You'll probably want to be able to install software and do other administration tasks without connecting to the console all the time. Here's how to make your new user a sudoer.
Ubuntu
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
Note: Until ticket #118 is fixed, this won't actually work. Run the following lines first:
addgroup --gid 114 admin cat >> /etc/sudoers <<EOF # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL EOF
Debian
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>
Connecting
You must have the SSH server installed to be able to ssh into your VM. If you are running Debian or Ubuntu, run the following commands as root:
root@myParaVM~# apt-get update root@myParaVM~# apt-get install openssh-server ntp
(Note that the second command also installs the NTP client, as accurate timekeeping is essential for SSH to work properly.)
Now, from another terminal on your local machine, you can try to ssh into your VM:
athena% ssh username@myParaVM.xvm.mit.edu
and check that you can sudo:
username@myParaVM~$ sudo aptitude update