[libvirt] Fail to import available VM image

hi, i am trying to import an available KVM image to use with libvirt. i am not sure if this is the problem of libvirt or not, so bear in me if that is not the case. i run the following command, and got error: # virt-install -n winxp -r 800 -f img.winxp --accelerate --vnc --noautoconsole -v --import ERROR [Errno 10] No child processes all the softwares are of latest version (libvirt 0.9.10 and virtinst-0.60.1) where am i wrong? many thanks, Jun

On 02/14/2012 06:17 PM, Jun Koi wrote:
hi,
i am trying to import an available KVM image to use with libvirt.
i am not sure if this is the problem of libvirt or not, so bear in me if that is not the case.
i run the following command, and got error:
# virt-install -n winxp -r 800 -f img.winxp --accelerate --vnc --noautoconsole -v --import ERROR [Errno 10] No child processes
all the softwares are of latest version (libvirt 0.9.10 and virtinst-0.60.1) It works well with python-virtinst-0.600.0-5.el6 for me. if you may attach your .virtinst/virt-install.log, it should be helpful for debugging.
Regards, Alex
where am i wrong?
many thanks, Jun
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Tue, Feb 14, 2012 at 6:57 PM, Alex Jia <ajia@redhat.com> wrote:
On 02/14/2012 06:17 PM, Jun Koi wrote:
hi,
i am trying to import an available KVM image to use with libvirt.
i am not sure if this is the problem of libvirt or not, so bear in me if that is not the case.
i run the following command, and got error:
# virt-install -n winxp -r 800 -f img.winxp --accelerate --vnc --noautoconsole -v --import ERROR [Errno 10] No child processes
all the softwares are of latest version (libvirt 0.9.10 and virtinst-0.60.1)
It works well with python-virtinst-0.600.0-5.el6 for me. if you may attach your .virtinst/virt-install.log, it should be helpful for debugging.
yes, below is the log content. also, one thing i dont understand: why it says "Hypervisor name is 'vbox'" in the log? i dont specify any hypervisor name in my command, and i want to use KVM for my image. thanks. Jun ..... [Tue, 14 Feb 2012 22:10:54 virt-install 2385] DEBUG (cli:220) Launched with command line: /usr/local/bin/virt-install -n winxp -r 800 -f img.winxp --accelerate --vnc --noautoconsole -v --import [Tue, 14 Feb 2012 22:10:54 virt-install 2385] DEBUG (cli:326) Requesting libvirt URI default [Tue, 14 Feb 2012 22:10:55 virt-install 2385] DEBUG (cli:328) Received libvirt URI vbox:///session [Tue, 14 Feb 2012 22:10:55 virt-install 2385] DEBUG (virt-install:259) Requesting virt method 'hvm', hv type 'default'. [Tue, 14 Feb 2012 22:10:55 virt-install 2385] DEBUG (virt-install:469) Received virt method 'hvm' [Tue, 14 Feb 2012 22:10:55 virt-install 2385] DEBUG (virt-install:470) Hypervisor name is 'vbox' [Tue, 14 Feb 2012 22:10:55 virt-install 2385] DEBUG (cli:950) --graphics compat generated: vnc [Tue, 14 Feb 2012 22:10:55 virt-install 2385] ERROR (cli:439) An error occurred, but the cause is unknown [Tue, 14 Feb 2012 22:10:55 virt-install 2385] DEBUG (cli:440) Traceback (most recent call last): File "/usr/local/bin/virt-install", line 1008, in <module> sys.exit(main()) File "/usr/local/bin/virt-install", line 993, in main guest = build_guest_instance(conn, options) File "/usr/local/bin/virt-install", line 529, in build_guest_instance options.disksize, options.sparse, need_storage) File "/usr/local/bin/virt-install", line 164, in get_disks get_disk(disklist[idx], sizelist[idx], sparse, guest, is_file_path) File "/usr/local/bin/virt-install", line 142, in get_disk origdev=dev) File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 732, in disk_prompt sparse=origsparse) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualDisk.py", line 659, in __init__ self.vol_install) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualDisk.py", line 974, in __change_storage path) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualDisk.py", line 182, in _check_if_path_managed vol = lookup_vol_by_path()[0] File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualDisk.py", line 164, in lookup_vol_by_path vol = conn.storageVolLookupByPath(path) File "/usr/lib/python2.6/dist-packages/libvirt.py", line 3077, in storageVolLookupByPath if ret is None:raise libvirtError('virStorageVolLookupByPath() failed', conn=self) libvirtError: An error occurred, but the cause is unknown

