Changeset 105289 in vbox for trunk/doc/manual/en_US/dita/topics/cloud-export-oci-prepare-vm.dita
- Timestamp:
- Jul 12, 2024 9:07:43 AM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/en_US/dita/topics/cloud-export-oci-prepare-vm.dita
r99797 r105289 5 5 6 6 <body> 7 <p> 8 <ph conkeyref="vbox-conkeyref-phrases/oci"/> provides the option to import a custom Linux image. 9 Before an <ph conkeyref="vbox-conkeyref-phrases/product-name"/> image can be exported to <ph conkeyref="vbox-conkeyref-phrases/oci"/>, the 10 custom image needs to be prepared to ensure that instances 11 launched from the custom image can boot correctly and that 12 network connections will work. This section provides advice on 13 how to prepare a Linux image for export from <ph conkeyref="vbox-conkeyref-phrases/product-name"/>. 14 </p> 15 <p> 16 The following list shows some tasks to consider when preparing 17 an Oracle Linux VM for export: 18 </p> 7 <p><ph conkeyref="vbox-conkeyref-phrases/oci"/> provides the option to import a custom Linux image. Before an <ph 8 conkeyref="vbox-conkeyref-phrases/product-name"/> image can be exported to <ph 9 conkeyref="vbox-conkeyref-phrases/oci"/>, the custom image needs to be prepared to ensure that instances 10 launched from the custom image can boot correctly and that network connections will work. This section provides 11 advice on how to prepare a Linux image for export from <ph conkeyref="vbox-conkeyref-phrases/product-name"/>. </p> 12 <p>The following list shows some tasks to consider when preparing an Oracle Linux VM for export: </p> 19 13 <ul> 20 14 <li> … … 31 25 for the VM must not specify the MAC address. 32 26 </p> 33 <p> 34 Remove the HWADDR setting from the 35 <filepath>/etc/sysconfig/ifcfg-<varname>devicename</varname></filepath> 36 network script. 37 </p> 27 <p>Remove the HWADDR setting from the <filepath>/etc/sysconfig/ifcfg-<varname>devicename</varname></filepath> 28 network script. </p> 38 29 </li> 39 30 <li> … … 44 35 <ol> 45 36 <li> 46 <p> 47 Change the GRUB kernel parameters. 48 </p> 49 <p> 50 Add <codeph>net.ifnames=0</codeph> and 51 <codeph>biosdevname=0</codeph> as kernel parameter 52 values to the <codeph>GRUB_CMDLINE_LINUX</codeph> 53 variable. 54 </p> 37 <p>Change the GRUB kernel parameters. </p> 38 <p>Add <codeph>net.ifnames=0</codeph> and <codeph>biosdevname=0</codeph> as kernel parameter values to the 39 <codeph>GRUB_CMDLINE_LINUX</codeph> variable. </p> 55 40 </li> 56 41 <li> 57 <p> 58 Update the GRUB configuration. 59 </p> 42 <p>Update the GRUB configuration. </p> 60 43 <pre xml:space="preserve"># grub2-mkconfig -o /boot/grub2/grub.cfg</pre> 61 44 </li> 62 45 <li> 63 <p> 64 Disable any <codeph>udev</codeph> rules for network 65 device naming. 66 </p> 67 <p> 68 For example, if an automated <codeph>udev</codeph> 69 rule exists for <codeph>net-persistence</codeph>: 70 </p> 46 <p>Disable any <codeph>udev</codeph> rules for network device naming. </p> 47 <p>For example, if an automated <codeph>udev</codeph> rule exists for <codeph>net-persistence</codeph>: </p> 71 48 <pre xml:space="preserve"># cd /etc/udev/rules.d 72 49 # rm -f 70-persistent-net.rules … … 82 59 <ol> 83 60 <li> 84 <p> 85 Edit the <filepath>/etc/default/grub</filepath> file, 86 as follows: 87 </p> 61 <p>Edit the <filepath>/etc/default/grub</filepath> file, as follows: </p> 88 62 <ul> 89 63 <li> 90 <p> 91 Remove the <codeph>resume</codeph> setting from 92 the kernel parameters. This setting slows down 93 boot time significantly. 94 </p> 64 <p>Remove the <codeph>resume</codeph> setting from the kernel parameters. This setting slows down boot 65 time significantly. </p> 95 66 </li> 96 67 <li> 97 <p> 98 Replace <codeph>GRUB_TERMINAL="gfxterm"</codeph> 99 with <codeph>GRUB_TERMINAL="console 100 serial"</codeph>. This configures use of the 101 serial console instead of a graphical terminal. 102 </p> 68 <p>Replace <codeph>GRUB_TERMINAL="gfxterm"</codeph> with <codeph>GRUB_TERMINAL="console 69 serial"</codeph>. This configures use of the serial console instead of a graphical terminal. </p> 103 70 </li> 104 71 <li> 105 <p> 106 Add <codeph>GRUB_SERIAL_COMMAND="serial --unit=0 107 --speed=115200"</codeph>. This configures the 108 serial connection. 109 </p> 72 <p>Add <codeph>GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200"</codeph>. This configures the serial 73 connection. </p> 110 74 </li> 111 75 <li> 112 <p> 113 Add <codeph>console=tty0 114 console=ttyS0,115200</codeph> to the 115 <codeph>GRUB_CMDLINE_LINUX</codeph> variable. 116 This adds the serial console to the Linux kernel 117 boot parameters. 118 </p> 76 <p>Add <codeph>console=tty0 console=ttyS0,115200</codeph> to the <codeph>GRUB_CMDLINE_LINUX</codeph> 77 variable. This adds the serial console to the Linux kernel boot parameters. </p> 119 78 </li> 120 79 </ul> 121 80 </li> 122 81 <li> 123 <p> 124 Regenerate the GRUB configuration. 125 </p> 82 <p>Regenerate the GRUB configuration. </p> 126 83 <pre xml:space="preserve"># grub2-mkconfig -o /boot/grub2/grub.cfg</pre> 127 84 </li> 128 85 <li> 129 <p> 130 To verify the changes, reboot the machine and run the 131 <userinput>dmesg</userinput> command to look for the 132 updated kernel parameters. 133 </p> 86 <p>To verify the changes, reboot the machine and run the <userinput>dmesg</userinput> command to look for 87 the updated kernel parameters. </p> 134 88 <pre xml:space="preserve"># dmesg |grep console=ttyS0</pre> 135 89 </li> … … 144 98 <ol> 145 99 <li> 146 <p> 147 This procedure works only on machines with a Linux 148 kernel of version 3.4 or later. Check that the VM is 149 running a supported kernel: 150 </p> 100 <p>This procedure works only on machines with a Linux kernel of version 3.4 or later. Check that the VM is 101 running a supported kernel: </p> 151 102 <pre xml:space="preserve"># uname -a</pre> 152 103 </li> 153 104 <li> 154 <p> 155 Use the <codeph>dracut</codeph> tool to rebuild 156 <codeph>initrd</codeph>. Add the 157 <codeph>qemu</codeph> module, as follows: 158 </p> 105 <p>Use the <codeph>dracut</codeph> tool to rebuild <codeph>initrd</codeph>. Add the <codeph>qemu</codeph> 106 module, as follows: </p> 159 107 <pre xml:space="preserve"># dracut –-logfile /var/log/Dracut.log --force --add qemu</pre> 160 108 </li> 161 109 <li> 162 <p> 163 Verify that the <codeph>virtio</codeph> drivers are 164 now present in <codeph>initrd</codeph>. 165 </p> 110 <p>Verify that the <codeph>virtio</codeph> drivers are now present in <codeph>initrd</codeph>. </p> 166 111 <pre xml:space="preserve"> # lsinitrd |grep virtio</pre> 167 112 </li> … … 169 114 </li> 170 115 </ul> 171 <p> 172 For more information about importing a custom Linux image into 173 <ph conkeyref="vbox-conkeyref-phrases/oci"/>, see also: 174 </p> 116 <p>For more information about importing a custom Linux image into <ph conkeyref="vbox-conkeyref-phrases/oci"/>, see 117 also: </p> 175 118 <p> 176 119 <ph>https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/importingcustomimagelinux.htm</ph>
Note:
See TracChangeset
for help on using the changeset viewer.