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.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!
Latest posts by Dan Nanni (see all)
- How to back up a WordPress website to remote cloud storage from the Linux command line - November 24, 2015
- How to access Dropbox from the command line in Linux - November 22, 2015
- How to send email notifications using Gmail SMTP server on Linux - November 9, 2015