Hi Jun, I assume you haven't changed libvirt default URI, it may be a issue, I want to know whether it works for you if you explicitly specify --connect qemu:///system with virt-install? I think a root reason probably is your disk image location, the log said it can't find storage volume, if you put img.winp under the /var/lib/libvirt/images, then give a disk absolute path to virt-install, Does it work for you? Regards, Alex ----- Original Message ----- From: "Jun Koi" <junkoi2004@gmail.com> To: "Alex Jia" <ajia@redhat.com> Cc: libvir-list@redhat.com Sent: Tuesday, February 14, 2012 10:45:49 PM Subject: Re: [libvirt] Fail to import available VM image On Tue, Feb 14, 2012 at 6:57 PM, Alex Jia <ajia@redhat.com> wrote:
On 02/14/2012 06:17 PM, Jun Koi wrote:
hi,
i am trying to import an available KVM image to use with libvirt.
i am not sure if this is the problem of libvirt or not, so bear in me if that is not the case.
i run the following command, and got error:
# virt-install -n winxp -r 800 -f img.winxp --accelerate --vnc --noautoconsole -v --import ERROR [Errno 10] No child processes
all the softwares are of latest version (libvirt 0.9.10 and virtinst-0.60.1)
It works well with python-virtinst-0.600.0-5.el6 for me. if you may attach your .virtinst/virt-install.log, it should be helpful for debugging.
yes, below is the log content. also, one thing i dont understand: why it says "Hypervisor name is 'vbox'" in the log? i dont specify any hypervisor name in my command, and i want to use KVM for my image. thanks. Jun ..... [Tue, 14 Feb 2012 22:10:54 virt-install 2385] DEBUG (cli:220) Launched with command line: /usr/local/bin/virt-install -n winxp -r 800 -f img.winxp --accelerate --vnc --noautoconsole -v --import [Tue, 14 Feb 2012 22:10:54 virt-install 2385] DEBUG (cli:326) Requesting libvirt URI default [Tue, 14 Feb 2012 22:10:55 virt-install 2385] DEBUG (cli:328) Received libvirt URI vbox:///session [Tue, 14 Feb 2012 22:10:55 virt-install 2385] DEBUG (virt-install:259) Requesting virt method 'hvm', hv type 'default'. [Tue, 14 Feb 2012 22:10:55 virt-install 2385] DEBUG (virt-install:469) Received virt method 'hvm' [Tue, 14 Feb 2012 22:10:55 virt-install 2385] DEBUG (virt-install:470) Hypervisor name is 'vbox' [Tue, 14 Feb 2012 22:10:55 virt-install 2385] DEBUG (cli:950) --graphics compat generated: vnc [Tue, 14 Feb 2012 22:10:55 virt-install 2385] ERROR (cli:439) An error occurred, but the cause is unknown [Tue, 14 Feb 2012 22:10:55 virt-install 2385] DEBUG (cli:440) Traceback (most recent call last): File "/usr/local/bin/virt-install", line 1008, in <module> sys.exit(main()) File "/usr/local/bin/virt-install", line 993, in main guest = build_guest_instance(conn, options) File "/usr/local/bin/virt-install", line 529, in build_guest_instance options.disksize, options.sparse, need_storage) File "/usr/local/bin/virt-install", line 164, in get_disks get_disk(disklist[idx], sizelist[idx], sparse, guest, is_file_path) File "/usr/local/bin/virt-install", line 142, in get_disk origdev=dev) File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 732, in disk_prompt sparse=origsparse) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualDisk.py", line 659, in __init__ self.vol_install) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualDisk.py", line 974, in __change_storage path) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualDisk.py", line 182, in _check_if_path_managed vol = lookup_vol_by_path()[0] File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualDisk.py", line 164, in lookup_vol_by_path vol = conn.storageVolLookupByPath(path) File "/usr/lib/python2.6/dist-packages/libvirt.py", line 3077, in storageVolLookupByPath if ret is None:raise libvirtError('virStorageVolLookupByPath() failed', conn=self) libvirtError: An error occurred, but the cause is unknown

