Oracle VM VirtualBox 虚拟机网络桥接所遇问题.求解.
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle VM VirtualBox 虚拟机网络桥接所遇问题.求解.相关的知识,希望对你有一定的参考价值。
参考技术A 问题1:主机单网卡可正常使用虚拟机桥接功能。在虚拟电脑安装好之后,直接配置实际环境中的网络参数即可。问题2:点击“Yes”,在安装过程中是会出现断网现象的,所有人都一样,并非你一个。
问题3:首先你要明白“网络受限或无连接”大多数的原因是因为电脑没有获取到地址,根据你提供的情况所说,就是路由器的原因,因为你的路由器应该开启了DHCP功能,即地址的自动分配,而你朋友的电脑没有路由器,则无法分配到地址(实际上这时候也是有地址的,具体我就不详细说明了)。在你的虚拟电脑搭建好之后,模式选择桥接,那么你的虚拟电脑就已经存在于你的局域网环境中,剩下的只是地址等网络参数的分配,有什么不明白可以追问。
记录一次Oracle VirtualBox 下 Centos 6.5 VM 磁盘扩容
Oracle VirtualBox 创建的 Centos 6.5 VM 默认硬盘大小是8个G(未手工调整),现使用100%,需要扩容。
[[email protected] ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_kaola-lv_root 6.5G 6.2G 32M 100% /
tmpfs 939M 76K 939M 1% /dev/shm
/dev/sda1 477M 59M 393M 14% /boot
cm_processes 939M 0 939M 0% /var/run/cloudera-scm-agent/process
复制vmdk到vdi
由于创建VM时选择的磁盘格式是vmdk,先复制磁盘为vdi格式:
C:\Program Files\Oracle\VirtualBox>
vboxmanage clonehd "kaola.vmdk" "new-kaola.vdi" --format vdi
修改磁盘为 20G:
vboxmanage modifyhd "new-kaola.vdi" --resize 20480
查看磁盘信息:
[[email protected] ~]# fdisk -l
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000490ac
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 2611 20458496 8e Linux LVM下载gparted iso文件,引导vm启动后调整sda2分区;
调整后:
[[email protected] ~]# fdisk -l
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000490ac
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 2611 20458496 8e Linux LVM查看PV VG信息
[[email protected] mapper]# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name vg_kaola
PV Size 19.51 GiB / not usable 2.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 4994
Free PE 3072
Allocated PE 1922
PV UUID TMCfp1-wTiv-efkN-DfJ4-ZHnO-IGa0-iulNOu
[[email protected] mapper]# vgdisplay
--- Volume group ---
VG Name vg_kaola
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 19.51 GiB
PE Size 4.00 MiB
Total PE 4994
Alloc PE / Size 1922 / 7.51 GiB
Free PE / Size 3072 / 12.00 GiB
VG UUID JGyRf4-drnG-n5gs-M3No-LCBC-MEHz-OcewI1调整LV大小
Free PE 3072
[[email protected] mapper]# lvextend -l +3072 /dev/mapper/vg_kaola-lv_root
Extending logical volume lv_root to 18.71 GiB
Logical volume lv_root successfully resized调整文件系统大小
[[email protected] mapper]# resize2fs /dev/mapper/vg_kaola-lv_root
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/vg_kaola-lv_root is mounted on /; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 2
Performing an on-line resize of /dev/mapper/vg_kaola-lv_root to 4904960 (4k) blocks.
The filesystem on /dev/mapper/vg_kaola-lv_root is now 4904960 blocks long.调整后,现在已用为36%:
[[email protected] mapper]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_kaola-lv_root 19G 6.2G 12G 36% /
tmpfs 939M 224K 939M 1% /dev/shm
/dev/sda1 477M 59M 393M 14% /boot
cm_processes 939M 0 939M 0% /var/run/cloudera-scm-agent/process
以上是关于Oracle VM VirtualBox 虚拟机网络桥接所遇问题.求解.的主要内容,如果未能解决你的问题,请参考以下文章
记录一次Oracle VirtualBox 下 Centos 6.5 VM 磁盘扩容
Oracle VM VisualBox 虚拟机创建共享文件夹。
Oracle VM + centos7.1+openstack kilo 多结点安装教程---基础环境配置
Quick and Easy Installation of Oracle Database 12c on Oracle Linux in Oracle VM VirtualBox