Tag Archives: xen

Adding a new disk to a Xen VM

      No Comments on Adding a new disk to a Xen VM

Create a new image file (10GiB): (Note: You can also create a sparse file with dd’s seek option. Have a look at the dd manpage or the examples on http://en.wikipedia.org/wiki/Dd_(Unix)) Create the new filesystem: Label the filesystem: Edit the DomU’s config file, /etc/xen/<hostname>.cfg and add the new disk: Start the VM: Edit DomU’s /etc/fstab & mount the disk:

Mounting xen images

      1 Comment on Mounting xen images

Mounting images that contain only one partition is rather easy. But how to mount image with multiple partitions? kpartx is the solution! You can list all partitions within the image with kpartx can be used to create maps from the block devices And those maps can be mounted as usual

Assign hardware to DomU with PCIBack as module [Update]

If the Dom0’s kernel is built with pciback as a module (grep CONFIG_XEN_PCIDEV_BACKEND /boot/config-`uname -r`), using the kernel command-line parameter pciback.hide won’t work. There is of course more than solution how you can assign hardware to a domU, but the probably easiest one is to to pass the hide parameter to the pciback module in /etc/modprobe.conf: The xensouce mailing list… Read more »

Shutting down xen domUs without saving them

Per default, CentOS 5.3 saves a domU’s state when the hypervisor is shut down. In principle this a nice behaviour: The domU will restore its state automagically when the hypervisor comes up again and just continue working. But there are some services (e.g. mldonkey) that don’t like to be restored and refuse to work (i.e. keep in a blocked state… Read more »

Online resizing ext3 partitions

      16 Comments on Online resizing ext3 partitions

First, we have to delete our current partition and create a bigger one (don’t be afraid, no data will be lost): Type m to get a list of all commands: Let’s print out the partition table and look for the ext3 partition, we want to enlarge (it’s easy here, there is just one partition): Now we delete the old partition… Read more »