On Tue, Feb 14, 2012 at 11:47 PM, Alex Jia <ajia@redhat.com> wrote:
Hi Jun, I assume you haven't changed libvirt default URI, it may be a issue, I want to know whether it works for you if you explicitly specify --connect qemu:///system with virt-install? I think a root reason probably is your disk image location, the log said it can't find storage volume, if you put img.winp under the /var/lib/libvirt/images, then give a disk absolute path to virt-install, Does it work for you?
ok, i change the command a bit, and it went further. here is how i did: (1) compiled everything from source, then install (make install) to my Ubuntu (2) start libvirtd on commandline # libvirtd -d (3) import my KVM image to libvirt $ virt-install --connect qemu:///system -n winxp -r 800 --accelerate --vnc -v --noautoconsole --import -f /home/jun/img/img.winxp it failed, and the log is like below: .... [Tue, 14 Feb 2012 23:51:49 virt-install 3831] DEBUG (cli:326) Requesting libvirt URI qemu:///system [Tue, 14 Feb 2012 23:51:51 virt-install 3831] DEBUG (cli:328) Received libvirt URI qemu:///system [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:259) Requesting virt method 'hvm', hv type 'default'. [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:469) Received virt method 'hvm' [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:470) Hypervisor name is 'kvm' [Tue, 14 Feb 2012 23:51:52 virt-install 3831] ERROR (cli:439) Error in network device parameters: Virtual network 'default' has not been started. [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (cli:440) Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 884, in get_networks dev = parse_network(guest, netstr, mac=mac) File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 1642, in parse_network bridge=opts.get("bridge")) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", line 153, in __init__ self.network = network File "/usr/local/lib/python2.6/dist-packages/virtinst/XMLBuilderDomain.py", line 309, in new_setter fset(self, val, *args, **kwargs) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", line 257, in set_network "started.") % newnet) ValueError: Virtual network 'default' has not been started. i guess perhaps just starting "libvirtd -d" on commandline is not enough. do i need a script to configure and start libvirtd properly for me? and it seems i must configure the virtual network somehow? currently, the output of brtctl is like below: $ brctl show bridge name bridge id STP enabled interfaces pan0 8000.000000000000 no thanks, Jun

