Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

List all active guest domains in Xen

Answer:

To list all active guest domains in Xen, you can use the xm list command.

# xm list

Name                                ID  Mem(MiB)   VCPUs      State      Time(s)
Domain-0                            0     768       2         r-----     1029.3
Web-server                         12     256       1         -b----       13.7

Convert Xen IMG based VM to Virtual Box

Answer:

In order to convert a VM image (file based) running in Xen and to use in the Virtual Box, you can use the following tricks.

# VBoxManage convertfromraw -format VDI filename.img filename.vdi

That is it.

SIOCSIFADDR: No such device after cloning VM

Answer:

When you cloned a VM from another machine, or migrated from another VM solution such as Xen, when you start the networking, you might encounter the problem of "SIOCSIFADDR: No such device eth0".

This is because the MAC address of your VM has changed!

To solve it, just enter the command below:

# sudo rm /etc/udev/rules.d/70-persistent-net.rules

Restart your VM and should be okay now.

Cannot start VirtualBox when installed KVM

Answer:

When you have installed the KVM module, it will conflict with your VirtualBox. To solve it in order to use the VirtualBox, execute the following command below:

1. For Intel CPU

# sudo rmmod kvm-intel

2. For AMD CPU

# sudo rmmod kvm-amd

Then you can start VirtualBox instance normally.

Making ntp works in Xen domU

Answer:

In Xen, the clocks of all VMs are controlled by dom0, in order to make ntp work independently, you can edit the file "/etc/sysctl.conf"

xen.independent_wallclock = 1

Restart your server to take effects.