Office virtualization

From Wikitech
(Difference between revisions)
Jump to: navigation, search
(Created page with '== Creating virtual machines == # Connect to sfo-virtual1.corp.wikimedia.org either using VNC, or using SSH and X11 forwarding # Launch the virtual machine manager: #: virt-mana...')
 
Line 16: Line 16:
 
## 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"
 
## 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"
 
# In the details view of the virtual machine, under "Boot options", ensure "Start virtual machine on host boot up" is selected.
 
# 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 ===
 +
 +
Though this is now fixed on sfo-virtual1, this is a fix for keyboard mapping problems:
 +
 +
# Ensure the graphics section in "/etc/vmbuilder/libvirt/libvirtxml.tmpl" has "keymap='en-us'" set:
 +
#: <nowiki><graphics type='vnc' port='-1' listen='127.0.0.1' keymap='en-us'/></nowiki>
 +
 +
If you have already created VMs before doing this, you can edit those vms directly using virsh:
 +
 +
# virsh list
 +
#* note domain you wish to edit
 +
# virsh edit
 +
#* Fix the graphics line
 +
# shutdown and start the guest

Revision as of 22:51, 20 December 2010

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

Though this is now fixed on sfo-virtual1, this is a fix for keyboard mapping problems:

  1. Ensure the graphics section in "/etc/vmbuilder/libvirt/libvirtxml.tmpl" has "keymap='en-us'" set:
    <graphics type='vnc' port='-1' listen='127.0.0.1' keymap='en-us'/>

If you have already created VMs before doing this, you can edit those vms directly using virsh:

  1. virsh list
    • note domain you wish to edit
  2. virsh edit
    • Fix the graphics line
  3. shutdown and start the guest
Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox