Howto: Resize Xen Loop Disk Image

Win4lin, KVM, QEMU, Virtualbox and Xen are all widely used technologies, used in virtual servers. Fairly often a virtual server run from within a loop filesystem and generally start with a fairly small file (1GB is big for a normal file, but not when it is pretending to be an entire filesystem!)

However things often grow over time.

Here is a nice simple procedure for increasing the size of a loop filesystem, if the filesystem is ext2 or ext3 (the procedure should work for ext4 too, but I havn’t tested it yet)

1. Stop the virtual server that is using the loop filesystem
2. Add some extra space to your loop filesystem file
# dd if=/dev/zero bs=1024k count=1024 >> loop_image_file

This adds 1GB to the end of a file called loop_image_file (make sure to use the append output redirector >> not a single >, otherwise you’ll have an empty 1GB file!)

3. Force a check on the resized/increased filesystem
# e2fsck -f loop_image_file

4. Resize the filesystem within the loop filesystem file
# resize2fs loop_image_file

5. Start the virtual server again

Related posts:

  1. Migrate existing Ext3 filesystems to Ext4
  2. Xen Howto: Install Windows
  3. How to mount bin / cue image files in Linux
  4. Howto: How to Reset the MySQL Root Password
  5. Ubuntu Server Edition JeOS
  6. Howto Install Windows XP / Vista on Xen
  7. How to Mount a Remote Filesystem Using SSH and sshfs
  8. Importing / Exporting Virtual Disk Images with Virtual Box
  9. Ubuntu Howto: Install Xen
  10. Virtualization Visualization with Visio

Comments (7)

Virtualization Visualization with Visio

Visio Guy » Blog Archive » Virtualization Visualization with Visio

Whether you are looking to conserve energy, optimize your hardware usage, or rapidly test a wide variety of software configurations, some sort of virtualization is surely in your future.

And if you are a Visio Guy or a Visio Gal, you’ll surely want to make a diagram to better see how your network’s hardware is set up.

I’ve been hopping around the net looking for (mostly-free) Visio-related resources for virtualization. Here’s what I found…

Microsoft Office Visio 2007 Professional Add-In for Rack Server Virtualization (Virtual Rack)

Microsoft offers and add-in that might save you having to do any manual drawing in the first place! This add-in that works with Visio 2007 to help you plan virtualization. It auto-generates your rack and detailed server diagrams from an Excel template, allowing you to visualize where you can save on space and power.

Related posts:

  1. Installing Xen on Debian Etch 4.0
  2. Stencils for Microsoft Visio
  3. Howto: Office 2007 on Linux with Wine
  4. Ubuntu Server Edition JeOS
  5. Howto Install Windows XP / Vista on Xen
  6. Seamless Windows Applications on Ubuntu Linux Using VirtualBox
  7. Ubuntu Howto: Install Xen
  8. Howto: Resize Xen Loop Disk Image
  9. Xen Howto: Install Windows
  10. Crack or Recover Read-only Password Protected Word Document

Comments (3)

Ubuntu Server Edition JeOS

Ubuntu Server Edition JeOS | Ubuntu

Ubuntu Server Edition JeOS
Just enough OS for your virtual appliance

Ubuntu Server Edition JeOS (pronounced “Juice”) is an efficient variant of our server operating system, configured specifically for virtual appliances. Currently available as a CD-Rom ISO for download, JeOS is a specialised installation of Ubuntu Server Edition with a tuned kernel that only contains the base elements needed to run within a virtualized environment.

Users deploying virtual appliances built on top of JeOS will benefit from:

* better perfomances on the same hardware compared to a full non-optimised OS
* smaller footprint of the virtual appliance on their valuable disk space
* fewer updates and therefore less maintenance than a full server installation

Related posts:

  1. OpenVZ joins forces with Ubuntu
  2. Ubuntu Howto: Install Xen
  3. Ubuntu Netboot and Netinstall with PXE
  4. Howto: Resize Xen Loop Disk Image
  5. Virtualization Visualization with Visio
  6. Ubuntu and Ruby
  7. Ubuntu Howto: Install Oracle
  8. Installing Xen on Debian Etch 4.0
  9. Seamless Windows Applications on Ubuntu Linux Using VirtualBox
  10. Ubuntu Studio

Comments

VMware Killer: Xen With Graphical User Interface On A Fedora 7 Desktop

This guide shows how to set up Xen on a Fedora 7 desktop. Fedora’s virt-manager provides an easy to use GUI for setting up and managing your virtual machines. It does not have the extensive features like VMware Server, but the basics are in place.

read more | digg story

Related posts:

  1. The VMware house of cards
  2. Rethinking the GUI (Graphical User Interface) and the CLI (Command Line Interface)
  3. Fedora 8 Werewolf (Screenshots)
  4. French Ministry of Agriculture and Fisheries Choose Mandriva
  5. Ubuntu Howto: Install Xen
  6. Installing Xen on Debian Etch 4.0
  7. OpenVZ joins forces with Ubuntu
  8. Convert from VMWare To VirtualBox
  9. GMAIL from Linux CLI interface
  10. Howto Install Fedora From a USB Flash Key Drive

