Jump to content
XPEnology Community

Mint + XBMC + Virtualbox(DSM 4.2) & direct raw access


Polymorphe

Recommended Posts

Hi,

 

I try to translate my french subject, so be cool with my english.

 

"Hi,

 

Since few weeks I try to have a "direct raw acces" from my DSM to my physical HDD.

 

I have :

- Syno 212j : 2 x 2 To Red, it's too small, so I decide to make my NAS homemade (less expensive and more powerfull)

 

So I take that, in order to replace my 212j :

- Case : Node 304 (6 HDD)

- CM : asrock fm2a85x-itx (CM with 7 sata + 1 esata)

- CPU : A6-5400 K (2 hearts, 65W)

- RAM : 4 Go GSkill F3 1600 C11S

- PSU : Corsair 430 W

- HDD : WD Red 3To x 1

 

I choose AMD because my case go in my TV cabinet and realize that I can use It too as HTPC (AMD has a better GPU)

 

I use Linux Mint 15 Xfce (but I'm a very noob in linux) because : it's light, friendly window user and no need AV

I install XBMC then Virtualbox with DSM 4.2 3202 (I follow the tuto).

 

I would like to have my DSM use physical HDD instead of virtual one in order to avoid loosing files when virtualbox accidently stop (It happens and DSM has to format all the virtual disk)

 

So I have read a lot of forum especially this one :

http://passion-xbmc.org/vos-configurati ... nology%29/

where they're talking about .vmdk.

 

I succed to create .vmdk, and to "mount" it in virtualbox (very difficult for me), but it's impossible to initialize it in DSM.

The .vdi : no problem but for .vmdk there is this message : "System failed to create [Volume 2] ..."; I even try to change the size of my disk in the Raid mode custom.

 

I even try to boot virtualbox in root mode.

 

Rq : If you have the feeling that I'm "easy" with linux it's jut an illusion, I make a lot of research since the past week (e.g : how to find hidden files, ....)

 

Can you help me ?

 

PS : I make 2 post because there is more english user than French one

 

EDIT : I just notice that the link to the french forum is not complete so I modify it

Edited by Guest
Link to comment
Share on other sites

I had same problem but using windows it would start creating the volume then stop with an error it was caused by corrupt/incorrect vmdk I remade the vmdk and it worked fine.

 

the windows command I used is...

 

vboxmanage.exe internalcommands createrawvmdk -filename C:\disk1.vmdk -rawdisk \\.\PhysicalDrive1

 

Unfortunately I'm not using a linux host so I don't know the linux commands. If you look at the drives in storage manager do they look correct? size, details etc.

Link to comment
Share on other sites

Hi, why you dont use native DSM instead of virtual version? one very beautiful hack could be install xmbmc nativeli onto DSM but i dont know howto and if it's possibile i guess not.

 

Hi, I don't use native DSM because I can't install XBMC. Can you explain me which kind of hack you're talking about ?

I also try to find a way to virtualize XBMC in native DSM but it seems to be impossible.

 

Thanks a lot to try to help me.

Edited by Guest
Link to comment
Share on other sites

I had same problem but using windows it would start creating the volume then stop with an error it was caused by corrupt/incorrect vmdk I remade the vmdk and it worked fine.

 

the windows command I used is...

 

vboxmanage.exe internalcommands createrawvmdk -filename C:\disk1.vmdk -rawdisk \\.\PhysicalDrive1

 

Unfortunately I'm not using a linux host so I don't know the linux commands. If you look at the drives in storage manager do they look correct? size, details etc.

 

 

Hi,

 

I see the same thing (corrupt/incorrect .vmdk) on other forum and I create others .vmdk with the same issue.

I also try to re-format my linux, no change.

 

 

The linux command is pretty the same :

VBoxManage internalcommands createrawvmdk -filename disk1.vmdk -rawdisk /dev/sda -partitions 2 -relative

 

Thanks a lot to try to help me.

Link to comment
Share on other sites

You might find your answer on this page http://www.virtualbox.org/manual/ch09.html#rawdisk

 

After looking at your specs I see you have 1 HDD and you are trying to give the guest os (xpenology) access to just the 2nd partition while linux mint is on the 1st partition, I'm not 100% sure but I think you can only give xpenology full access to the whole drive.

 

I think you need 2 HDD, 1st (small) drive for linux mint and then 2nd (large) drive for xpenology, even if you could use 1 hard drive for both os, the host and guest would be reading/writing at the same time.

 

when dsm makes a volume it looks something like this...

 

| 2gb partition | 2gb partition | rest of the space |

 

But you are not giving xpenology access to the whole drive so it's messed up, that's the problem I think.

Link to comment
Share on other sites

You might find your answer on this page http://www.virtualbox.org/manual/ch09.html#rawdisk

 

After looking at your specs I see you have 1 HDD and you are trying to give the guest os (xpenology) access to just the 2nd partition while linux mint is on the 1st partition, I'm not 100% sure but I think you can only give xpenology full access to the whole drive.

 

I think you need 2 HDD, 1st (small) drive for linux mint and then 2nd (large) drive for xpenology, even if you could use 1 hard drive for both os, the host and guest would be reading/writing at the same time.

 

when dsm makes a volume it looks something like this...

 

| 2gb partition | 2gb partition | rest of the space |

 

But you are not giving xpenology access to the whole drive so it's messed up, that's the problem I think.

 

Hi,

 

I undestand that it could be difficult for the host and the guest to read and write at the same time(I don't understand how it work) but in the link you give me there is that :

"9.9.1.2. Access to individual physical hard disk partitions

 

This "raw partition support" is quite similar to the "full hard disk" access described above. However, in this case, any partitioning information will be stored inside the VMDK image, so you can e.g. install a different boot loader in the virtual hard disk without affecting the host's partitioning information."

 

and

 

"To create a special image for raw partition support (which will contain a small amount of data, as already mentioned), on a Linux host, use the command

VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sda -partitions 1,5"

 

and I use this

"Creating the image requires read/write access for the given device. Read/write access is also later needed when using the image from a virtual machine. If this is not feasible, there is a special variant for raw partition access (currently only available on Linux hosts) that avoids having to give the current user access to the entire disk. To set up such an image, use

VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sda -partitions 1,5 -relative"

 

So I don't understand why It doesn't work.

 

Maybe this part of the manual is important :

"In some configurations it may be necessary to change the MBR code of the created image, e.g. to replace the Linux boot loader that is used on the host by another boot loader. This allows e.g. the guest to boot directly to Windows, while the host boots Linux from the "same" disk. For this purpose the -mbr parameter is provided. It specifies a file name from which to take the MBR code. The partition table is not modified at all, so a MBR file from a system with totally different partitioning can be used. An example of this is

VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sda -partitions 1,5 -mbr winxp.mbr

 

The modified MBR will be stored inside the image, not on the host disk.

 

The created image can be attached to a storage controller in a VM configuration as usual."

 

But I don't totally understand the MBR part.

 

Thanks a lot for your help

Link to comment
Share on other sites

There may be a way to get it working on a single hard drive but I doubt it and if the host os is running at the same time as the guest they are reading and writing to the same drive at the same time so it will slow down the drive and wear it out alot quicker, as a nas you don't want it to slow down at all so you need to separate the guest and host onto different disks.

 

I have a similar setup except with windows 7 and I had to do it like this to get good performance...

 

1st drive - 128gb ssd with windows + virtualbox with 2 virtual disks (boot disk and 20gb dsm) and my physical drive below.

2nd drive - 2tb sata2 hdd (uninitialised/turned off) in windows so that the dsm will use it properly.

 

The 2nd drive has to be turned off in windows for it to work maybe this is also an issue in linux aswell but you can't turn it off because it is your os drive. I was unable to do it using just the 2tb drive I had to get another drive I think you may have the same problem.

 

Goodluck, I think american users wake up soon so someone else might be able to help.

Link to comment
Share on other sites

There may be a way to get it working on a single hard drive but I doubt it and if the host os is running at the same time as the guest they are reading and writing to the same drive at the same time so it will slow down the drive and wear it out alot quicker, as a nas you don't want it to slow down at all so you need to separate the guest and host onto different disks.

 

I have a similar setup except with windows 7 and I had to do it like this to get good performance...

 

1st drive - 128gb ssd with windows + virtualbox with 2 virtual disks (boot disk and 20gb dsm) and my physical drive below.

2nd drive - 2tb sata2 hdd (uninitialised/turned off) in windows so that the dsm will use it properly.

 

The 2nd drive has to be turned off in windows for it to work maybe this is also an issue in linux aswell but you can't turn it off because it is your os drive. I was unable to do it using just the 2tb drive I had to get another drive I think you may have the same problem.

 

Goodluck, I think american users wake up soon so someone else might be able to help.

 

Thanks.

 

If I can avoid to buy a HDD for host OS it will be nice.

Do you use an AV on your W7 ? Did you have problem with SSD and Virtualbox or DSM ?

Link to comment
Share on other sites

Windows take less than 30 seconds to fully load I also have virtualbox autostart and boot xpenology vm and it uses normal hard drive for all packages and data inside the vm, I don't use the ssd for caching within dsm.

 

If you install windows onto ssd you should disable things like indexing, defragging, pagefile etc to limit reading and writing to the ssd otherwise they don't last long.

Link to comment
Share on other sites

Hi;

 

Apparently the subjet is not intersseting for the USA Xpenologist.

 

If I don't succeed to resolve it for the next week, I think that I will buy an Hdd for the OS and VB (DSM).

 

How much RAM does W7 use in your system ? How you disable all the stuff you said ?

 

Thanks.

Link to comment
Share on other sites

I have 12gb ram but don't use much at all maybe 2-3 most of the time unless I have multiple vm's running in virtualbox, you only need to disable the things I said if you install onto an ssd, there are a few programs to help such as ssd tweaker and the samsung magician program that comes with samsung ssd's, if you google "optimize windows on ssd" you will see how to manually disable them.

Link to comment
Share on other sites

Hi,

 

Yesterday I check some stuff like AHCI in Virtaulbox, in BIOS (due to the French post) but everything was OK.

So I try to install Linux + XBMC + Virtualbox on another HDD(I forgot an 2.5p HDD of 40 GO in SATA), it works !!

You were right, 2 OS on the same HDD => bad.

 

Now, I will buy a new one (this one is slower than my RED HDD) but I don't know if it will be an SSD or an HDD. SSD (Kingston V300 = 60 - 70 €) = fast, silent, HDD(WD or Seagate 160 - 250 Go = 40 €) = price, space.

 

Thanks

Link to comment
Share on other sites

×
×
  • Create New...