Hi Jun, The log is very clear, you need a virtual network 'default' for libvirt default bridge virbr0, it should be your complication issue, the default case is 'virsh' locates in /usr/bin/virsh, and 'libvirtd' locates in /usr/sbin/libvirtd, if your 'virsh' and 'libvirtd' are put other location, I guess you haven't used --prefix=/usr when run ./configure, or you also haven't directly used ./autogen.sh --system, if so, your 'default' virtual network probably doesn't work. so at first, you should make sure virtual network 'default' works well, you may check it by ifconfig and virsh net-list, for example: # ifconfig virbr0 virbr0 Link encap:Ethernet HWaddr 52:54:00:38:FF:C4 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:436 errors:0 dropped:0 overruns:0 frame:0 TX packets:1080 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:56435 (55.1 KiB) TX bytes:127958 (124.9 KiB) # virsh net-list Name State Autostart ----------------------------------------- default active yes # virsh net-dumpxml default <network> <name>default</name> <uuid>40447e3e-4b09-44db-bc70-decef1189044</uuid> <forward mode='nat'/> <bridge name='virbr0' stp='on' delay='0' /> <mac address='52:54:00:38:FF:C4'/> <ip address='192.168.122.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.122.2' end='192.168.122.254' /> </dhcp> </ip> </network> At present, you may try to manually define and active 'default' virtual network, and paste the above xml into /etc/libvirt/qemu/networks/default.xml then virsh net-define /etc/libvirt/qemu/networks/default.xml and virsh net-create default, if everything is okay you will see a active default network by virsh net-list, and you also see a network bridge named 'virbr0' on host by ifconfig. Finally, if virtual work works well, then you may try previous operations. Good Luck! Alex ----- Original Message ----- From: "Jun Koi" <junkoi2004@gmail.com> To: "Alex Jia" <ajia@redhat.com> Cc: libvir-list@redhat.com Sent: Wednesday, February 15, 2012 12:01:58 AM Subject: Re: [libvirt] Fail to import available VM image On Tue, Feb 14, 2012 at 11:47 PM, Alex Jia <ajia@redhat.com> wrote:
Hi Jun, I assume you haven't changed libvirt default URI, it may be a issue, I want to know whether it works for you if you explicitly specify --connect qemu:///system with virt-install? I think a root reason probably is your disk image location, the log said it can't find storage volume, if you put img.winp under the /var/lib/libvirt/images, then give a disk absolute path to virt-install, Does it work for you?
ok, i change the command a bit, and it went further. here is how i did: (1) compiled everything from source, then install (make install) to my Ubuntu (2) start libvirtd on commandline # libvirtd -d (3) import my KVM image to libvirt $ virt-install --connect qemu:///system -n winxp -r 800 --accelerate --vnc -v --noautoconsole --import -f /home/jun/img/img.winxp it failed, and the log is like below: .... [Tue, 14 Feb 2012 23:51:49 virt-install 3831] DEBUG (cli:326) Requesting libvirt URI qemu:///system [Tue, 14 Feb 2012 23:51:51 virt-install 3831] DEBUG (cli:328) Received libvirt URI qemu:///system [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:259) Requesting virt method 'hvm', hv type 'default'. [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:469) Received virt method 'hvm' [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:470) Hypervisor name is 'kvm' [Tue, 14 Feb 2012 23:51:52 virt-install 3831] ERROR (cli:439) Error in network device parameters: Virtual network 'default' has not been started. [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (cli:440) Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 884, in get_networks dev = parse_network(guest, netstr, mac=mac) File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 1642, in parse_network bridge=opts.get("bridge")) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", line 153, in __init__ self.network = network File "/usr/local/lib/python2.6/dist-packages/virtinst/XMLBuilderDomain.py", line 309, in new_setter fset(self, val, *args, **kwargs) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", line 257, in set_network "started.") % newnet) ValueError: Virtual network 'default' has not been started. i guess perhaps just starting "libvirtd -d" on commandline is not enough. do i need a script to configure and start libvirtd properly for me? and it seems i must configure the virtual network somehow? currently, the output of brtctl is like below: $ brctl show bridge name bridge id STP enabled interfaces pan0 8000.000000000000 no thanks, Jun

On 02/14/2012 11:01 AM, Jun Koi wrote:
On Tue, Feb 14, 2012 at 11:47 PM, Alex Jia <ajia@redhat.com> wrote:
Hi Jun, I assume you haven't changed libvirt default URI, it may be a issue, I want to know whether it works for you if you explicitly specify --connect qemu:///system with virt-install? I think a root reason probably is your disk image location, the log said it can't find storage volume, if you put img.winp under the /var/lib/libvirt/images, then give a disk absolute path to virt-install, Does it work for you? ok, i change the command a bit, and it went further. here is how i did:
(1) compiled everything from source, then install (make install) to my Ubuntu
(2) start libvirtd on commandline # libvirtd -d
(3) import my KVM image to libvirt
$ virt-install --connect qemu:///system -n winxp -r 800 --accelerate --vnc -v --noautoconsole --import -f /home/jun/img/img.winxp
it failed, and the log is like below:
.... [Tue, 14 Feb 2012 23:51:49 virt-install 3831] DEBUG (cli:326) Requesting libvirt URI qemu:///system [Tue, 14 Feb 2012 23:51:51 virt-install 3831] DEBUG (cli:328) Received libvirt URI qemu:///system [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:259) Requesting virt method 'hvm', hv type 'default'. [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:469) Received virt method 'hvm' [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:470) Hypervisor name is 'kvm' [Tue, 14 Feb 2012 23:51:52 virt-install 3831] ERROR (cli:439) Error in network device parameters: Virtual network 'default' has not been started. [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (cli:440) Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 884, in get_networks dev = parse_network(guest, netstr, mac=mac) File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 1642, in parse_network bridge=opts.get("bridge")) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", line 153, in __init__ self.network = network File "/usr/local/lib/python2.6/dist-packages/virtinst/XMLBuilderDomain.py", line 309, in new_setter fset(self, val, *args, **kwargs) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", line 257, in set_network "started.") % newnet) ValueError: Virtual network 'default' has not been started.
A very common cause of this problem is that a systemwide instance of dnsmasq is already (erroneously) listening on the bridge created by libvirt for the default network. I took your email as an oppurtunity to write an entry in the new Troubleshooting section of the libvirt wiki. It will explain to you how to solve your problem (*if* this is your problem, of course :-). http://wiki.libvirt.org/page/Virtual_network_%27default%27_has_not_been_star... If that ends up not being your problem, please reply to this message, but sending the reply to libvirt-users@redhat.com (I also Cc'ed this message there) rather than to libvir-list@redhat.com. (The former is the official list for user questions about libvirt, whil libvir-list is intended for for people discussing the code.)
i guess perhaps just starting "libvirtd -d" on commandline is not enough. do i need a script to configure and start libvirtd properly for me? and it seems i must configure the virtual network somehow?
The "default" network should already be there as part of the stock install.

