Is there a way to dedicate a whole disk to a filesystem, such as root?

Asked by Simon Lambourn

I want to build a VM that has two virtual disks, one for swap and one for the root fs (everything else).
Is there a way in vmbuilder to do this? I can specify two --raw files as the two disks, but I can't see what to put into the
--part vmbuilder.partition file to make root use the whole virtual disk rather than a partition.

I would like to put in vmbuilder.partition
root
-----
swap

(with no sizes), or use root 0 to specify 'use the whole partition'

The reason for this is that I want to install a VM using a logical volume for / and a separate virtual disk for swap, then boot the image in the real physical hardware (with a different swap). if the LV looks like a disk with a partition table, I don't think grub will be able to mount the LV. Any suggestions please? I am trying to avoid installing to one place and copying to another, but that would be a possible solution I guess.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu vm-builder Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Isn't that part of the install procedure. If you present 2 disks to the VM then boot the ISO you can set partitions as you need. / on one disk and /var and /home on the other if you desire. Just use the 'something else' option when partition options are presented.

Revision history for this message
Simon Lambourn (simon-lambourn-o) said :
#2

Hi actionparsnip ... This is how to do it if you use the ISO, but I am trying to use vmbuilder instead, which doesn't use the ISO. vmbuilder is 100% automated with no interaction after entering the command, and it seems to assume that all disks are partitioned. (I did try to build using the ISO and after choosing the "something else" option it hung while scanning the disks so that didn't work for me)

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

From the vmbuilder man page:

"SUPPORT
       Feel free to join #ubuntu-virt on freenode to get some help or just say
       hello."

Maybe you find experts there who can answer your questions.

Can you help with this problem?

Provide an answer of your own, or ask Simon Lambourn for more information if necessary.

To post a message you must log in.