[section_title title=”Update Configuration to Match the New VM”]
Now we have to update a few references in config files to point to the new partitions, and update the console configuration.
Update the Drive References
Let’s update the file system table to point to the correct drives. For this we need to change
sed -i -e 's|/dev/xvda|/dev/sda|g' -e 's|/dev/xvdb|/dev/sdb1|g' /mnt/etc/fstab
Update the Console
Similarly, we need to update the console references.
cp /mnt/etc/init/hvc0.conf /mnt/etc/init/tty0.conf sed -i -e 's|hvc0|tty0|g' /mnt/etc/init/tty0.conf mv /mnt/etc/init/hvc0.conf /mnt/etc/init/hvc0.conf.disabled
Turn Off Networking
I also recommend turning off networking for now so the VM boots quicker, but this is optional.
Comment out the appropriate lines.
#auto eth0 #iface eth0 inet dhcp
Edit Any Other Files
If you prefer you can also do other things like disable services from starting at boot. Just remember that the root is
/mnt/etc) and not
You can also turn off the graphical bootup in the grub config.