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
You can have daily Linux tutorials and FAQs delivered to your email inbox. Simply enter your email address below to subscribe to our mailing list. You will receive hands-on guides and carefully written tutorials related to Linux, everything for free.