我在ubuntu服务器上,我一直在查找如何通过vnc连接本地vm以继续设置。 我使用
安装vmsudo virt-install --virt-type kvm --name debian-7 --ram 1024
--location=http://ftp.debian.org/debian/dists/wheezy/main/installer-amd64/
--disk path=/tmp/debian-7-amd64-vm.img,size=5 --network network=default
--graphics vnc,listen=0.0.0.0 --noautoconsole --os-type=linux --os-variant=debianwheezy --
extra-args="priority=critical interface=auto debian-installer/language=en
debian-installer/country=US debian-installer/locale=en_US keymap=us
preseed/url=http://public.thornelabs.net/debian-7-wheezy-preseed.seed"
我不知道我的问题是什么。当我尝试在显示器0上进入服务器vn时,我得到了相同的基本错误(我知道它在显示0上的事实)
Cannot open display
任何想法?一个人告诉我,我应该看看是否安装了虚拟磁盘。
mount
返回
/dev/mapper/shane--vg-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,relatime,hugetlb)
/dev/cciss/c0d0p1 on /boot type ext2 (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
答案 0 :(得分:0)
快速而肮脏的黑客行为
sudo DISPLAY=$DISPLAY XAUTHORITY=~/.Xauthority virt-install ...
基本上,您的X环境不会从您的用户传递到root