robvarga
August 23rd, 2008, 04:59 AM
Hi,
I tried to run virtual machines with KVM on 8.04.1-server with amd64 arch, on a Xeon 5405 which supports VMX, and it is enabled in the BIOS (and a cold reboot did take place afterwards), and the kvm_intel module loaded properly.
I ran ubuntu-vm-builder according to the documentation, but I can't seem to make the created image start up properly.
The image seems to be built properly according to the message at the end (there were spurious cannot write to log messages during image creation), and was registered at libvirt. After typing
virsh start test5
virsh claims to have started it up properly, and the kvm process indeed started and consuming 100% of one CPU core.
However, when connecting to it via vnc (from a separate machine), it seems that the virtual machine did not boot up, it is hung at "Booting from Hard Disk...".
I also can't ping the ip address specified for the domain with --ip, I get destination host unreachable from 192.168.122.1 (the vnet0 interface ip address and not the virtual nor the physical machine ip).
I did NOT change the virtual machine definition at virsh, so there is no separate logging defined in the definition, just the default vnc.
I did install the following packages:
kvm libvirt-bin python-virtinst ubuntu-vm-builder
The following is the libvirt domain definition created by ubuntu-vm-builder according to virsh dumpxml test5:
<domain type='kvm' id='11'>
<name>test5</name>
<uuid>96d1a1a5-0616-31e7-3bcd-81957ee565e8</uuid>
<memory>262144</memory>
<currentMemory>262144</currentMemory>
<vcpu>1</vcpu>
<os>
<type>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<source file='/opt/images/test5/root.qcow2'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='network'>
<mac address='52:54:00:ef:9b:11'/>
<source network='default'/>
<target dev='vnet1'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5900' listen='127.0.0.1'/>
</devices>
</domain>
The following are the vnet interfaces I have on the host system (the test5 domain is running at the moment, if it weren't running then vnet1 would disappear):
vnet0 Link encap:Ethernet HWaddr 00:ff:d3:8c:9f:57
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::78cf:9aff:fef8:a7d4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:144 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:6264 (6.1 KB)
vnet1 Link encap:Ethernet HWaddr 00:ff:d3:8c:9f:57
inet6 addr: fe80::2ff:d3ff:fe8c:9f57/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:583 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:30472 (29.7 KB)
I have the kvm, kvm_intel and tun modules loaded by the kernel.
I have the following in the routing table:
root@tramontana:/opt/images/test5# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.122.0 * 255.255.255.0 U 0 0 0 vnet0
default 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
I have the following in the iptables:
root@tramontana:/opt/images/test5# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:bootps
ACCEPT tcp -- anywhere anywhere tcp dpt:bootps
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere 192.168.122.0/24 state RELATED,ESTABLISHED
ACCEPT all -- 192.168.122.0/24 anywhere
ACCEPT all -- anywhere anywhere
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Could someone help me figure this out?
Thanks in advance and best regards,
Robert
I tried to run virtual machines with KVM on 8.04.1-server with amd64 arch, on a Xeon 5405 which supports VMX, and it is enabled in the BIOS (and a cold reboot did take place afterwards), and the kvm_intel module loaded properly.
I ran ubuntu-vm-builder according to the documentation, but I can't seem to make the created image start up properly.
The image seems to be built properly according to the message at the end (there were spurious cannot write to log messages during image creation), and was registered at libvirt. After typing
virsh start test5
virsh claims to have started it up properly, and the kvm process indeed started and consuming 100% of one CPU core.
However, when connecting to it via vnc (from a separate machine), it seems that the virtual machine did not boot up, it is hung at "Booting from Hard Disk...".
I also can't ping the ip address specified for the domain with --ip, I get destination host unreachable from 192.168.122.1 (the vnet0 interface ip address and not the virtual nor the physical machine ip).
I did NOT change the virtual machine definition at virsh, so there is no separate logging defined in the definition, just the default vnc.
I did install the following packages:
kvm libvirt-bin python-virtinst ubuntu-vm-builder
The following is the libvirt domain definition created by ubuntu-vm-builder according to virsh dumpxml test5:
<domain type='kvm' id='11'>
<name>test5</name>
<uuid>96d1a1a5-0616-31e7-3bcd-81957ee565e8</uuid>
<memory>262144</memory>
<currentMemory>262144</currentMemory>
<vcpu>1</vcpu>
<os>
<type>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<source file='/opt/images/test5/root.qcow2'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='network'>
<mac address='52:54:00:ef:9b:11'/>
<source network='default'/>
<target dev='vnet1'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5900' listen='127.0.0.1'/>
</devices>
</domain>
The following are the vnet interfaces I have on the host system (the test5 domain is running at the moment, if it weren't running then vnet1 would disappear):
vnet0 Link encap:Ethernet HWaddr 00:ff:d3:8c:9f:57
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::78cf:9aff:fef8:a7d4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:144 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:6264 (6.1 KB)
vnet1 Link encap:Ethernet HWaddr 00:ff:d3:8c:9f:57
inet6 addr: fe80::2ff:d3ff:fe8c:9f57/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:583 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:30472 (29.7 KB)
I have the kvm, kvm_intel and tun modules loaded by the kernel.
I have the following in the routing table:
root@tramontana:/opt/images/test5# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.122.0 * 255.255.255.0 U 0 0 0 vnet0
default 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
I have the following in the iptables:
root@tramontana:/opt/images/test5# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:bootps
ACCEPT tcp -- anywhere anywhere tcp dpt:bootps
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere 192.168.122.0/24 state RELATED,ESTABLISHED
ACCEPT all -- 192.168.122.0/24 anywhere
ACCEPT all -- anywhere anywhere
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Could someone help me figure this out?
Thanks in advance and best regards,
Robert