Problem: Modify OS create snapshot and use snapshot hence forth simple task in EC2 , simple on openstack too.
Specifically for CentOS / RHEL
1. Creating snapshot of running machine from Openstack
Ideally perform these steps prior to create snapshot
a. Delete /etc/udev/rules.d/70-persistent-net.rules
b. Also delete any configuration from /etc/sysconfig/network-scripts/ifcfg*
2.. Start VM from image snapshot
(if sub-step on #1 are not done we could still solve issue )
3. Login via console,
use ip link show to display connected nics and their name (assume working nic to be eth1)
Remove eth0 (older nic which no longer exist ) entry from /etc/udev/rules.d/70-persistent-net.rules
Rename last entry eth1 to eth0 ... only if required.
Modify /etc/sysconfig/network-script/ifcfg-eth0 and remove entry for mac id
All n/w stuff is done,
4. Other issue I faced was disk size, my Img was of 20 GB but now I want root drive to be 250GB.
With snap shot disk is 250 GB but only 20 GB is used and allocated to root, here are steps to allocate all 250 GB to root i..e /
a. Create partition using parted
b. parted /dev/vda (it might be diffrent name)
c. mkpart primary <start -- this should be end of previous drive listed by print> <end>
d. toggle 3 lvm [set lvm option for latest partition to true]
e. Reboot for changes to be effective
Specifically for CentOS / RHEL
1. Creating snapshot of running machine from Openstack
Ideally perform these steps prior to create snapshot
a. Delete /etc/udev/rules.d/70-persistent-net.rules
b. Also delete any configuration from /etc/sysconfig/network-scripts/ifcfg*
2.. Start VM from image snapshot
(if sub-step on #1 are not done we could still solve issue )
3. Login via console,
use ip link show to display connected nics and their name (assume working nic to be eth1)
Remove eth0 (older nic which no longer exist ) entry from /etc/udev/rules.d/70-persistent-net.rules
Rename last entry eth1 to eth0 ... only if required.
Modify /etc/sysconfig/network-script/ifcfg-eth0 and remove entry for mac id
All n/w stuff is done,
4. Other issue I faced was disk size, my Img was of 20 GB but now I want root drive to be 250GB.
With snap shot disk is 250 GB but only 20 GB is used and allocated to root, here are steps to allocate all 250 GB to root i..e /
a. Create partition using parted
b. parted /dev/vda (it might be diffrent name)
c. mkpart primary <start -- this should be end of previous drive listed by print> <end>
d. toggle 3 lvm [set lvm option for latest partition to true]
e. Reboot for changes to be effective
No comments:
Post a Comment