On 02/15/2012 01:01 AM, Laine Stump wrote:
On Tue, Feb 14, 2012 at 11:47 PM, Alex Jia<ajia@redhat.com> wrote:
Hi Jun, I assume you haven't changed libvirt default URI, it may be a issue, I want to know whether it works for you if you explicitly specify --connect qemu:///system with virt-install? I think a root reason probably is your disk image location, the log said it can't find storage volume, if you put img.winp under the /var/lib/libvirt/images, then give a disk absolute path to virt-install, Does it work for you? ok, i change the command a bit, and it went further. here is how i did:
(1) compiled everything from source, then install (make install) to my Ubuntu
(2) start libvirtd on commandline # libvirtd -d
(3) import my KVM image to libvirt
$ virt-install --connect qemu:///system -n winxp -r 800 --accelerate --vnc -v --noautoconsole --import -f /home/jun/img/img.winxp
it failed, and the log is like below:
.... [Tue, 14 Feb 2012 23:51:49 virt-install 3831] DEBUG (cli:326) Requesting libvirt URI qemu:///system [Tue, 14 Feb 2012 23:51:51 virt-install 3831] DEBUG (cli:328) Received libvirt URI qemu:///system [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:259) Requesting virt method 'hvm', hv type 'default'. [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:469) Received virt method 'hvm' [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:470) Hypervisor name is 'kvm' [Tue, 14 Feb 2012 23:51:52 virt-install 3831] ERROR (cli:439) Error in network device parameters: Virtual network 'default' has not been started. [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (cli:440) Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 884, in get_networks dev = parse_network(guest, netstr, mac=mac) File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 1642, in parse_network bridge=opts.get("bridge")) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", line 153, in __init__ self.network = network File "/usr/local/lib/python2.6/dist-packages/virtinst/XMLBuilderDomain.py", line 309, in new_setter fset(self, val, *args, **kwargs) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", line 257, in set_network "started.") % newnet) ValueError: Virtual network 'default' has not been started. A very common cause of this problem is that a systemwide instance of dnsmasq is already (erroneously) listening on the bridge created by
On 02/14/2012 11:01 AM, Jun Koi wrote: libvirt for the default network. Laine, yeah, I'm missing this important reason. I took your email as an oppurtunity to write an entry in the new Troubleshooting section of the libvirt wiki. It will explain to you how to solve your problem (*if* this is your problem, of course :-).
http://wiki.libvirt.org/page/Virtual_network_%27default%27_has_not_been_star... Great, I want to tidy up a doc about this ago, it should be very helpful for a new guys.
Thanks & Regards, Alex
If that ends up not being your problem, please reply to this message, but sending the reply to libvirt-users@redhat.com (I also Cc'ed this message there) rather than to libvir-list@redhat.com. (The former is the official list for user questions about libvirt, whil libvir-list is intended for for people discussing the code.)
i guess perhaps just starting "libvirtd -d" on commandline is not enough. do i need a script to configure and start libvirtd properly for me? and it seems i must configure the virtual network somehow? The "default" network should already be there as part of the stock install.
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Wed, Feb 15, 2012 at 1:01 AM, Laine Stump <laine@laine.org> wrote:
On 02/14/2012 11:01 AM, Jun Koi wrote:
On Tue, Feb 14, 2012 at 11:47 PM, Alex Jia <ajia@redhat.com> wrote:
Hi Jun, I assume you haven't changed libvirt default URI, it may be a issue, I want to know whether it works for you if you explicitly specify --connect qemu:///system with virt-install? I think a root reason probably is your disk image location, the log said it can't find storage volume, if you put img.winp under the /var/lib/libvirt/images, then give a disk absolute path to virt-install, Does it work for you? ok, i change the command a bit, and it went further. here is how i did:
(1) compiled everything from source, then install (make install) to my Ubuntu
(2) start libvirtd on commandline # libvirtd -d
(3) import my KVM image to libvirt
$ virt-install --connect qemu:///system -n winxp -r 800 --accelerate --vnc -v --noautoconsole --import -f /home/jun/img/img.winxp
it failed, and the log is like below:
.... [Tue, 14 Feb 2012 23:51:49 virt-install 3831] DEBUG (cli:326) Requesting libvirt URI qemu:///system [Tue, 14 Feb 2012 23:51:51 virt-install 3831] DEBUG (cli:328) Received libvirt URI qemu:///system [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:259) Requesting virt method 'hvm', hv type 'default'. [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:469) Received virt method 'hvm' [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:470) Hypervisor name is 'kvm' [Tue, 14 Feb 2012 23:51:52 virt-install 3831] ERROR (cli:439) Error in network device parameters: Virtual network 'default' has not been started. [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (cli:440) Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 884, in get_networks dev = parse_network(guest, netstr, mac=mac) File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 1642, in parse_network bridge=opts.get("bridge")) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", line 153, in __init__ self.network = network File "/usr/local/lib/python2.6/dist-packages/virtinst/XMLBuilderDomain.py", line 309, in new_setter fset(self, val, *args, **kwargs) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", line 257, in set_network "started.") % newnet) ValueError: Virtual network 'default' has not been started.
A very common cause of this problem is that a systemwide instance of dnsmasq is already (erroneously) listening on the bridge created by libvirt for the default network. I took your email as an oppurtunity to write an entry in the new Troubleshooting section of the libvirt wiki. It will explain to you how to solve your problem (*if* this is your problem, of course :-).
this is not my problem, as i dont use dnsmasq. below is my /var/log/libvirt/libvirtd.log .... 2012-02-15 01:54:18.358+0000: 10580: info : libvirt version: 0.9.10 2012-02-15 01:54:18.358+0000: 10580: error : virCommandWait:2308 : internal error Child process (/sbin/iptables --table mangle --delete POSTROUTING --out-interface virbr0 --protocol udp --destination-port 68 --jump CHECKSUM --checksum-fill) status unexpected: exit status 2 2012-02-15 01:54:18.367+0000: 10580: error : virCommandWait:2308 : internal error Child process (/sbin/iptables --table mangle --insert POSTROUTING --out-interface virbr0 --protocol udp --destination-port 68 --jump CHECKSUM --checksum-fill) status unexpected: exit status 2 2012-02-15 01:54:18.367+0000: 10580: warning : networkAddGeneralIptablesRules:1301 : Could not add rule to fixup DHCP response checksums on network 'default'. 2012-02-15 01:54:18.367+0000: 10580: warning : networkAddGeneralIptablesRules:1302 : May need to update iptables package & kernel to support CHECKSUM rule. and currently output of "brctl show" is: # brctl show bridge name bridge id STP enabled interfaces pan0 8000.000000000000 no virbr0 8000.000000000000 yes so what is wrong with my system? thanks, Jun

On Tue, Feb 14, 2012 at 11:47 PM, Alex Jia<ajia@redhat.com> wrote:
Hi Jun, I assume you haven't changed libvirt default URI, it may be a issue, I want to know whether it works for you if you explicitly specify --connect qemu:///system with virt-install? I think a root reason probably is your disk image location, the log said it can't find storage volume, if you put img.winp under the /var/lib/libvirt/images, then give a disk absolute path to virt-install, Does it work for you? ok, i change the command a bit, and it went further. here is how i did:
(1) compiled everything from source, then install (make install) to my Ubuntu
(2) start libvirtd on commandline # libvirtd -d
(3) import my KVM image to libvirt
$ virt-install --connect qemu:///system -n winxp -r 800 --accelerate --vnc -v --noautoconsole --import -f /home/jun/img/img.winxp
it failed, and the log is like below:
.... [Tue, 14 Feb 2012 23:51:49 virt-install 3831] DEBUG (cli:326) Requesting libvirt URI qemu:///system [Tue, 14 Feb 2012 23:51:51 virt-install 3831] DEBUG (cli:328) Received libvirt URI qemu:///system [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:259) Requesting virt method 'hvm', hv type 'default'. [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:469) Received virt method 'hvm' [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:470) Hypervisor name is 'kvm' [Tue, 14 Feb 2012 23:51:52 virt-install 3831] ERROR (cli:439) Error in network device parameters: Virtual network 'default' has not been started. [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (cli:440) Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 884, in get_networks dev = parse_network(guest, netstr, mac=mac) File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line 1642, in parse_network bridge=opts.get("bridge")) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", line 153, in __init__ self.network = network File "/usr/local/lib/python2.6/dist-packages/virtinst/XMLBuilderDomain.py", line 309, in new_setter fset(self, val, *args, **kwargs) File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", line 257, in set_network "started.") % newnet) ValueError: Virtual network 'default' has not been started. A very common cause of this problem is that a systemwide instance of dnsmasq is already (erroneously) listening on the bridge created by
On 02/14/2012 11:01 AM, Jun Koi wrote: libvirt for the default network. I took your email as an oppurtunity to write an entry in the new Troubleshooting section of the libvirt wiki. It will explain to you how to solve your problem (*if* this is your problem, of course :-).
On Wed, Feb 15, 2012 at 1:01 AM, Laine Stump<laine@laine.org> wrote: this is not my problem, as i dont use dnsmasq. You means you haven't a dnsmasq process is running before starting virtual network 'default', right? I want to know a cmdline argument of the dnsmasq
On 02/15/2012 10:53 AM, Jun Koi wrote: process by ps -ef|grep dnsmasq
below is my /var/log/libvirt/libvirtd.log
.... 2012-02-15 01:54:18.358+0000: 10580: info : libvirt version: 0.9.10 2012-02-15 01:54:18.358+0000: 10580: error : virCommandWait:2308 : internal error Child process (/sbin/iptables --table mangle --delete POSTROUTING --out-interface virbr0 --protocol udp --destination-port 68 --jump CHECKSUM --checksum-fill) status unexpected: exit status 2 2012-02-15 01:54:18.367+0000: 10580: error : virCommandWait:2308 : internal error Child process (/sbin/iptables --table mangle --insert POSTROUTING --out-interface virbr0 --protocol udp --destination-port 68 --jump CHECKSUM --checksum-fill) status unexpected: exit status 2 2012-02-15 01:54:18.367+0000: 10580: warning : networkAddGeneralIptablesRules:1301 : Could not add rule to fixup DHCP response checksums on network 'default'. 2012-02-15 01:54:18.367+0000: 10580: warning : networkAddGeneralIptablesRules:1302 : May need to update iptables package& kernel to support CHECKSUM rule.
and currently output of "brctl show" is: # brctl show bridge name bridge id STP enabled interfaces pan0 8000.000000000000 no virbr0 8000.000000000000 yes If you manually stop virtual network 'default' and dnsmasq service then restart 'default' network, does it work for you? for instance: % virsh net-destroy default
% service dnsmasq status if your dnsmasq is still active then stop it, otherwise, please ignore the following step: % service dnsmasq stop make sure you haven't any dnsmasq process is running by ps -ef|grep dnsmasq, then active 'default' network again: % virsh net-start default if the above step is failed, please give related logs and virsh output. what's dnsmasq process with cmdline? % ps -ef|grep dnsmasq Good Luck! Alex
so what is wrong with my system?
thanks, Jun
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
participants (3)
-
Alex Jia
-
Jun Koi
-
Laine Stump