How to install a VM guest OS on a device other than /dev/sda

Discussions related to using VirtualBox on Linux hosts.
Post Reply
jimhull
Posts: 5
Joined: 26. Jun 2015, 03:27

How to install a VM guest OS on a device other than /dev/sda

Post by jimhull »

First of all, I admit that I am not a Linux admin. I am an Oracle DBA. If I say or ask something silly below, that's why I am here seeking help. :-)

I have a Dell PowerEdge R710 server with 6 x 2TB disks. It came with Dell RAID 5 pre-configured on those 6 disks. With the RAID 5 configuration, /dev/sda has about 100GB free disk space, /dev/sd[b-e] each has 2TB of free space, and /dev/sdf has about 1.2TB free space.

I intent to use this R710 box as a VM sandbox, on which I will first install OEL 6 on this VM host server, and then create many VirtualBox VM Guest servers (OEL 6) to be used for different releases of Oracle RAC databases. However, I tried in vein to make the Linux installation process to use a device other than /dev/sda as the storage device for the VM guest OS. No matter what I tried, i.e., removed the partition /dev/sda2, removed /dev/sda2 completely from the logical volume and volume group, or combined /dev/sda2 and /dev/sdf1 into the same volume group on the host server, the Linux installation process would stubbornly insist on using /dev/sda as the Storage Device to create logical volumes (lv_root, lv_home, lv_swap) for the guest OS. In fact, it simply could not see other devices. Since /dev/sda only has 100GB of free space, it is not enough for the number of Linux VM guest servers I intent to create. I will have to find a way to make Linux installation to use /dev/sdf as the Storage device for the VM guest servers.

How do I install a OEL 6 VM guest server using /dev/sdf, instead of the default /dev/sda, as the storage device?

Thanks.

Jim
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to install a VM guest OS on a device other than /dev

Post by mpack »

In File|Preferences|General|Default Machine Folder, select a different default folder for VMs.
jimhull
Posts: 5
Joined: 26. Jun 2015, 03:27

Re: How to install a VM guest OS on a device other than /dev

Post by jimhull »

mpack wrote:In File|Preferences|General|Default Machine Folder, select a different default folder for VMs.
Thanks for the response. My Default Machine Folder is /root/VirtualBox VMs, which is on logical volume lv_root on the Host server. lv_root is based on /dev/sdf, not /dev/sda. In fact, only the /boot file system of the Host server was created on /dev/sda. Anyway, I tried what you suggested. I created a filesytem /vbox based on /dev/sdf1, then changed the Default Machine Folder to point to filesystem /vbox. Then I tried to create a Guest Linux server. No difference. The Linux installation still insisted to use /dev/sda to create all the logical volumes, i.e., lv_home, lv_root, and lv_swap. It could only see disk device /dev/sda, not others. I guess it is an Linux issue, rather than an VirtualBox?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to install a VM guest OS on a device other than /dev

Post by Perryg »

VirtualBox is only going to be able to use mounted volumes. If they are not already mounted you can't use it until it is.
That said I don't condone using root for anything so my assistance is going to be limited.
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: How to install a VM guest OS on a device other than /dev

Post by Martin »

jimhull wrote:I created a filesytem /vbox based on /dev/sdf1, then changed the Default Machine Folder to point to filesystem /vbox. Then I tried to create a Guest Linux server. No difference. The Linux installation still insisted to use /dev/sda to create all the logical volumes, i.e., lv_home, lv_root, and lv_swap. It could only see disk device /dev/sda, not others. I guess it is an Linux issue, rather than an VirtualBox?
You are not confusing the virtual volumes inside the guest with the volumes of your host?
If your guest has only a single disk then this virtual PC will of course see this as /dev/sda, because it only has one disk.
That this disk is in reality just a file on your host filesystem has nothing to do with what Linux inside the guest sees as its (virtual) hardware... ;)
jimhull
Posts: 5
Joined: 26. Jun 2015, 03:27

Re: How to install a VM guest OS on a device other than /dev

Post by jimhull »

Perryg wrote:VirtualBox is only going to be able to use mounted volumes. If they are not already mounted you can't use it until it is.
That said I don't condone using root for anything so my assistance is going to be limited.
Hi Perryg, That device /dev/sdf and its partition /dev/sdf1 are present on the host server. The new filesystem /vbox, whicg was created out of /dev/sdf1, was also mounted on the host server. Thanks.

Jim
jimhull
Posts: 5
Joined: 26. Jun 2015, 03:27

Re: How to install a VM guest OS on a device other than /dev

Post by jimhull »

Martin wrote:
jimhull wrote:I created a filesytem /vbox based on /dev/sdf1, then changed the Default Machine Folder to point to filesystem /vbox. Then I tried to create a Guest Linux server. No difference. The Linux installation still insisted to use /dev/sda to create all the logical volumes, i.e., lv_home, lv_root, and lv_swap. It could only see disk device /dev/sda, not others. I guess it is an Linux issue, rather than an VirtualBox?
You are not confusing the virtual volumes inside the guest with the volumes of your host?
If your guest has only a single disk then this virtual PC will of course see this as /dev/sda, because it only has one disk.
That this disk is in reality just a file on your host filesystem has nothing to do with what Linux inside the guest sees as its (virtual) hardware... ;)

Hi Martin, Every volume and devices I referred to was on the host system. There was no virtual volume in the guest system yet. I was trying to install OEL6 onto a blank VM guest system. My Host system has six disk devices, /dev/sd[a-f]. Two of the devices, /dev/sda and /dev/sdf, have been used by the host OS. The rest of 4 disks are reserved for Oracle ASM disks. Thanks. - jim
jimhull
Posts: 5
Joined: 26. Jun 2015, 03:27

Re: How to install a VM guest OS on a device other than /dev

Post by jimhull »

jimhull wrote:
Martin wrote:
jimhull wrote:I created a filesytem /vbox based on /dev/sdf1, then changed the Default Machine Folder to point to filesystem /vbox. Then I tried to create a Guest Linux server. No difference. The Linux installation still insisted to use /dev/sda to create all the logical volumes, i.e., lv_home, lv_root, and lv_swap. It could only see disk device /dev/sda, not others. I guess it is an Linux issue, rather than an VirtualBox?
You are not confusing the virtual volumes inside the guest with the volumes of your host?
If your guest has only a single disk then this virtual PC will of course see this as /dev/sda, because it only has one disk.
That this disk is in reality just a file on your host filesystem has nothing to do with what Linux inside the guest sees as its (virtual) hardware... ;)

Hi Martin, Every volume and devices I referred to was on the host system. There was no virtual volume in the guest system yet. I was trying to install OEL6 onto a blank VM guest system. My Host system has six disk devices, /dev/sd[a-f]. Two of the devices, /dev/sda and /dev/sdf, have been used by the host OS. The rest of 4 disks are reserved for Oracle ASM disks. Thanks. - jim
Hi Martin, you were correct. The /dev/sda shown in the VM guest installation was a virtual device, not the physical device on the host. I was confused because I was not conceptually clear that a guest OS would never see any physical device residing on the host. The reason that led to my confusion was because this virtual device (/dev/sda), or the size of the VDI file, was sized 100GB, happen to be the same size of the physical device /dev/sda on the host. Thanks. - Jim
Post Reply