Showing posts from September, 2017

Create an iscsi target

I'll share 2 ways of creating an iscsi target, and will show how to connect to the iscsi target from another machine. This is done in 2 CentOS machines in the same VirtualBox. I did try to connect to the iscsi disk from the host (Windows 7), and it works too! For networking settings, please see How to enable LAN network to access to web server hosted in Oracle VirtualBox I'll skip the partition setup and PV (physical volume)/VG (volume group)/LV (logical volume) setup in this post. Probably I'll find some time to write a about it (not so soon :P). This is my block list. Please note that, I have a LV setup at /dev/sda3 with xfs file system setup in the server, while /dev/sda4 is solely a partition. 2 packages you must install in the server, which is targetcli (to setup the iscsi target block) and targetd. Enable and start target service. Run targetcli to setup iscsi target targetcli is like another command prompt. You can do ls to list out the available tar

How to enable LAN network to access to web server hosted in Oracle VirtualBox

There are 2 ways, one is fully setup in Oracle VirtualBox, the other way is setups in both host and VirtualBox. These methods might not limited for access to the web server in virtual machine, but probably also to access samba server in virtual machine and etc. I haven't tested with other services though. To keep it simple, we'll use a simple httpd service in the VirtualBox machine. Requisites 1. httpd is running in virtual machine. 2. firewall rule in virtual machine allow the access to the http service 3. a test web page is created for the httpd run. To test the web service is working fine in the virtual machine, run the following in virtual machine. OK, let's get started. Power off your virtual machine. Launch the Settings of your virtual machine in VirtualBox Manager. Bind the virtual machine with the host. Set as below: The Host-only Adapter allows the access from your host machine to this virtual machine. With only this setting, your host machine i