How to resize a VirtualBox vmdk file
548
down vote
yes, Brian, you are right: those are the steps, but if you want to end having back a vmdk hard disk (maybe you are interested in using the disk in vwmare too) you miss one more step. So the complete howto is:
1 | VBoxManage clonehd "source.vmdk" "cloned.vdi" --format vdi |
To complete things you need to resize the drive too! To achieve this, you might want to download gparted iso and boot from that iso to resize your drive (select the iso from within the virtualbox settings).
P.S. If your new size is too small, you’ll get the same error even with your new vdi file.
Linux 分区只读
1
down vote
In case it is a fixed drive and not a removable drive, you can add the entry permanently.
1 | sudo vi /etc/fstab |
Add an entry in the following format:
1 | <file-system> <mount-point> <type> <options> <dump> <pass> |
And then do:
1 | mount -a |
mount -o remount,rw /
Centos 7: failed to bring up/down networking: configure interface for a trunk interface
it seems that disabling NetworkManager did the trick :)
1 | systemctl stop NetworkManager |
Rename ethernet interfaces on Centos7
0 Prepare
yum install pciutils -y1 get PCI info:
1 | [root@localhost ~] lspci | grep Ethernet |
2 add config to cat /usr/lib/udev/rules.d/60-net.rules.
Notice: param KERNELS
1 | [root@localhost ~]# cat /usr/lib/udev/rules.d/60-net.rules |
3 reboot
4 check
1 | [root@localhost ~]# cat /usr/lib/udev/rules.d/60-net.rules |
name ethernet interfaces on CentOS7
I’ve learned how to continue to use the ethX prefix. I’m still using the udev rules that I mentioned in post above. So at bootup udev will rename my interfaces netX. And then using /etc/rc.local I’ve included the following commands to rename them from netX back to ethX.
1 | /sbin/ip link set net0 down |
Using the ip command I can change the name of the interfaces after the initial bootup is completed.
One final update.
mac关闭ipv6选项
1 | $ networksetup -listallnetworkservices |
GUIDE: Oracle VM VirtualBox and Oracle Linux NIC bonding
1 | Author: Dude |
1 | Last updates: |
https://community.oracle.com/thread/2546040
What is Linux network interface bonding? Simply put, the Linux system provides a kernel driver, which can create a logical network device (bond) using 2 or more Network Interface Controllers (NIC) to accomplish link-aggregation and adapter fault-tolerance. For more information, please see the Deployment Guide at https://linux.oracle.com/documentation/
The channel bonding interface supports several modes of operation. In a typical active-backup set up for fault-tolerance, the system performs MII-based health monitoring of the network interface slaves (eth0, eth1) and assigns them according to bond options and interface availability. In active-backup mode (mode 1), only the current active network device is seen externally.
Linux bonding for fault-tolerance under Oracle VM VirtualBox does not seem to function as advertised. Searching the Internet for more information shows that other people have tried to set up Linux bonding using various virtualization products, virtual host network adapter and bonding options, but without success.
It appears the management of Media Access Control addresses (MAC) interferes with internal routing methods between the host and the virtual machine guest. Using the modinfo bonding command (fig. 1) shows a listing of available parameters for the bonding kernel module. The fail_over_mac parameter addresses the Mac address issue in VirtualBox.
1 | # modinfo bonding |
Configuration Example
1 | Virtualization Product: Oracle VM VirtualBox 4.2.10 |
VM adapter settings: Bridged Adapter, Paravirtualized Network (virtio-net)
1 | Adapter1 (eth0): 080027436617, en0, Ethernet 1 |
Note: If you wish to reset the network adapter names and MAC addresses used by the Oracle Linux guest system, erase the content of /etc/udev/rules.d/70-persistent-net.rules and restart the virtual machine.
1. Create or modify the following configuration files:
/etc/modprobe.d/bonding-eth0_eth1.conf
alias bond0 bonding/etc/sysconfig/network-scripts/ifcfg-bond0
1 | DEVICE=bond0 |
/etc/sysconfig/network-scripts/ifcfg-eth0
1 | DEVICE=eth0 |
/etc/sysconfig/network-scripts/ifcfg-eth1
1 | DEVICE=eth1 |
2. Restart the system or network services (root):
# service network restartConfiguration Test
Enter the following commands as user root to verify proper operation of NIC bonding:
1 | # tail /var/log/messages |
1 | # ifconfig |
1 | # netstat -rn |
1 | # ifconfig eth0 down |
1 | # ifconfig eth0 up |
During the above test, the client network connection from host 10.0.0.1 (ssh) was maintained without any noticeable interruption. As it can be seen from the syslog and ifconfig command output, the bond0 interface was automatically assigned either the MAC address of eth0 or eth1 and the fail-over worked as advertised.
Centos7网卡配置失败
错误提示
Restarting network (via systemctl): Job for network.service failed. See ‘systemctl status network.service’ and ‘journalctl -xn’ for details.
解决方法
查找原因
systemctl status network.service
cat /var/log/message |grep network- Could not load file ‘/etc/sysconfig/network-scripts/ifcfg-lo’
This is generated by command ‘nmcli con load /etc/sysconfig/network-scripts/ifcfg-lo’ executed by ‘ifup’
Tadding the line “TYPE=loopback” to the file /etc/sysconfig/network-scripts/ifcfg-lo
- 如果是网卡
ip addrget mac address- add to /etc/sysconfig/network-scripts/ifcfg-XXXX HWADDR=XXXXXXXXXXX