Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to create a VM that is "bound" (for lack of a better word) to a given physical drive. I want to partition the physical drive into three slices, one for the core OS, one for swap, and the rest for data. So for example, I might have something like this:
/dev/sda1 --8GB root partition
/dev/sda2 --10GB swap partition
/dev/sda3 --data partition spanning the rest of the drive space
When I tried this, I used the following virt-install command to define the mapping:
My intent was to have /dev/sda1 be mapped to /dev/vda on my VM, and /dev/sda2 to be mapped to /dev/vdb, and /dev/sda3 to be mapped to /dev/vdc. However, what I got was the first two mappings reversed--sda1 was mapped to vdb and sda2 was mapped to vda.
So my question is how can I guarantee the drive mapping will be in a specific order? I didn't see anything in the drive options to specify an id or anything like that.
This has been here for a few days so leeme ask some questions.
You are trying to boot to some OS and then use that mounted partition to then run a VM? Not sure how you even got it to boot at all. I would have thought the command ought to be -disk path=/dev/hdc \
I have in fact used the option "-disk path=/dev/sdX" where sdX is some free drive on my system. That works fine. This gives me a single virtual drive under my VM /named /dev/vda. If I use "-disk path=/dev/sdX1 -disk path=/dev/sdX2 -disk path=/dev/sdX3" where I first partition my drive into specific slices, that also works fine and the VM sees three virtual drives named /dev/vda through /dev/vdc. The problem was that it seemed that the drive order did not map directly to what I gave on the command line. However, I've done some additional tests today and I believe I may have been incorrect about that. In a second test at least the virtual drive order matched. I have to do some more tests to see exactly what's going on.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.