[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]