Create a Private SMB File Storage without Active Directory

To create an SMB (Server Message Block) without Active Directory on the File Storage system, you can follow these steps:

Create a Windows server on vServer

Below is a basic guide for creating Windows server on vServer, if you already have a server, skip this step.

Instructions for creating Windows server

Before you can perform Windows server initialization, make sure you initialize VPC, Subnet on the vServer system. Next, follow the steps below to initialize Windows server:

  1. Continue to select Servers .

  2. Select Create a Server.

  3. In the Basic Configuration section , enter the Server name to describe the name for your Server. The Server name can consist of letters (az, AZ, 0-9, '_', '-'). The input data length is between 5 and 50. It cannot include leading or trailing spaces and the Server name must be different from the Username.

  4. Select the Zone where you want to create the server.

  5. Enter Tag information including Key / Value for the server and click Add to add this tag if you need.

  6. Select OS Images: Windows, continue to select Window version depending on your usage needs.

  7. Under Instance type, there is a list of Flavor configurations, you can choose the desired Flavor configuration for your Server according to. iot.v1.small1x1 is recommended by us as a default basic configuration to initialize the Server

  8. In Volume Settings , enter the configuration for Boot OS Volume (Root) including Size GB , Volume Type SSD and IOPS , then select Next.

  9. In addition, you can add Data Volume to the Server during the initialization process by selecting Add Data volume, then enter the configuration for the Data Volume including Volume name , Size GB , Volume Type SSD and IOPS , select Next.

  10. Next, select the Network settings parameter : Here you can select VPC to assign Private IP to Server and Subnet from the list you created earlier, or you can click here to create a new VPC and Subnet. Note that after creating VPC and Subnet, it will be displayed on the list page for you to choose during Server initialization:

    1. Check the Floating IP box to assign Public IP to the Server (Click here to see instructions for attaching/ detach Floating IP)

    2. Security group to manage ACL - Access Control List for Server. (Click here to see instructions for creating and managing Security group)

  11. Enter Authentication information : Empty: the system will automatically generate and attach a password or the user can manually adjust and enable or disable skipping the first password change.

  12. In Other Settings , you can choose Server Group or not according to your needs. You can assign Server to previously created Groups (With properties such as same Compute Host or different Compute Host)

  13. Select Launch Server and follow the payment steps to complete the server initialization.

Attention:

Security Groups on Windows server need to open the following ports to share data:

  • With NFS File Storage: open additional port 2049

  • With SMB File Storage with Basic Authentication: open additional port 445

  • With SMB File Storage with Active Directory Authentication: open additional port list to be able to connect from File Storage to AD.


Connect to the Windows server

Below is a basic guide for connecting to Windows server on vServer, if you have used Console directly on vServer Portal, please skip this step.

Connect to Windows server

To be able to connect to a Windows server, you first need to install RDP: By default, Windows will include an RDP Client. To verify, type mstsc at the Command Prompt window. If your computer does not recognize this command, check the Windows home page and search for a download for the Microsoft Remote Desktop application .

  1. Access the Server management page in our driver at: https://hcm-3.console.vngcloud.vn/vserver/v-server/cloud-server

  2. Select the Server you want to connect to, then select Action, then select Connect.

  3. On the Connect to Server page , select the RDP (Window) tab

  1. Select Download RDP File . Your browser will prompt you to open or save the RDP file. When you've finished downloading the file, select Done to return to the server page:

  1. Open the downloaded file to remote to Windows server. Select Connect to continue connecting to your server.

  1. The administrator account is selected by default. You need to copy and paste the password you saved earlier into the login pop-up (This information is taken from the email), in which enter the information InstanceLogin into Username , InstancePassword into Password.

  1. Select OK. Due to the nature of self-signed certificates, you may receive a warning that the security certificate cannot be validated. Use the following steps to verify the identity of the remote computer, or simply select Yes (Windows) or Continue (Mac OS X) if you trust the certificate.

  1. The screen will show that the connection to the Windows server is successful.

