Difference between revisions of "Vnx-rootfsopenbsd"

From VNX
Jump to: navigation, search
(Configuration)
Line 13: Line 13:
 
  vnx --create-rootfs vnx_rootfs_kvm_openbsd64.qcow2 --install-media /almacen/iso/openbsd-install58.iso --mem 512M --arch=x86_64
 
  vnx --create-rootfs vnx_rootfs_kvm_openbsd64.qcow2 --install-media /almacen/iso/openbsd-install58.iso --mem 512M --arch=x86_64
 
<li>Follow OpenBSD installation menus to install a basic system with a user named "vnx". When asked about the network interface, answer "done". Notice that if you have downloaded installXX.iso, you can specify installation from CD in the setup program, instead of downloading packages from network. Later, you can update the system.</li>
 
<li>Follow OpenBSD installation menus to install a basic system with a user named "vnx". When asked about the network interface, answer "done". Notice that if you have downloaded installXX.iso, you can specify installation from CD in the setup program, instead of downloading packages from network. Later, you can update the system.</li>
<li>Configure the serial console by editting /etc/ttys file and changing the line:</li>
 
tty00 "/usr/libexec/getty std.9600"  dialup  off secure
 
to:
 
tty00 "/usr/libexec/getty std.9600"  vt100  on secure
 
 
<li>After ending installation, but before shutting down the virtual machine, you he to disable mpbios, as follows:</li>
 
<li>After ending installation, but before shutting down the virtual machine, you he to disable mpbios, as follows:</li>
 
  chroot /mnt
 
  chroot /mnt
Line 42: Line 38:
 
    
 
    
 
  # virsh console 31
 
  # virsh console 31
 +
<li>Loogin as root in the console and configure the network with DHCP:</li>
 +
dhclient re0
  
 
+
<li>Configure the serial console by editting /etc/ttys file and changing the line:</li>
 +
tty00 "/usr/libexec/getty std.9600"  dialup  off secure
 +
to:
 +
tty00 "/usr/libexec/getty std.9600"  vt100  on secure
  
 
</ul>
 
</ul>

Revision as of 18:00, 2 May 2016

How to create a KVM OpenBSD root filesystem for VNX

Follow this procedure to create a KVM OpenBSD based root filesystem for VNX. The procedure has been tested with OpenBSD 5.8.

Basic installation

  • Create the filesystem disk image:
  • qemu-img create -f qcow2 vnx_rootfs_kvm_openbsd.qcow2 12G
    
  • Get OpenBSD installation CD. For example:
  • wget http://ftp.eu.openbsd.org/pub/OpenBSD/5.8/amd64/install58.iso
    cp install58.iso /almacen/iso
    
  • Create the virtual machine with:
  • vnx --create-rootfs vnx_rootfs_kvm_openbsd64.qcow2 --install-media /almacen/iso/openbsd-install58.iso --mem 512M --arch=x86_64
    
  • Follow OpenBSD installation menus to install a basic system with a user named "vnx". When asked about the network interface, answer "done". Notice that if you have downloaded installXX.iso, you can specify installation from CD in the setup program, instead of downloading packages from network. Later, you can update the system.
  • After ending installation, but before shutting down the virtual machine, you he to disable mpbios, as follows:
  • chroot /mnt
    config -ef /bsd
    disable mpbios
    quit
    
  • Finally, halt the system:
  • halt -p
    

The OS installer will offer to reboot, but do not do that. Instead, kill the VM window and then, in the host OS, interrupt with Ctrl-C the kvm program.


Configuration

  • Start the system with the following command:
  • vnx --modify-rootfs vnx_rootfs_kvm_openbsd.qcow2 --update-aced --mem 512M --arch x86_64
    

    Note: ignore the errors "timeout waiting for response on VM socket".

  • Access the system through the text console to easy the copy-paste of commands:
  • # virsh list
    Id    Name                           State
    ----------------------------------------------------
    31    vnx_rootfs_kvm_openbsd64-5.8-v025.qcow2-912 running
     
    # virsh console 31
    
  • Loogin as root in the console and configure the network with DHCP:
  • dhclient re0
    
  • Configure the serial console by editting /etc/ttys file and changing the line:
  • tty00 "/usr/libexec/getty std.9600"   dialup  off secure
    

    to:

    tty00 "/usr/libexec/getty std.9600"   vt100  on secure