<li>Follow Ubuntu installation menus to install a basic system with ssh server.</li>

−

<vcpu>1</vcpu>

+

<li>Configure a serial console on ttyS0 (skip this step for 15.04 or later releases):</li>

−

<os>

+

cd /etc/init

−

<type arch="i686">hvm</type>

+

cp tty1.conf ttyS0.conf

−

<boot dev='hd'/>

+

sed -i -e 's/tty1/ttyS0/' ttyS0.conf

−

<boot dev='cdrom'/>

+

<li>Activate startup traces on serial console by editting /etc/default/grub file and setting the GRUB_CMDLINE_LINUX_DEFAULT variable to "console=ttyS0". Also change the boot menu timeout to 0 (sometimes virtual machines get stopped on the boot menu when starting on high loaded systems):</li>

−

</os>

+

GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"

−

<features>

+

GRUB_TIMEOUT=0

−

<pae/>

+

GRUB_RECORDFAIL_TIMEOUT=1

−

<acpi/>

+

<li>Only for Ubuntu 15.10 or later releases:</li>

−

<apic/>

+

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

−

</features>

+

<li>Make grub process the previous changes:</li>

−

<clock sync="localtime"/>

+

update-grub

−

<devices>

+

<li>Add a timeout to systemd-networkd-wait-online service to avoid long waits at startup. Edit /lib/systemd/system/systemd-networkd-wait-online.service and change the following line:</li>

Note: alternative you can start the machine and open the console at the same time with the command:

−

/usr/share/vnx/bin/vnx_modify_rootfs rootfs_ubuntu.xml

−

<li>Follow Ubuntu installation menus to install a basic system with ssh server. Once the installation is finished, stop the machine and edit rootfs_ubuntu.xml file and comment the following line in cdrom disk specification:</li>

Note: ignore the errors "timeout waiting for response on VM socket". 768M are needed if you are installing a root filesystem with desktop interface

+

<li>Access the system through the text console to easy the copy-paste of commands:</li>

+

virsh console vnx_rootfs_kvm_ubuntu.qcow2

+

<li>Access the console and sudo root:</li>

sudo su

sudo su

<li>Update the system</li>

<li>Update the system</li>

Line 70:

Line 49:

apt-get dist-upgrade

apt-get dist-upgrade

<li>Install XML::DOM perl package and ACPI daemon:</li>

<li>Install XML::DOM perl package and ACPI daemon:</li>

−

apt-get install libxml-dom-perl acpid

+

apt-get install libxml-libxml-perl libnetaddr-ip-perl acpid

−

<li>Only for Ubuntu 10.04:</li>

+

<li>For 17.10 or newer install ifupdown</li>

+

apt-get install ifupdown

+

<!--li>Only for Ubuntu 10.04:</li>

<ul>

<ul>

<li>create /media/cdrom* directories:</li>

<li>create /media/cdrom* directories:</li>

Line 81:

Line 62:

/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec,utf8 0 0

/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec,utf8 0 0

−

</ul>

+

</ul-->

−

<li>Configure a serial console on ttyS0:</li>

−

cd /etc/init

−

cp tty1.conf ttyS0.conf

−

sed -i -e 's/tty1/ttyS0/' ttyS0.conf

−

<li>Activate startup traces on serial console by editting /etc/default/grub file and setting the GRUB_CMDLINE_LINUX_DEFAULT variable to "console=ttyS0". Also change the boot menu timeout to 0 (sometimes virtual machines get stopped on the boot menu when starting on high loaded systems):</li>

Note: to avoid nautilus being launched any time you remotely execute a command on the virtual machine using VNX (which interferes with the normal execution of commands), you should disable the start of programs when media insertion takes place. Go to "System settings->System->Details->Removable Media" and deselect the checkbox "Never prompt or start programs on media insertion".

+

<!--

+

nautilus automount feature. Just execute gconf-editor and create a variable "/apps/nautilus/preferences/media_automount" and set it to 0.

If everything went well, your root filesystem will be ready to be used with VNX. You can make a simple test using the simple_ubuntu.xml scenario distributed with VNX.

+

If everything went well, your root filesystem will be ready to be used with VNX. You can make a simple test using the simple_ubuntu.xml scenario distributed with VNX.

−

=== Installing additional software ===

+

== Installing additional software ==

−

To install additional software or modify your root file system, you just have to start it as described above and make the operations required on the filesystem.

