Ubuntu Server with win2k8 Server VM to Host IIS Site Issue

1

1

I have a ubuntu server(host), and a windows 2008 r2 server(client) virtual machine on it.

All my IIS based sites are located on the host machine, in a location which is shared with the client vm.

I have a reverse-proxy setup to direct the sites to their proper locations, and one site setup in IIS (currently).

On initial setup, I had this site located on the C drive of the virtual machine, and was serving it from there with no issues.

Once I change the location to the shared folder, I come up with 500.19 error. I tried adding the IUSR account permissions on the folder, but I do not think they took, since the folder is a location on the ubuntu host machine.

I have also tried to change the application pools Identity to NetworkService (as suggested on other sites), and have even added the 'Everyone' account to the share, but still get the 500.19 error page.

Any thoughts how I can do this? I sort-of 'need' to do this, because I would like to keep the size of the vm down, thus the need for the network shared off-load. I think it's a conflict between Windows user accounts on the VM, and Linux user accounts on the host, so if I can get even one account to mesh that will work, without messing up the sites currently hosted through Apache on the host would be great!

Kevin

Posted 2013-05-07T12:15:19.153

Reputation: 87

Could you post the full text from the 500.19 error message? There are several types of 500.19 error messages. It also helps if you view the error message from the 2008 VM because the error messages are usually much more verbose when you browse locally rather than from another client. Also, what virtualization software are you using on the linux box to host the VM? VMWare? QEMU? VirtualBox? – Richie086 – 2013-05-09T18:13:53.020

I have it set to show detailed messages publicly. The error is 500.19 cannot read config file. Which boils to a permissions issue due to the files being on the host, and trying to host the sites through the guest – Kevin – 2013-05-10T12:24:19.370

It all has to do with the fact that your files are being hosted on a share and the permissions not jiving with the share. I will respond with an answer that might work below. – Richie086 – 2013-05-10T18:38:44.907

In understand this richie, hence why I asked ;-) – Kevin – 2013-05-10T22:46:40.663

Answers

1

Do this:

  1. In Windows Server 2008, go to Server Manager > Storage > Disk Management
  2. Right click on Disk Management > Create VHD
  3. Select the location as being on your network share (click browse)
  4. Create a fixed size VHD. I would personally make the VHD twice the size of your current dataset if that is possible. It really depends on what you are hosting.
  5. Initalize the disk by right clicking on the new VHD in disk manager and select Initalize Disk.
  6. Format the new volume in Disk Management.
  7. Now, copy your website over to the new virtual hard drive you formatted.
  8. Configure IIS to host your webpage from the location on your VHD.

This gets around the file permission issues you are running into because to the web server, you are hosting from a local hard drive instead of via a network share.

The only issue I could see running into is if you needed to access the data on the site being hosted by IIS in Linux. You can access it over the web, but I do not know of any linux tool you can use to mount a VHD (although one very well could exist!)

I just tried this btw and it worked! Keep in mind the host of the share in my case was not a linux machine but a windows machine - but still the VHD I created was on a network share on another machine.

Richie086

Posted 2013-05-07T12:15:19.153

Reputation: 4 299

One way you could access the data being hosted in IIS via Linux is create a structure where you have a folder on the VHD called Web, and then a subfolder called something else where you actually put your files. Share the Web folder with everyone (or lock it down to specific users) and it should be accessible via Linux via Samba and your website will still work. – Richie086 – 2013-05-10T18:52:17.533

I will attempt the answer above, but this comment is what I am already doing – Kevin – 2013-05-10T22:49:10.160

quick question, why fixed size, and not dynamic? Performance? First try failed with a 'Not enough space' error (even though I have over 1.5 TB free, and am only creating a 100GB VHD)... but I think that may be a permissions thing... let you know in a few – Kevin – 2013-05-10T22:57:06.103

WOW... totally made my network go down trying to create this thing – Kevin – 2013-05-10T23:04:28.313

let me try to do this on a linux share and see what results I get. Like I said, I walked thru the procedure above step by step by the VHD was on a windows share instead of linux - that was really the only difference. – Richie086 – 2013-05-10T23:16:56.053

Fixed size is better for speed compared to dynamically expanding VHD. This is true for Windows Server 2008. In windows server 2012, there have been vast improvements made to dynamically expanding VHDs so the need for a fixed disk has been reduced. The downside of fixed disk obviously is the fact that you are creating a 100GB fixed disk - which will use 100GB of storage no matter if you have 10MB or 99GB in actually in use. – Richie086 – 2013-05-10T23:20:24.393

SO, I just installed samba on a Ubuntu virtual machine, configured a share, created a VHD from windows server 2008, added the disk, copied over some html docs, shared it in IIS and it worked without a hitch! I think the issue you are running into with it killing ur network is due to the fact that it is creating a huge 100GB file on the network share - which will obviously take a lot of bandwidth while it is being created. As a test, make a 100MB VHD and put a single HTML file over on the shared VHD and configure IIS to point at that folder. It does work, without modification. – Richie086 – 2013-05-10T23:33:46.650

Pls let me know if you run into any other issues trying to do this.. For your situation - maybe it would be a better idea to use dynamically expanding disks. I was not aware that you were going to create a 100GB VHD :)... I was thinking like 10GB or something :) – Richie086 – 2013-05-10T23:35:44.783

let us continue this discussion in chat

– Richie086 – 2013-05-10T23:38:51.513

ran into an issue. on reboot the disk does not mount, when trying to attach it, I get 'disk is in use' error – Kevin – 2013-05-11T01:23:42.327

On reboot of the VM or the host OS? – Richie086 – 2013-05-12T00:30:20.743

Did my solution work tho? If so please give me the bounty rep :) – Richie086 – 2013-05-12T00:31:07.373

Just the reboot of the VM, but I found something to auto mount it on machine startup, so all good :) – Kevin – 2013-05-13T11:46:52.457

good to hear! glad I could help.. – Richie086 – 2013-05-13T17:56:48.593