After you have connected to Windows server, you need to make sure your Windows server has a static IP address, you can check and configure static IP according to the following instructions:

  • Check the VM's network configuration by:

    • Go to Control Panel > Network & Internet > Network Connections .

    • Select the Ethernet adapter , right-click and select Properties .

  • Set up a static IP address:

    • In the Properties screen , select Internet Protocol Version 4 (TCP/IPv4) and then click the Properties button .

    • Select Use the following IP address to set up a static IP address.

    • Provide address information:

      • IP Address: static IP address of the VM.

      • Subnet Mask: Corresponding subnet, for example: 255.0.0.0


Create a File Storage

Step 1: Go to https://efs.console.vngcloud.vn/overview

Step 2: Select File Storage then select Create a File storage.

Step 3: At the File Storage initialization screen, you need to enter/select:

  • File Storage name: the descriptive name of the storage file. The file name must be between 5 and 50 characters long and can include the characters a-z, AZ, 0-9, '-', '_'

  • Description : enter a description for the storage file.

  • File storage type: select the type of drive you want to use. Currently we only provide Standard HDD drive type.

  • Protocol: select SMB

  • Tag: you can add tags to mark file storage as needed.

  • File Storage Max quota: in the file storage initialization step, you need to set a maximum quota limit for that file storage. This quota means the limit of storage capacity that the file storage can use, helping to manage resources effectively. The minimum quota you need to choose is 1 TB and the maximum quota we provide is 50 TB. If you need to use more than 50 TB for a file storage, please contact us.

  • Network type : for SMB file type, network type must be Private. At this point, you need to select VPC , Subnet that you have created from vServer Portal.

  • Window Authentication: configure access rights via Basic Authentication

    • Basic Authentication: If your Windows server does not have Active Directory or you want to manage access simply through username and password, you can use Basic authentication, we support you to create up to 10 username/password accounts to access file storage.

Step 5: Select Create File Storage.

Step 6: After the system has completed initializing the SMB File Storage, you can get the File Storage IP Address information in the File Storage details section and continue to perform the steps below.


Map File Storage to Windows server

On Windows Server, you can map SMB file storage through the interface or command line.

Through the interface

  1. Open File Explorer.

  2. Right click on This PC and select Map network drive .

  3. In the Map Network Drive window :

    1. Drive letter : Select a drive letter (eg: Z:).

    2. Folder : Enter the SMB share path, for example: \\<File Storage IP Address>\<File Storage Name>. For example \\10.50.3.8\demo-smb.

    3. Select Finish , once done, you can check in File Explorer to see the mapped drive.

Attention:

  • To automatically map the SMB storage file each time Windows Server starts, you can save the information when mapping through the interface by checking the Reconnect at sign-in box before clicking Finish.

Through command line

Use the following command in Command Prompt or PowerShell :

net use Z: \\<File Storage IP Address>\<File Storage Name> 
  • Z: : Is the drive letter you want to mount.

  • \\<File Storage IP Address>\<File Storage Name> : File Storage SMB path.

For example:

net use Z: \\10.50.3.8\demo-smb

Through File Explorer

More simply, you can also directly access the SMB File Storage via File Explorer through the following steps:

  1. Open File Explorer : Press Windows key + E or click the File Explorer icon.

  2. Enter UNC Path : In the address bar, enter the UNC path to the file share. For example:

\\10.50.3.8\demo-smb
  1. Press Enter .


Write data to File Storage

After you have successfully mapped the SMB File Storage to Windows Server, you can write data to the File Storage as follows:

  1. Open a text editor (Notepad):

    • On Windows Server, open Notepad by:

      • Click Start and type Notepad , then press Enter .

    • Or, press Windows key + R , type notepadand press Enter .

  2. Write content to file:

    • In Notepad, type something simple, for example:

      Copy

      Đây là file test ghi vào SMB share.
    • Or enter whatever content you want.

  3. Save file to SMB file storage:

    • Click File > Save As... .

    • In the Save As dialog box , navigate to the drive that you mapped the SMB share to (eg: Z:).

    • Name the file (eg: testfile.txt).

    • Click Save to save the file.

  4. Check files in SMB share:

    • Open File Explorer (shortcut: Windows + E ).

    • Navigate to the SMB drive (eg. Z:).

    • Find and open the file testfile.txtyou just saved to verify the contents.

Last updated