Office virtualization

From Wikitech
Jump to navigation Jump to search

Creating virtual machines

  1. Connect to sfo-virtual1.corp.wikimedia.org either using VNC, or using SSH and X11 forwarding
  2. Launch the virtual machine manager:
    virt-manager
  3. Connect (by double clicking) to "localhost (QEMU)", not to "localhost (QEMU Usermode)". The latter installs VMs as your account using usermode linux, which is slow and ties the VM to your account. The former uses KVM, and runs the VM with hardware acceleration at the system level.
  4. Click "New", while ensuring you have "localhost (QEMU)" selected
    1. Give the VM a name, and select "Local install media"
    2. Select "Browse" under "Use ISO image"
    3. Either select an already used ISO, or click "Browse Local" to use a new ISO; the location of the media is /var/opt/iso
    4. Select the OS type and version; don't use generic unless you have no other choice
    5. Enter the desired amount of RAM. Generally leave the number of CPUs at 1, unless you have a really good reason to do otherwise.
    6. Give the desired amount of disk space. Try to be reasonable here. 30GB is usually more than enough. You can always expand disks or attach more later.
    7. Uncheck "Allocate entire disk now"
    8. Select "Customize configuration before install"
    9. On the last step in the installer, expand "Advanced options"; for networking select "Specify shared device name", and type in br0 for "Bridge name"; click "Finish"
  5. In the details view of the virtual machine, under "Boot options", ensure "Start virtual machine on host boot up" is selected.

Troubleshooting

Keyboard mapping issues

  1. virsh list
    • Note domain you wish to edit
  2. virsh edit
    • Ensure the graphics section has "keymap='en-us'" set, for instance:
      <graphics type='vnc' port='-1' listen='127.0.0.1' keymap='en-us'/>
  3. shutdown and start the guest
  4. rdesktop works well if you are using an Ubuntu client to connect to the Windows VMs.