Comments

Xen Howto: Install Windows

Xen Logo
This short guide describes how to install Windows XP or Windows 2003 Server on Xen. It provides an overview of the Debian Linux Etch installation, and detailed steps for installing and configuring Xen and starting the Windows XP or Windows 2003 Server
installation.

Requirements

First you need to install Xen on Debian Etch:

sudo apt-get install xen-linux-system-2.6.18-4-xen-686 libc6-xen bridge-utils

Boot into the newly installed Xen enabled Linux kernel

sudo reboot

Then adjusted the network settings in /etc/xen/xend-config.sxp. Enabling the network bridge:

(network-script network-bridge)

Install Xen IO Emulation tools:

sudo apt-get install xen-ioemu-3.0.3-1

Create a directory for the virtual machine files e.g. /home/xen/domains/win01 and create a disk image for the virtual machine’s primary disk.

mkdir /home/xen
mkdir /home/xen/domains
mkdir /home/xen/domains/win01
sudo dd if=/dev/zero of= /home/xen/domains/win01/disk.img bs=1M count=4096

Establish a Xen machine Configuration file (/etc/xen/win01.cfg) like this

kernel = '/usr/lib/xen/boot/hvmloader'
builder = 'hvm'
memory = '256'
device_model='/usr/lib/xen/bin/qemu-dm'

# Disks
disk = [ 'file:/home/xen/domains/win01/disk.img,ioemu:hda,w',
'file:/home/cc/iso-images/WindowsXP-SP2/image.iso,ioemu:hdc:cdrom,r' ]

# Hostname
name = 'win01'

# Networking
vif = ['type=ioemu, bridge=xenbr0']

# Behaviour
boot='d'
vnc=1
vncviewer=1
sdl=0

The ready to fire up the new machine and start the Windows installation in a vnc terminal.

xm create win01.cfg

After the virtual machine is started – a VNC server port should be available on port 5900 at the Xen server’s IP, e.g. 192.168.1.102 – A VNC XEN Client session is depicted here.

Xen Windows Install VNC

If an error like this shows up

Error: Device 0 (vif) could not be connected. Backend device not found.

You should check your that you have enabled the network bridge, “(network-script network-bridge)”, in /etc/xen/xend-config.sxp and restarted the xen deamon by /etc/init.d/xend restart

For more on creating Xen virtual machines read this guide, which outlines the features of the xen-tools package.

Related posts:

  1. Howto Install Windows XP / Vista on Xen
  2. Ubuntu Howto: Install Xen
  3. Installing Xen on Debian Etch 4.0
  4. Seamless Windows Applications on Ubuntu Linux Using VirtualBox
  5. Importing / Exporting Virtual Disk Images with Virtual Box
  6. Top 10 Free Windows 7 Applications
  7. Fedora Howto: Install From Memory-stick
  8. Howto Access via ssh a Virtualbox Guest machine
  9. Howto Install Fedora From a USB Flash Key Drive
  10. Howto: Install Windows Vista Fonts in Ubuntu

Comments (3)

Ubuntu Howto: Install Xen

Xen LogoFor a long time I have tested many different virtualization techniques; Xen, VMWare, and Microsoft VM. Until now I’m able to conclude that all of them are usable on my desktop machine, but both VMWare and Microsoft’s VM are more sluggish that Xen. This weekend I deployed my first server based on the upcoming Ubuntu and Xen. Everything worked out of the box ;)

Here is what I did to install Xen on Ubuntu:

sudo aptitude install ubuntu-xen-desktop bridge-utils

Boot into the newly installed Xen enabled Ubuntu Linux kernel

sudo reboot

Then adjusted the network settings in /etc/xen/xend-config.sxp. Enabling the network bridge:

(network-script network-bridge)

Install xen-tools:

apt-get install xen-tools

Xen tools is a collection package containing different tools related to Xen, a virtual machine creator etc.

Edit adjust the kernel and initrd parameters in /etc/xen-tools/xen-tools.conf to match the ones on your system:

Find out what the kernel image and initrd is named by:

ls /boot/vmlinuz*
/boot/vmlinuz-2.6.19-4-generic

and

ls /boot/initrd*
/boot/initrd.img-2.6.19-4-generic

Adjust the lines

#
# Default kernel and ramdisk to use for the virtual servers
#
kernel = /boot/vmlinuz-2.6.19-4-generic
initrd = /boot/initrd.img-2.6.19-4-generic

Further adjust the xen-tools.conf to this settings:

dir = /home/xen
debootstrap = 1
size = 4Gb # Disk image size.
memory = 128Mb # Memory size
swap = 128Mb # Swap size
fs = ext3 # use the EXT3 filesystem for the disk image.
dist = edgy # Default distribution to install.
image = sparse # Specify sparse vs. full disk images.

Create a home for all the coming virtual Xen guests:

mkdir /home/xen
mkdir /home/xen/domains

And then ready to create a virtual machine – guest, simply by:

xen-create-image -hostname=mailserver -ip=10.0.0.21 -netmask=255.255.255.0 -gateway=10.0.0.1 -passwd

Afterwards I was able to fire up the newly created virtual machine with:

xm create mailserver.cfg

If an error like this shows up

Error: Device 0 (vif) could not be connected. Backend device not found.

You should check your that you have enabled the network bridge, “(network-script network-bridge)”, in /etc/xen/xend-config.sxp and restarted the xen deamon by /etc/init.d/xend restart

When up and running either “xm list” or “xentop” can be used to get an overview of what instance are currently running

ray:# sudo xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0      874     1 r-----    657.9
mailserver                                 3      128     1 -b----      8.0

Read more on Xen and Ubuntu on the XenVirtualMachine wiki page at the Ubuntu Wiki

Related posts:

  1. Installing Xen on Debian Etch 4.0
  2. Xen Howto: Install Windows
  3. Howto Install Windows XP / Vista on Xen
  4. Importing / Exporting Virtual Disk Images with Virtual Box
  5. Ubuntu Howto: Install Ruby and Ruby on Rails
  6. Ubuntu Howto: Install Oracle
  7. Seamless Windows Applications on Ubuntu Linux Using VirtualBox
  8. Howto Install Fedora From a USB Flash Key Drive
  9. Ubuntu Howto: Install Sun Java
  10. Howto: Install Ruby and Rails on Debian or Ubuntu

Comments (13)

The VMware house of cards

Comments

Howto Install Windows XP / Vista on Xen

Xen Logo
This short guide describes how to install Windows XP or Windows 2003 Server on Xen. It provides an overview of the Debian Linux Etch installation, and detailed steps for installing and configuring Xen and starting the Windows XP or Windows 2003 Server
installation.

Requirements

First you need to install Xen on Debian Etch:

sudo apt-get install xen-linux-system-2.6.18-4-xen-686 libc6-xen bridge-utils

Boot into the newly installed Xen enabled Linux kernel

sudo reboot

Then adjusted the network settings in /etc/xen/xend-config.sxp. Enabling the network bridge:

(network-script network-bridge)

Install Xen IO Emulation tools:

sudo apt-get install xen-ioemu-3.0.3-1

Create a directory for the virtual machine files e.g. /home/xen/domains/win01 and create a disk image for the virtual machine’s primary disk.

mkdir /home/xen
mkdir /home/xen/domains
mkdir /home/xen/domains/win01
sudo dd if=/dev/zero of= /home/xen/domains/win01/disk.img bs=1M count=4096

Establish a Xen machine Configuration file (/etc/xen/win01.cfg) like this

kernel = '/usr/lib/xen/boot/hvmloader'
builder = 'hvm'
memory = '256'
device_model='/usr/lib/xen/bin/qemu-dm'

# Disks
disk = [ 'file:/home/xen/domains/win01/disk.img,ioemu:hda,w',
'file:/home/cc/iso-images/WindowsXP-SP2/image.iso,ioemu:hdc:cdrom,r' ]

# Hostname
name = 'win01'

# Networking
vif = ['type=ioemu, bridge=xenbr0']

# Behaviour
boot='d'
vnc=1
vncviewer=1
sdl=0

The ready to fire up the new machine and start the Windows installation in a vnc terminal.

xm create win01.cfg

After the virtual machine is started – a VNC server port should be available on port 5900 at the Xen server’s IP, e.g. 192.168.1.102 – A VNC XEN Client session is depicted here.

Xen Windows Install VNC

If an error like this shows up

Error: Device 0 (vif) could not be connected. Backend device not found.

You should check your that you have enabled the network bridge, “(network-script network-bridge)”, in /etc/xen/xend-config.sxp and restarted the xen deamon by /etc/init.d/xend restart

For more on creating Xen virtual machines read this guide, which outlines the features of the xen-tools package.

Related posts:

  1. Xen Howto: Install Windows
  2. Ubuntu Howto: Install Xen
  3. Installing Xen on Debian Etch 4.0
  4. Importing / Exporting Virtual Disk Images with Virtual Box
  5. Seamless Windows Applications on Ubuntu Linux Using VirtualBox
  6. Howto: Install Windows Vista Fonts in Ubuntu
  7. InfraRecorder: Open Source CD Burning for Windows XP/Vista
  8. X11 for Windows XP and Vista
  9. Howto Install Fedora From a USB Flash Key Drive
  10. Top 10 Free Windows 7 Applications

Comments (54)

« Previous entries Next Page » Next Page »