+

To install additional software or to modify your root file system, you just have to:

<ul>

<ul>

−

<li>Start the virtual machine (directly using virsh or the vnx_modify_rootfs utility):</li>

+

<li>Start a virtual machine from it:</li>

−

/usr/share/vnx/bin/vnx_modify_rootfs rootfs_ubuntu.xml

+

vnx --modify-rootfs vnx_rootfs_kvm_ubuntu.qcow2

−

<li>Install the software:</li>

+

<li>Check network connectivity. Maybe you have to activate the network interface by hand:</li>

−

apt-get install ...

+

dhclient eth0

−

<li>Stop the machine with:</li>

+

Note: use "ip link show" to know which network interface to use.

+

<li>Do the modifications you want.</li>

+

<li>Finally, halt the system using:</li>

vnx_halt

vnx_halt

</ul>

</ul>

Line 192:

Line 139:

<li>Install dhcp3 packages:</li>

<li>Install dhcp3 packages:</li>

apt-get install dhcp3-server dhcp3-relay

apt-get install dhcp3-server dhcp3-relay

−

<li>Disable autostart (optional):

+

<li>Disable autostart (optional):</li>

update-rc.d -f isc-dhcp-server remove

update-rc.d -f isc-dhcp-server remove

update-rc.d -f isc-dhcp-relay remove

update-rc.d -f isc-dhcp-relay remove

Line 200:

Line 147:

</ul>

</ul>

−

=== Updating ACE daemon ===

+

== Updating VNXACED ==

−

If you have a root filesystem with the autoconfiguration and command execution daemon (ACE) already installed, you can use the autoupdate functionallity to update the daemon to a newer version. Just follow this procedure:

+

You can automatically update the VNXACE daemon with the following command:

−

+

vnx --modify-rootfs vnx_rootfs_kvm_ubuntu.qcow2 --update-aced -y

−

<ul>

+

If VNXACE daemon is not updated automatically, you can do it manually by accessing the virtual machine console and type:

−

<li>Edit the xml described above and comment the line defining the Ubuntu iso file for the cdrom:</li>

+

mount /dev/sdb /mnt/

−

<!--source file='/almacen/iso/ubuntu-10.04-server-i386.iso'/-->

+

perl /mnt/vnxaced-lf/install_vnxaced

−

<li>Start the virtual machine (directly using virsh or the vnx_modify_rootfs utility):</li>

<li>Once the ace daemon is updated the virtual machine will be rebooted automatically.</li>

−

</ul>

−

=== Known problems ===

+

== Known problems ==

<ul>

<ul>

+

<li>Sometimes after restarting, the virtual machines stop at showing the grub menu and do not start until you manually choose one option. To avoid it, just follow the instructions here: http://www.linuxquestions.org/questions/linux-server-73/how-to-disable-grub-2-menu-even-after-server-crash-796562/. Beware that the changes you make to grub.cfg file are lost after executing "update-grub" command.

+

</li>

+

<li>In Ubuntu 12.04 Desktop, graphical commands execution does not work. Command execution fails with "ERROR: no user logged on display :0.0" (see /var/log/vnxaced.log). If you just open a "terminal" window, commands work correctly (does not work if you open other applications; only when you start a terminal...).</li>

<li>Each time a cdrom is mounted (for example, whenever a command is executed on the virtual machine) the following error appears in the console:</li>

<li>Each time a cdrom is mounted (for example, whenever a command is executed on the virtual machine) the following error appears in the console:</li>

Activate startup traces on serial console by editting /etc/default/grub file and setting the GRUB_CMDLINE_LINUX_DEFAULT variable to "console=ttyS0". Also change the boot menu timeout to 0 (sometimes virtual machines get stopped on the boot menu when starting on high loaded systems):

Note: to avoid nautilus being launched any time you remotely execute a command on the virtual machine using VNX (which interferes with the normal execution of commands), you should disable the start of programs when media insertion takes place. Go to "System settings->System->Details->Removable Media" and deselect the checkbox "Never prompt or start programs on media insertion".

In Ubuntu 12.04 Desktop, graphical commands execution does not work. Command execution fails with "ERROR: no user logged on display :0.0" (see /var/log/vnxaced.log). If you just open a "terminal" window, commands work correctly (does not work if you open other applications; only when you start a terminal...).

Each time a cdrom is mounted (for example, whenever a command is executed on the virtual machine) the following error appears in the console: