Some friends want to use the VirtualBox tool to build a RAC test environment and share the storage division on their personal computers, but they do not know how to use the RAC test environment, the following section describes how to use VirtualBox to build a RAC test environment and share the storage design process.
The process is as follows:
1. Use the vboxmanage.exe tool in virtualboxto create a disk. This tool can be found in the VirtualBox installation directory.
# VBoxManage.exe createhd-filename D: \ oraclevm \ ocr. vdi-size 512-format VDI-variant Fixed
# VBoxManage.exe createhd-filename D: \ oraclevm \ votdis. vdi-size 512-format VDI-variant Fixed
# VBoxManage.exe createhd-filename D: \ oraclevm \ data. vdi-size 3072-format VDI-variant Fixed
# VBoxManage.exe createhd-filename D: \ oraclevm \ falsh. vdi-size 3072-format VDI-variant Fixed
2. Connect the created disk to the VM.
# VBoxManage.exe storageattach linux1 -- storagectl "SATA" -- port 1 -- device 0 -- type hdd -- medium D: \ oraclevm \ ocr. vdi -- mtype retriable
# VBoxManage.exe storageattach linux1 -- storagectl "SATA" -- port 2 -- device 0 -- type hdd -- medium D: \ oraclevm \ votdis. vdi -- mtype retriable
# VBoxManage.exe storageattach linux1 -- storagectl "SATA" -- port 3 -- device 0 -- type hdd -- medium D: \ oraclevm \ data. vdi -- mtype retriable
# VBoxManage.exe storageattach linux1 -- storagectl "SATA" -- port 4 -- device 0 -- type hdd -- medium D: \ oraclevm \ falsh. vdi -- mtype retriable
For the Controller name, follow [Note the Chinese section "SATA controller". This is a string of identifiers]. Enter the Controller name in Chinese and English based on the actual situation. The font in red is as follows:
3. Shared disk. This information will be recorded in the file header of each virtual disk file. Therefore, you do not need to set it as shared when using it.
# VBoxManage.exe modifyhd D: \ oraclevm \ ocr. vdi -- type retriable
# VBoxManage.exe modifyhd D: \ oraclevm \ votdis. vdi -- type retriable
# VBoxManage.exe modifyhd D: \ oraclevm \ data. vdi -- type retriable
# VBoxManage.exe modifyhd D: \ oraclevm \ falsh. vdi -- type retriable
4. Use the following command to add these disks to the node2 node. Pay attention to the Chinese "SATA" Identification name.
# VBoxManage.exe storageattach linux2 -- storagectl "SATA" -- port 1 -- device 0 -- type hdd -- medium D: \ oraclevm \ ocr. vdi -- mtype retriable
# VBoxManage.exe storageattach linux2 -- storagectl "SATA" -- port 2 -- device 0 -- type hdd -- medium D: \ oraclevm \ votdis. vdi -- mtype retriable
# VBoxManage.exe storageattach linux2 -- storagectl "SATA" -- port 3 -- device 0 -- type hdd -- medium D: \ oraclevm \ data. vdi -- mtype retriable
# VBoxManage.exe storageattach linux2 -- storagectl "SATA" -- port 4 -- device 0 -- type hdd -- medium D: \ oraclevm \ falsh. vdi -- mtype retriable
OK! Try it on your own!