yum install VirtualBox-5.2 |
# rcvboxdrv setup vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: Starting VirtualBox services. vboxdrv.sh: failed: Running VirtualBox in a Xen environment is not supported. |
yum install VirtualBox-5.2 yum install gcc make perl yum install kernel-uek-devel |
# rcvboxdrv setup vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: Starting VirtualBox services. |
# VirtualBox Qt FATAL: QXcbConnection: Could not connect to display Aborted (core dumped) |
# VBoxManage Oracle VM VirtualBox Command Line Management Interface Version 5.2.0 Usage: VBoxManage [<general option>] <command> General Options: [-v|--version] print version number and exit [-q|--nologo] suppress the logo [--settingspw <pw>] provide the settings password [--settingspwfile <file>] provide a file containing the settings password [@<response-file>] load arguments from the given response file (bourne style) |
# VBoxManage list ostypes | grep Description | grep Solaris Description: Oracle Solaris 10 5/09 and earlier (32-bit) Description: Oracle Solaris 10 5/09 and earlier (64-bit) ... |
# VBoxManage createvm --name ca-zdudic3 --register --ostype Oracle_64 Virtual machine 'ca-zdudic3' is created and registered. UUID: 2b373d3e-9d70-478a-b50f-f7209698e89a Settings file: '/root/VirtualBox VMs/ca-zdudic3/ca-zdudic3.vbox' (this XML file is created) |
# VBoxManage list vms "ca-zdudic3" {2b373d3e-9d70-478a-b50f-f7209698e89a} |
# VBoxManage showvminfo ca-zdudic3 Name: ca-zdudic3 Groups: / Guest OS: Oracle (64-bit) UUID: 2b373d3e-9d70-478a-b50f-f7209698e89a Config file: /root/VirtualBox VMs/ca-zdudic3/ca-zdudic3.vbox Snapshot folder: /root/VirtualBox VMs/ca-zdudic3/Snapshots Log folder: /root/VirtualBox VMs/ca-zdudic3/Logs Hardware UUID: 2b373d3e-9d70-478a-b50f-f7209698e89a Memory size: 128MB ... |
# VBoxManage modifyvm ca-zdudic3 --cpus 2 --memory 1024 --vram 256 # VBoxManage showvminfo ca-zdudic3 ... Memory size: 1024MB VRAM size: 256MB Number of CPUs: 2 |
vm<->host | vm1<->vm2 | vm->internet | vm<-internet | |
---|---|---|---|---|
host only | + | + | - | - |
internal | - | + | - | - |
bridge | + | + | + | + |
NAT | - | - | + | port forwarding |
# ip addr s enp1s0f0 2: enp1s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 inet 10.211.11.10/21 brd 10.211.15.255 scope global noprefixroute dynamic enp1s0f0 |
# VBoxManage modifyvm ca-zdudic3 --nic1 bridged --bridgeadapter1 enp1s0f0 # VBoxManage showvminfo ca-zdudic3 | grep "NIC 1" NIC 1: MAC: 08002711AA17, Attachment: Bridged Interface 'enp1s0f0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none |
# VBoxManage createhd --filename "/root/VirtualBox VMs/ca-zdudic3/ca-zdudic3.vdi" --size 12288 --variant Standard 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Medium created. UUID: e5ca1452-55e7-444a-9232-2cbe88592436 |
# VBoxManage storagectl ca-zdudic3 --name "SATA_controller" --add sata --bootable on |
# VBoxManage storageattach ca-zdudic3 --storagectl SATA_controller --port 0 --type hdd --medium "/root/VirtualBox VMs/ca-zdudic3/ca-zdudic3.vdi" |
Let's install ubuntu-18.04, hence first we need to attach iso image to SATA controller, use port 1. The iso has been placed into /opt directory.
# VBoxManage storageattach ca-zdudic3 --storagectl SATA_controller --port 1 --type dvddrive --medium /opt/ubuntu-18.04-desktop-amd64.iso |
# VBoxManage startvm ca-zdudic3 |
# VBoxManage controlvm ca-zdudic3 poweroff 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% |
# VBoxManage import DOC-1002902.ova --dry-run 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Interpreting /opt/DOC-1002902.ova.. OK. |
# VBoxManage import DOC-1002902.ova --vsys 0 --memory 8192 --cpus 2 --eula accept 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Interpreting /opt/DOC-1002902.ova... OK. Disks: vmdisk2 137438953472 -1 http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized D OC-1002902-disk1.vmdk -1 -1 Virtual system 0: 0: Suggested OS type: "Oracle_64" (change with "--vsys 0 --ostype <type>"; use "list ostypes" to list all possible values) 1: Suggested VM name "DOC-1002902" (change with "--vsys 0 --vmname <name>") 2: Product (ignored): Docker 3: Vendor (ignored): Oracle 4: Version (ignored): 1.10 5: ProductUrl (ignored): https://community.oracle.com/docs/DOC-1002902 6: VendorUrl (ignored): http://oracle.com 7: Description "arn how to customize a Docker container image and use it to instantiate application instances across different Linux servers. This article describes how to create a Dockerfile, how to allocate runtime resources to containers, and how to establish a communication channel between two containers (for example, between web server and database containers)." (change with "--vsys 0 --description <desc>") 8: End-user license agreement (accepted) 9: No. of CPUs specified with --cpus: 2 10: Guest memory specified with --memory: 8192 MB 11: Sound card (appliance expects "", can change on import) (disable with "--vsys 0 --unit 11 --ignore") 12: USB controller (disable with "--vsys 0 --unit 12 --ignore") 13: Network adapter: orig NAT, config 6, extra slot=0;type=NAT 14: CD-ROM (disable with "--vsys 0 --unit 14 --ignore") 15: IDE controller, type PIIX4 (disable with "--vsys 0 --unit 15 --ignore") 16: IDE controller, type PIIX4 (disable with "--vsys 0 --unit 16 --ignore") 17: SATA controller, type AHCI (disable with "--vsys 0 --unit 17 --ignore") 18: Hard disk image: source image=DOC-1002902-disk1.vmdk, target path=/root/VirtualBox VMs/DOC-1002902/DOC-1002902-disk1.vmdk, controller=17;channel=0 (change target path with "--vsys 0 --unit 18 --disk path"; disable with "--vsys 0 --unit 18 --ignore") 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Successfully imported the appliance. |
# VBoxManage controlvm "gettingstartedvagrant_default_1535393838184_70910" poweroff 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% # VBoxManage unregistervm --delete "gettingstartedvagrant_default_1535393838184_70910" 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% |