If you would like to add a secondary hard disk to a guest VM (i.e., domU) on Xen, you can do the following.
First, create a disk image for the secondary hard disk on dom0, as follows:
Then edit Xen configuration for the domU guest VM to include the hard disk.
disk = ['file:/vm/dfs1.img,xvda,w','file:/vm/dfs1-disk2.img,xvdb,w']
Next, power on and boot into the guest VM.
Finally, you need to make the newly attached hard disk available to the guest VM by formatting and mounting it.
/dev/xvdb /mnt ext3 defaults 0 0
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.